Please contact (802) 224 - 6525 for price quotes and programming support.
Follow this link for a resume of php and Mysql Programing experience
Digg This!

0 Members and 1 Guest are viewing this topic. « previous next »

Pages: [1] Go Down Print
Author Topic: Installing FFMPEG on Linux  (Read 7049 times)
John Anderson
Vermont Internet Design Admin
Administrator
Full Member
*****

Karma: 0
Offline Offline

Gender: Male
Posts: 238



View Profile WWW
« on: June 12, 2008, 10:39:50 PM »

Code:
1  ##if you get an error that states you have no C++ complier run the following
2  yum install g++
3  
4  cd /usr/local/src
5  
6  wget http://www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20061022.tar.bz2  # ( UPDATED 20070308 )
7  wget http://rubyforge.org/frs/download.php/9225/flvtool2_1.0.5_rc6.tgz
8  wget http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
9  wget http://superb-west.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.0.tbz2
10 wget http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
11 wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz
12 #EXTRACT THE CRAP:
13 tar zxvf flvtool2_1.0.5_rc6.tgz
14 tar zxvf lame-3.97.tar.gz
15 tar zxvf libogg-1.1.3.tar.gz
16 tar zxvf libvorbis-1.1.2.tar.gz
17 tar zxvf flvtool2_1.0.5_rc6.tgz
18 tar jxvf essential-20061022.tar.bz2   # ( UPDATED 20070308 )
19 tar jxvf ffmpeg-php-0.5.0.tbz2
20 makmkdir /usr/local/lib/codecs/
21 #JUST IN CASE:
22 up2date -i gcc gmake make libcpp libgcc libstdc++ gcc4 gcc4-c++ gcc4-gfortran
23 yum install gcc gmake make libcpp libgcc libstdc++ gcc4 gcc4-c++ gcc4-gfortran
24 #WE NEED TO INSTALL SVN + ROR:
25 up2date -i subversion
26 up2date -i ruby
27 up2date -i ncurses-devel
28 svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
29 svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
30 cd /usr/local/src/mplayer
31 svn update
32 cd /usr/local/src
33 #COPY CODECS FOR MPLAYER:
34 mv /usr/local/src/essential-20061022/* /usr/local/lib/codecs/
35 chmod -R 755 /usr/local/lib/codecs/
36 #SECURE TMP IS A PAIN AT TIMES Wink
37 mkdir /usr/local/src/tmp
38 chmod 777 /usr/local/src/tmp
39 export TMPDIR=/usr/local/src/tmp
40 #LAME:
41 cd /usr/local/src/lame-3.97
42 ./configure
43 make && make install
44 cd /usr/local/src/
45 #LIBOGG:
46 cd /usr/local/src/libogg-1.1.3
47 ./configure && make && make install
48 cd /usr/local/src/
49 #LIBVORBIS:
50 cd /usr/local/src/libvorbis-1.1.2
51 ./configure && make && make install
52 cd /usr/local/src/
53 #FLVTOOL2:
54 cd /usr/local/src/flvtool2_1.0.5_rc6/
55 ruby setup.rb config
56 ruby setup.rb setup
57 ruby setup.rb install
58 cd /usr/local/src/
59 cd /usr/local/src/mplayer
60 ./configure && make && make install
61 cd /usr/local/src/
62 #FFMPEG:
63 cd /usr/local/src/ffmpeg/
64 #./configure --enable-libmp3lame --enable-libogg --enable-libvorbis --disable-mmx --enable-shared
65 ### configure options changed ###
66 ./configure --enable-libmp3lame  --disable-mmx --enable-shared
67 ######### IGNORE THIS ECHO LINE  The dev's fixed the issue in svn. Im only leaveing it here in case it comes up again ###############
68 #####echo '#define HAVE_LRINTF 1 '>>config.h
69 ################################################################################
70 #############################
71 make
72 make install
73 ln -s /usr/local/lib/libavformat.so.50 /usr/lib/libavformat.so.50
74 ln -s /usr/local/lib/libavcodec.so.51 /usr/lib/libavcodec.so.51
75 ln -s /usr/local/lib/libavutil.so.49 /usr/lib/libavutil.so.49
76 ln -s /usr/local/lib/libmp3lame.so.0 /usr/lib/libmp3lame.so.0
77 ln -s /usr/local/lib/libavformat.so.51 /usr/lib/libavformat.so.51
78 ln -s /usr/local/lib/libavformat.so.52 /usr/lib/libavformat.so.52 
79 ln -s /usr/local/lib/libavdevice.so.52 /usr/lib/libavdevice.so.52   
80 cd /usr/local/src/
81 #FFMPEG-PHP:
82 cd /usr/local/src/ffmpeg-php-0.5.0/
83 yum -y install autoconf
84 up2date -i autoconf
85 phpize
86 ./configure
87 make
88 make install
89 
90 #NOTICE: Make sure this is the correct php.ini for the box!!
91 
92 echo 'extension=/usr/local/lib/php/extensions/no-debug-non-zts-20020429/ffmpeg.so' >> /usr/local/Zend/etc/php.ini
93 
94 #NOTICE: Make sure this is the correct php.ini for the box!!
95 
96 service httpd restart
97 cd /usr/local/src
Logged

John Anderson
Vermont Internet Design Admin
Administrator
Full Member
*****

Karma: 0
Offline Offline

Gender: Male
Posts: 238



View Profile WWW
« Reply #1 on: June 12, 2008, 10:45:51 PM »




Installed modules.

1) Amrnb-7.0.0.2 http://www.3gpp.org/ftp/Specs/html-info/26104.htm
2) Amrwb-7.0.0.3 http://www.penguin.cz/~utx/amr
3) APR-1.2.12    http://apr.apache.org/
4) autoconf-2.61a.265-feef9 http://packages.debian.org/search?keywords=autoconf2.13
5) bladeenc-0.94.2 http://bladeenc.mp3.no/skeleton/DL.html
6) ffmpeg-php-0.5.2.1 http://ffmpeg-php.sourceforge.net/
7) flex-2.5.35 http://flex.sourceforge.net/
Cool gmp-4.2.2 http://gmplib.org/
9) gnat www.gnu.org/software/gnat/gnat.html
10) lame-3.98b8 http://lame.sourceforge.net/download.php
11) libogg-1.1.3 http://www.xiph.org/downloads/
12) libvorbis-1.2.0 http://www.xiph.org/downloads/
13) mpfr-2.3.2 http://www.mpfr.org/
14) subversion http://subversion.tigris.org/project_packages.html
15) ffmpeg http://ffmpeg.mplayerhq.hu/
16) gcc http://gcc.gnu.org/

17) ISO C90 compiler
18)POSIX
19)GNU binutils
20)automake version 1.9.6
21)gettext version 0.14.5
22)gperf version 2.7.2
23)DejaGnu 1.4.4
24)autogen version 5.5.4
25)guile version 1.4.1
26)TeX
27)Perl version 5.6.1
28)GNU diffutils version 2.7
29)patch version 2.5.4
30)ecj1
31)gjavah
« Last Edit: June 13, 2008, 08:54:52 PM by John Anderson » Logged

John Anderson
Vermont Internet Design Admin
Administrator
Full Member
*****

Karma: 0
Offline Offline

Gender: Male
Posts: 238



View Profile WWW
« Reply #2 on: June 15, 2008, 05:41:26 AM »

A few weeks ago I couldnt find an article that displayed the correct way to install ffmpeg on a web server with all of the proper codecs to convert a movie. With a few days of posting my ffmpeg instructions onto the internet. I searched the internet again for the same thing. Now I am able to find thousands of sites that display these exact same instructions or a variation of it.
Logged

John Anderson
Vermont Internet Design Admin
Administrator
Full Member
*****

Karma: 0
Offline Offline

Gender: Male
Posts: 238



View Profile WWW
« Reply #3 on: June 24, 2008, 12:34:58 AM »

If you have done the following but you still cannot get php to execute your ffmpeg due to special codecs that are on your webserver. I am going to explain to you how to grant root access to any webserver user or group. Unfortunely just changing the configuration files will not do you to much good. To save on the dynamics of this article I am going to show you how to grant a user root access to run a command. This has taken me a little bit to solve this one. So I hope that some of my users find this usefull and hope that everyone will be able to get ffmpeg installed properly as I know that it is not very well documented on the internet.

  If you keep getting errors because your apache user cannot run ffmpeg. Is what you are concluding when its run. You need to edit the etc/sudoers file.

Code:
1 cd etc
Then you need to edit the sudoers file with visudo. This works like this. from the etc direct run visudo like this

Code:
1 ../usr/sbin/visudo

Now you will need to press the letter i on your keyboard to bring visudo into edit mode. If you would like the apache user to access the webserver as root you will need to add the following to any line of this file

Code:
1 apache      ALL=(ALL)       NOPASSWD:ALL

After you have added this line to your file find a line that says.
Code:
1 Defaults requiretty
Put a comment in front of this line.

now press the excape key to take visudo out of edit mode and bank into command mode type
Code:
1 :w<enter>
to force visudo to write the new file to the server. Then type
Code:
1 :q
to quit visudo

now you need to restart the httpd service.

Now in your php script you can call any function as root using the following

exec('sudo whoami', $output);
print_r($output) should yield root
exec('sudo ffmpeg -i input.mov -ar 22050 -b 500 -f flv -s 360x240 output.flv', $out);
remember that you just refer to the function in this format
Code:
1 sudo function
Thanx I hope this clears up for my readers how to create a webpage that can utilize root access to the webserver.



Logged

John Anderson
Vermont Internet Design Admin
Administrator
Full Member
*****

Karma: 0
Offline Offline

Gender: Male
Posts: 238



View Profile WWW
« Reply #4 on: June 24, 2008, 10:31:50 AM »

Ok so If you dont have ffmpeg working correctly by now than you can contact me at (802) 224-6525 or Chillininvt@yahoo.com. I charge $1500 for an ffmpeg installation with the following configuration.

configuration: --enable-mmx --enable-muxer=mpegts --enable-muxer=ffm --enable-libfaac --enable-libfaad --enable-nonfree --enable-gpl --enable-libvorbis --enable-libmp3lame --enable-shared --enable-libamr-wb --enable-libamr-nb --enable-libxvid --prefix=/usr/local/

If thats what you need to do your job which it prolly is than please contact me.
Logged

John Anderson
Vermont Internet Design Admin
Administrator
Full Member
*****

Karma: 0
Offline Offline

Gender: Male
Posts: 238



View Profile WWW
« Reply #5 on: July 24, 2008, 08:16:12 AM »

If you cannot figure out how to get ffmpeg installed. Please do not call me looking for free advice on how to get ffmpeg installed on your webserver. I have recieved upward to 30 phone calls of people seeking free advice about getting ffmpeg installed on there server. If they would ready the posting above it says that if you cannot do the ffmpeg installation yourself. I do them for $1500....
    If you have a question to ask me please register an account and ask the question in the forum. Chances are if you do that you are more likely to get a solution to your problem than if you call me. I work for a living and design websites to feed my family. I didnt get as good at programming so I did so I can sit here and answer phone calls all day helping people get ffmpeg installed for free.
    If you would like ffmpeg installed on your server I will charge a $1500 with the garuntee that you will be able to process all of the major video types, .mov, .avi , .mpg4, .mpg, wmv , ect. I put the instructions clear as day on my website how to install ffmpeg. If you cannot figure out how to install ffmpeg with the instructions that I posted for everyone to see on my website than thats on you. I charge $1500 for the procedure if you dont want to pay that than go onto my website and look at my installation proceedure and see if you can figure out how to get it working. Your system may vary from mine so you may need to make some changes.
Logged

John Anderson
Vermont Internet Design Admin
Administrator
Full Member
*****

Karma: 0
Offline Offline

Gender: Male
Posts: 238



View Profile WWW
« Reply #6 on: September 03, 2009, 01:58:08 PM »

  This is just a reminder that if you email me asking me to teach you how to do an ffmpeg installation you are wasting your time. Unless of course you would like to pay for services. I get about 10 requests each week for people asking me to assist them in installing ffmpeg and teaching them how to use it. Unfortunely I will have to charge $600 for the intstallation and $3500 for a  lesson on ffmpeg installation.
   If you cannot figure out how to install ffmpeg based on the above directions, mabe its time to have someone do it who actually knows what they are doing.
« Last Edit: September 03, 2009, 02:00:14 PM by John Anderson » Logged

Pages: [1] Go Up Print 
« previous next »
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
TinyPortal v0.9.8 © Bloc
Christmas2006 design by Bloc
Page created in 0.186 seconds with 29 queries.