Main Page | Recent changes | Edit this page | Page history

Printable version | Disclaimers

Not logged in
Log in | Help
 

Ffmpeg install instructions

From Gemin-Wiki

Table of contents

Lame mp3 Library

download: http://sourceforge.net/projects/lame (beta version ok so far)

then compile and install:

$ ./configure
$ make
$ make install

Place program in a folder in the classpath, or create symbolic link in usr/bin (or else in classpath) to point to the installation of lame. You can type the following to test install was succesful:

$ lame --help

Ffmpeg


Install

website: http://ffmpeg.sourceforge.net/

1) The CVS server has been retired, ffmpeg now require you to install subversion ("apt-get install subversion" on debian) and use that:

$ svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg

2) configure, compile and install:

$ ./configure --enable-libmp3lame --enable-gpl  --enable-shared --enable-libfaad
$ make
$ make install

The --enable-libfaad option requires that libfaad has already been installed. This is a library for decoding mpeg4 audio (mp4a). If you don't mind not having the ability to upload mpeg 4 audio then you won't need it, but if you do want to be able to upload videos with mp4a encoding you'll have to struggle to get the faad libraries installed.

NB: Some (older?) versions of ffmpeg used "--enable-faad" rather than "--enable-libfaad", so if it doesn't work, try the other option.

At the time of writing, I still can't figure how how to do that on either Debian or OS X.

Pitfalls

Options with configure should work fine. You won't need ffserver, so can add --disable-ffserver.

if you have problems and need to install again, try

$ make clean

then repeat step (2)

ffmpeg: error while loading shared libraries: libavformat.so: cannot open shared object file: No such file or directory

If the libavformat.so is installed in /usr/local/lib you may need to update /etc/ld.so.conf: add the line /usr/local/lib then type

$ ldconfig

You can also try a complete rebuild with:

$ ./configure options --prefix=/usr

This should place the ffmpeg executable where it can find the .so file, which is in /usr/local/lib

The second technique may be less invasive.

Note: also the lame library might give the same problem, but the '--prefix' method might not fix, so update that ld.so.conf file.

Running ffmpeg

Gemin-i Plus uses the following script to convert to .FLV flash video format. Try from the command line to see if it works. inputfile.mov is a .mov file on your server, outputfile.flv is the name you're giving to the converted file.

$ ffmpeg -i inputfile.mov -f flv -r 30 -y outputfile.flv

The above command produced slow movies on two installs. Try:

$ ffmpeg -i source.mov -ar 22050  -b 200 -r 12 -f flv -s 640x480 destination.flv

This will resize to 640x480.

For thumbnails, try:

$ ffmpeg -i source.avi -an -ss 00:00:03 -an -r 1 -s 300x200 -vframes 1 -y -pix_fmt rgb24 destination%d.jpg

You will get a file called destination1.jpg, which will show a scene three seconds into the movie you have to remove the 1 yourself, or write a script. There's a theoretical possibility of getting more than one destination file, numbered 2 upwards.

The output filename MUST include %d or you will get the error below. The %d will turn into a number 1 once processed. unable for find a suitable output format for destination1.jpg

3GP support

3GP is an audio/video compression file format which is used by many mobile phones. It appears to use AMR-NB and AMR-WB (narrow band and wide band) for audio compression. Here's some stuff from my friend about getting 3GP support into ffmpeg:

 # mkdir working
 # cd working

wget the following zips:

 # wget http://www.3gpp.org/ftp/Specs/archive/26_series/26.104/26104-510.zip
 # wget http://www.3gpp.org/ftp/Specs/archive/26_series/26.204/26204-510.zip
 # unzip -q 26104-510.zip
 # unzip -q 26204-510.zip

Now add into ffmpeg

 # cd ffmpeg
 # mkdir libavcodec/amr_float
 # mkdir libavcodec/amrwb_float
 # cd libavcodec/amr_float
 # unzip -q /location/of/working/26104-510_ANSI_C_source_code.zip
 # cd ../../libavcodev/amrwb_float
 # unzip -q /location/of/working/26204-510_ANSI-C_source_code.zip

When you do a ./configure ffmpeg, you'll see options for amr-wb-float and amr-nb-float - with 'no' beside them. --enable- them until they say 'yes'.

Retrieved from "http://dev.gemin-i.org/wiki/index.php/Ffmpeg_install_instructions"

This page has been accessed 16809 times. This page was last modified 09:56, 9 Apr 2008.


[Main Page]
Main Page
Recent changes
Random page
Current events

Edit this page
Discuss this page
Page history
What links here
Related changes

Special pages
Bug reports