Page 1 of 5 12345 LastLast
Results 1 to 20 of 93
Like Tree1Likes

Thread: How To Install FFmpeg + FFmpeg-PHP + Mplayer + Mencoder + flv2tool + LAME MP3 Encoder

  1. #1
    vzAddict's Avatar
    vzAddict is offline System Administrator(eUKhost.com)
    Join Date
    Mar 2007
    Location
    Planet Earth
    Posts
    163

    Default How To Install FFmpeg + FFmpeg-PHP + Mplayer + Mencoder + flv2tool + LAME MP3 Encoder

    Hello,

    Following are the steps to install FFmpeg + FFmpeg-PHP + Mplayer + Mencoder + flv2tool + LAME MP3 Encoder + Libog on a Linux server or VPS Hosting Manually. There are many automated scripts available which install these but its better to do it manually as in case of an error occuring during the installation process, we can stop the installation and fix them. These steps also include the common fixes for such errors.

    cd /usr/local/src/

    DOWNLOAD MODULES

    wget http://www.mplayerhq.hu/MPlayer/rele...061022.tar.bz2
    wget rubyforge.org/frs/download.php/9225/flvtool2_1.0.5_rc6.tgz
    wget easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
    wget superb-west.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.1.tbz2
    wget downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
    wget downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz

    EXTRACT MODULES

    tar zxvf lame-3.97.tar.gz
    tar zxvf libogg-1.1.3.tar.gz
    tar zxvf libvorbis-1.1.2.tar.gz
    tar zxvf flvtool2_1.0.5_rc6.tgz
    tar jxvf essential-20061022.tar.bz2
    tar jxvf ffmpeg-php-0.5.1.tbz2

    mkdir /usr/local/lib/codecs/

    yum install gcc gmake make libcpp libgcc libstdc++ gcc4 gcc4-c++ gcc4-gfortran subversion ruby ncurses-devel -y

    DOWNLOAD FFMPEG and MPLAYER

    svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
    svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
    cd /usr/local/src/mplayer

    svn update

    cd /usr/local/src/
    mv /usr/local/src/essential-20061022/* /usr/local/lib/codecs/
    chmod -R 755 /usr/local/lib/codecs/

    LAME:

    cd /usr/local/src/lame-3.97
    ./configure
    make && make install

    LIBOGG

    cd /usr/local/src/
    cd /usr/local/src/libogg-1.1.3
    ./configure --enable-shared && make && make install
    PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
    export PKG_CONFIG_PATH

    LIBVORBIS

    cd /usr/local/src/
    cd /usr/local/src/libvorbis-1.1.2
    ./configure && make && make install

    FLVTOOL2

    cd /usr/local/src/
    cd /usr/local/src/flvtool2_1.0.5_rc6/
    ruby setup.rb config
    ruby setup.rb setup
    ruby setup.rb install

    MPLAYER

    cd /usr/local/src/
    cd /usr/local/src/mplayer
    ./configure && make && make install

    cd /usr/local/src/

    FFMPEG:

    cd /usr/local/src/ffmpeg/
    ./configure --enable-libmp3lame --enable-libvorbis --disable-mmx --enable-shared
    make
    make install

    export LD_LIBRARY_PATH=/usr/local/lib/

    ln -s /usr/local/lib/libavformat.so.50 /usr/lib/libavformat.so.50
    ln -s /usr/local/lib/libavcodec.so.51 /usr/lib/libavcodec.so.51
    ln -s /usr/local/lib/libavutil.so.49 /usr/lib/libavutil.so.49
    ln -s /usr/local/lib/libmp3lame.so.0 /usr/lib/libmp3lame.so.0
    ln -s /usr/local/lib/libavformat.so.51 /usr/lib/libavformat.so.51

    FFMPEG-PHP:

    cd /usr/local/src/
    cd /usr/local/src/ffmpeg-php-0.5.1/
    phpize
    ./configure
    make
    make install


    NOTICE: Make sure this is the correct php.ini for the box!!

    echo 'extension=ffmpeg.so' >> /usr/local/Zend/etc/php.ini

    NOTICE: Make sure this is the correct php.ini for the box!!

    RESTART APACHE

    service httpd restart
    That's all

    Last edited by eUK-Victor; 12-01-2012 at 21:42. Reason: spelling mistake
    Kieran likes this.
    vzAddict || Mike
    http://eUKHost.com
    eUKHost on Twitter || Facebook Group || Facebook Fanpage

  2. #2
    Rock's Avatar
    Rock is offline Technical Support (eUKhost.com)
    Join Date
    Oct 2006
    Location
    localhost
    Posts
    3,774

    Default

    Hey Mikey... Nice one Keep it up..

    Rock _a.k.a._ Jack
    eUK Windows Hosting || Windows Reseller Hosting
    Cloud Hosting 100% UPTIME! || Powerful Dedicated Servers
    Follow eUKhost on Twitter || Join eUKhost Community on Facebook

    For complaints, grievances or suggestions kindly email our FeedBack Dept.
    Proper action will be taken accordingly & instantaneously!

  3. #3
    vzAddict's Avatar
    vzAddict is offline System Administrator(eUKhost.com)
    Join Date
    Mar 2007
    Location
    Planet Earth
    Posts
    163

    Default

    Hello,

    While installing FFMPEG-PHP sometime it gives following error:
    checking for ffmpeg support... yes, shared
    checking for ffmpeg headers... configure: error: ffmpeg headers not found. Make sure you've built ffmpeg as shared libs using the --enable-shared option
    To fix this problem just copy and paste the following commands on the shell of your server and re-run the “./configure” for FFMPEG-PHP:
    mkdir /usr/local/include/ffmpeg
    cp /usr/local/include/libavcodec/* /usr/local/include/ffmpeg
    cp /usr/local/include/libavdevice/* /usr/local/include/ffmpeg
    cp /usr/local/include/libavformat/* /usr/local/include/ffmpeg
    cp /usr/local/include/libavutil/* /usr/local/include/ffmpeg
    cp /usr/local/include/libswscale/* /usr/local/include/ffmpeg
    vzAddict || Mike
    http://eUKHost.com
    eUKHost on Twitter || Facebook Group || Facebook Fanpage

  4. #4
    jonty31 is offline Forum Member
    Join Date
    Oct 2008
    Posts
    3

    Default

    MPLAYER

    cd /usr/local/src/
    cd /usr/local/src/mplayer

    ./configure && make && make install

    I am getting error after running above command..

    error is :

    libmpdemux/demux_lavf.c:97: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'mp_seek'
    libmpdemux/demux_lavf.c: In function 'lavf_check_preferred_file':
    libmpdemux/demux_lavf.c:190: warning: initialization from incompatible pointer type
    libmpdemux/demux_lavf.c: In function 'demux_open_lavf':
    libmpdemux/demux_lavf.c:464: error: 'mp_seek' undeclared (first use in this function)
    libmpdemux/demux_lavf.c:464: error: (Each undeclared identifier is reported only once
    libmpdemux/demux_lavf.c:464: error: for each function it appears in.)
    make: *** [libmpdemux/demux_lavf.o] Error 1


    cd /usr/local/src/

  5. #5
    Rock's Avatar
    Rock is offline Technical Support (eUKhost.com)
    Join Date
    Oct 2006
    Location
    localhost
    Posts
    3,774

    Question

    It appears like that the installer you downloaded is incorrect/corrupt, can you re-download a fresh copy of the packages & try reinstalling them ?

    Rock _a.k.a._ Jack
    eUK Windows Hosting || Windows Reseller Hosting
    Cloud Hosting 100% UPTIME! || Powerful Dedicated Servers
    Follow eUKhost on Twitter || Join eUKhost Community on Facebook

    For complaints, grievances or suggestions kindly email our FeedBack Dept.
    Proper action will be taken accordingly & instantaneously!

  6. #6
    vzAddict's Avatar
    vzAddict is offline System Administrator(eUKhost.com)
    Join Date
    Mar 2007
    Location
    Planet Earth
    Posts
    163

    Default

    While installing FFMPEG on a server when we run “make” after “./configure” it gives following error:
    math-errno -c -o libavdevice/v4l.o libavdevice/v4l.c
    In file included from libavdevice/v4l.c:32:
    /usr/include/linux/videodev.h:56: error: syntax error before "ulong"
    /usr/include/linux/videodev.h:72: error: syntax error before '}' token
    libavdevice/v4l.c: In function `grab_read_header':
    libavdevice/v4l.c:77: error: storage size of 'tuner' isn't known
    libavdevice/v4l.c:141: error: invalid application of `sizeof' to incomplete type `video_tuner'
    libavdevice/v4l.c:148: error: invalid application of `sizeof' to incomplete type `video_tuner'
    libavdevice/v4l.c:77: warning: unused variable `tuner'
    make: *** [libavdevice/v4l.o] Error 1
    SOLUTION:

    This problem can be fixed by disabling v41 and v42 for FFMPEG. This can be done when we run “./configure” for FFMPEG
    ./configure --enable-libmp3lame --enable-libvorbis --disable-mmx --enable-shared --disable-demuxer=v4l --disable-demuxer=v4l2
    Once this has been completed run “make” and “make install” to install FFMPEG.
    vzAddict || Mike
    http://eUKHost.com
    eUKHost on Twitter || Facebook Group || Facebook Fanpage

  7. #7
    scotthai is offline Forum Member
    Join Date
    Dec 2008
    Location
    San Jose, CA
    Posts
    1

    Default

    I found a real simple fix to a common issue, and this issue comes when your trying to ./configure ffmpeg, the issue is with the /tmp directory. You can easily make a new tmp dir, just do the following:
    1. cd /usr/local/src
    2. mkdir tmp
    3. chmod 777 tmp
    4. export TMPDIR=/usr/local/src/tmp
    5. cd /usr/local/src/ffmpeg/
    6. ./configure --enable-libmp3lame --enable-libvorbis --disable-mmx --enable-shared && make && make install

    That fixed the painful process of trying to find why my /tmp directory wasn't letting me install FFMPEG

  8. #8
    egoslip is offline Forum Member
    Join Date
    Dec 2008
    Posts
    2

    Default

    Im getting a few erros when trying to install FFMPEG-PHP:


    /usr/local/src/ffmpeg-php-0.5.1$ make
    /bin/sh /usr/local/src/ffmpeg-php-0.5.1/libtool --mode=compile gcc -I. -I/usr/local/src/ffmpeg-php-0.5.1 -DPHP_ATOM_INC -I/usr/local/src/ffmpeg-php-0.5.1/include -I/usr/local/src/ffmpeg-php-0.5.1/main -I/usr/local/src/ffmpeg-php-0.5.1 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include/ffmpeg -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c -o ffmpeg_frame.lo
    gcc -I. -I/usr/local/src/ffmpeg-php-0.5.1 -DPHP_ATOM_INC -I/usr/local/src/ffmpeg-php-0.5.1/include -I/usr/local/src/ffmpeg-php-0.5.1/main -I/usr/local/src/ffmpeg-php-0.5.1 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include/ffmpeg -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c -fPIC -DPIC -o .libs/ffmpeg_frame.o
    /usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c: In function `_php_convert_frame':
    /usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c:197: warning: implicit declaration of function `img_convert'
    /usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c: In function `_php_crop_frame':
    /usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c:250: warning: implicit declaration of function `img_copy'
    /usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c: In function `_php_resample_frame':
    /usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c:272: error: `ImgReSampleContext' undeclared (first use in this function)
    /usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c:272: error: (Each undeclared identifier is reported only once
    /usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c:272: error: for each function it appears in.)
    /usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c:272: error: `img_resample_ctx' undeclared (first use in this function)
    /usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c:298: warning: implicit declaration of function `img_resample_full_init'
    /usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c:311: warning: implicit declaration of function `img_resample'
    /usr/local/src/ffmpeg-php-0.5.1/ffmpeg_frame.c:316: warning: implicit declaration of function `img_resample_close'
    make: *** [ffmpeg_frame.lo] Error 1

  9. #9
    vzAddict's Avatar
    vzAddict is offline System Administrator(eUKhost.com)
    Join Date
    Mar 2007
    Location
    Planet Earth
    Posts
    163

    Default

    Hello,

    The problem seems to be with the FFMPEG-PHP version (0.5.1) which you are trying to install. Please try to install the latest version of FFMPEG-PHP i.e. 0.6.0 which can be downloaded from: SourceForge.net: Files

    Please let us know if this fix the issue.
    vzAddict || Mike
    http://eUKHost.com
    eUKHost on Twitter || Facebook Group || Facebook Fanpage

  10. #10
    egoslip is offline Forum Member
    Join Date
    Dec 2008
    Posts
    2

    Default

    Ya that worked great thanks

  11. #11
    bigbang72 is offline Forum Member
    Join Date
    Jan 2009
    Posts
    1

    Default

    so close, still getting ffmpeg-php.lo error 1

    tried version of ffmpeg-php 5.1, 5.0, 6.0 5.3.1 no luck

    any idea why?

    great solution, just a hair thin away from getting it all done

  12. #12
    Scott's Avatar
    Scott is offline System Administrator(eUKhost.com)
    Join Date
    Oct 2006
    Posts
    335

    Wink

    Hi,

    Please try installing ffmpeg using auto-installer. It will install most of the dependencies automatically. You can download installer from URL http://nchc.dl.sourceforge.net/sourc...all.3.1.tar.gz

    ------------------------------------------
    wget http://nchc.dl.sourceforge.net/sourc...all.3.1.tar.gz

    tar -xvzf ffmpeginstall.3.1.tar.gz

    cd ffmpeginstall.3.1

    ./install.sh
    ------------------------------------------

  13. #13
    doncamillo is offline Forum Member
    Join Date
    Feb 2009
    Posts
    10

    Default

    FLVTOOL2

    cd /usr/local/src/ .................................................. ....OK
    cd /usr/local/src/flvtool2_1.0.5_rc6/...........................OK
    ruby setup.rb config..........................................-bash: ruby: command not found

    I think it is a simple problem but i dont have any idea why this command doesnt work. All the other steps was allright


    I need help about this command

    TNX

  14. #14
    Rock's Avatar
    Rock is offline Technical Support (eUKhost.com)
    Join Date
    Oct 2006
    Location
    localhost
    Posts
    3,774

    Default

    Quote Originally Posted by doncamillo View Post
    FLVTOOL2

    cd /usr/local/src/ .................................................. ....OK
    cd /usr/local/src/flvtool2_1.0.5_rc6/...........................OK
    ruby setup.rb config..........................................-bash: ruby: command not found

    I think it is a simple problem but i dont have any idea why this command doesnt work. All the other steps was allright


    I need help about this command

    TNX
    Hi,

    You need to install Ruby first if you're running the ruby command. Try running "yum install ruby" from the SSH, it'd be sorted out

    Rock _a.k.a._ Jack
    eUK Windows Hosting || Windows Reseller Hosting
    Cloud Hosting 100% UPTIME! || Powerful Dedicated Servers
    Follow eUKhost on Twitter || Join eUKhost Community on Facebook

    For complaints, grievances or suggestions kindly email our FeedBack Dept.
    Proper action will be taken accordingly & instantaneously!

  15. #15
    doncamillo is offline Forum Member
    Join Date
    Feb 2009
    Posts
    10

    Default

    Quote Originally Posted by eUK-Scott View Post
    Hi,

    Please try installing ffmpeg using auto-installer. It will install most of the dependencies automatically. You can download installer from URL ttp://nchc.dl.sourceforge.net/sourceforge/ffmpeginstall/ffmpeginstall.3.1.tar.gz

    ------------------------------------------
    wget nchc.dl.sourceforge..........e/ffmpeginstall/ffmpeginstall.3.1.ta

    tar -xvzf ffmpeginstall.3.1.tar.gz

    cd ffmpeginstall.3.1

    ./install.sh
    ------------------------------------------
    I had the same problem and did evrything that you told in the above.
    Now i wonder is this for only FFMPEG install or both FFMPEG and FFMPEG-PHP.

    Shortly i wonder should i continue the FFMPEG_PHP step of the first post. Or it is done now?

    What should i do now?

  16. #16
    doncamillo is offline Forum Member
    Join Date
    Feb 2009
    Posts
    10

    Default

    Quote Originally Posted by Rock View Post
    Hi,

    You need to install Ruby first if you're running the ruby command. Try running "yum install ruby" from the SSH, it'd be sorted out
    When i try to install it gaves me repomd.xml error

    Code:
     yum install ruby
    Loading "rhnplugin" plugin
    Loading "security" plugin
    rhel-i386-server-5        100% |=========================| 1.2 kB    00:00
    http://apt.sw.be/redhat/el5Server/en/i386/dag/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
    Trying other mirror.
    Error: Cannot retrieve repository metadata (repomd.xml) for repository: dag. Please verify its path and try again
    Then i try for by passing "--disablerepo=dag" to yum's command line invocation

    Code:
    yum --disablerepo=dag install ruby
    Loading "rhnplugin" plugin
    Loading "security" plugin
    rhel-i386-server-5        100% |=========================| 1.2 kB    00:00
    Excluding Packages in global exclude list
    Finished
    Setting up Install Process
    Parsing package install arguments
    No package ruby available.
    Nothing to do
    so still the RUBY command not working for me. What can i do?

  17. #17
    Rock's Avatar
    Rock is offline Technical Support (eUKhost.com)
    Join Date
    Oct 2006
    Location
    localhost
    Posts
    3,774

    Lightbulb

    Hello DonCamillo,

    From the errors generated, I think that you're installing FFMPEG & other supported applications on an RHEL5 machine. I find that the mirrors mentioned in your repositories [/etc/yum.repos.d/*] aren't proper.. For instance the path of the repo metadata is incorrect & the files aren't fetched properly:
    http://apt.sw.be/redhat/el5server/en/i386/dag/repodata/repomd.xml
    It should be:
    http://apt.sw.be/redhat/el5/en/i386/dag/repodata/repomd.xml
    Additionally I'd even recommend to update your system via Red Hat Network (RHN) if it's registered online..
    or try installing apt-get & run "apt-get install ruby" if you are comfortable with the apt-get commands..

    Also, try running "
    up2date -i ruby" as it's another good feature for installing apps on RHEL boxes..

    There are various other sources for installing Ruby, a precompiled Ruby RPM that was tested on RHEL, one place you can get it is the RPM repo
    of RubyWorks Production Stack: http://rubyworks.rubyforge.org/redhat/5/
    RPMS/i386/

    If you provide me the login details of your server, I'd be able to further troubleshoot the problem & get the required applications installed...

    Rock _a.k.a._ Jack
    eUK Windows Hosting || Windows Reseller Hosting
    Cloud Hosting 100% UPTIME! || Powerful Dedicated Servers
    Follow eUKhost on Twitter || Join eUKhost Community on Facebook

    For complaints, grievances or suggestions kindly email our FeedBack Dept.
    Proper action will be taken accordingly & instantaneously!

  18. #18
    doncamillo is offline Forum Member
    Join Date
    Feb 2009
    Posts
    10

    Default

    I found the way to install ruby in another forum with 2 simple command amd it worked.

    /scripts/installruby
    /usr/local/cpanel/bin/ror_setup.

    Tnx for help

  19. #19
    Rock's Avatar
    Rock is offline Technical Support (eUKhost.com)
    Join Date
    Oct 2006
    Location
    localhost
    Posts
    3,774

    Cool

    Quote Originally Posted by doncamillo View Post
    I found the way to install ruby in another forum with 2 simple command amd it worked.

    /scripts/installruby
    /usr/local/cpanel/bin/ror_setup.

    Tnx for help
    You're DonCamillo.. Ahhh I didn't have a slightest idea whether you had cPanel installed on your server..else things would have been much faster..

    Rock _a.k.a._ Jack
    eUK Windows Hosting || Windows Reseller Hosting
    Cloud Hosting 100% UPTIME! || Powerful Dedicated Servers
    Follow eUKhost on Twitter || Join eUKhost Community on Facebook

    For complaints, grievances or suggestions kindly email our FeedBack Dept.
    Proper action will be taken accordingly & instantaneously!

  20. #20
    flesso's Avatar
    flesso is offline Forum Member
    Join Date
    Mar 2007
    Location
    127.0.0.1
    Posts
    1,665

    Default

    Will this work fine on a L-VPS-03 server?

    I've also been reading on using this with PHP and it needs to made use of exec(), so it would it be okay to enable exec() on my server?
    Josh

    Resident Blogger

Page 1 of 5 12345 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About eUKhost
We're a Leeds-based web hosting provider specialising in Linux- and Windows-based hosting solutions now serving over 35,000 customers worldwide. Across our network, we host over 2 million websites in our state-of-the-art data centres in Reading, Maidenhead and Milton Keynes. Find out more.
we're social

Copyright © 2014. eUKhost Ltd. All rights are reserved.

The opinions or views of users on the forum are those of the author and not of eUKhost Ltd.