If you do not have the ports tree installed (i.e. /usr/ports is empty or non existent) then you can use portsnap to download and update it (these commands must be done as root):
1 pkg_add -r portsnap
2 mkdir /usr/ports
3 portsnap fetch
4 portsnap extract
5 portsnap update
Install some ports to enable more funcionality in ffmpeg (these commands also must be done as root):
1 # faac support
2 cd /usr/ports/audio/faac
3 make install clean
4
5 # vorbis support
6 cd /usr/ports/audio/vorbis-tools
7 make install clean
8
9 # x264 support
10 cd /usr/ports/multimedia/x264
11 make install clean
12
13 # theora support
14 cd /usr/ports/multimedia/libtheora
15 make install clean
16
17 # ffplay support
18 cd /usr/ports/deve/sdl12
19 make install clean
Checkout ffmpeg from subversion, configure, compile and install (only the last command needs root priviledges);
1 # checkout ffmpeg from subversion
2 svn co svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
3 cd ffmpeg
4
5 # export library and include paths
6 # so configure can find the external
7 # libraries (i.e. x264)
8 export LIBRARY_PATH=/usr/local/lib
9 export CPATH=/usr/local/include
10
11 # run configure with desired options
12 ./configure --enable-gpl --enable-pthreads \
13 --enable-shared --enable-swscale \
14 --enable-libx264 --enable-libfaac \
15 --enable-libtheora --enable-libvorbis \
16 --enable-encoder=g726 --enable-encoder=ljpeg \
17 --enable-encoder=mjpeg
18
19 # compile using GNU Make (gmake), not BSD Make
20 gmake
21
22 # install
23 su root -c 'gmake install'
If you want to enable other external codec libraries supported by ffmpeg make sure to install their respective ports (if available) and then run the configure script with the desired libraries enabled. You can see a list of supported codec libraries with ".configure --help".
Note that this instructions were tested with revision 12684 of ffmpeg subverion but ffmpeg is a very active project and this instructions are not guarantee to work with the latest subversion revision.
No comments:
Post a Comment