ffmpeg compile

阅读更多

http://www.defendingthetruth.com/technology/33167-tutorial-configuring-building-googles-webm-encoder-libvpx-0-9-1-ffmpeg-0-6-a.html

 

Background: 

There are not many tutorials out that show you how to build and configure WebM in FFMPEG 0.6 for Linux (at least that are accessible to anyone other then nerds) so I figured I would write a forum tutorial on how to do it from scratch so that any nerds/hobbyists using Linux can start encoding with the active working encoder 0.9.1 that was just released on 17 Jun, 2010 [1]. Here are some steps you can take to build the encoder and start playing around with WebM. 

Building WebM standalone: 

1. Download WebM from the repositories at Google Code (bz2 archive)
libvpx-0.9.1.tar.bz2 - webm - libvpx 0.9.1 repository snapshot - Project Hosting on Google Code

2. Unzip the archive to a temporary folder or your desktop using the package manager or the terminal

$tar xvf libvpx-0.9.1.tar.bz2 

3. Navigate to the source directory or wherever you unzipped the bz2 archive to $cd /home/USER/libvpx-0.9.1.tar.bz2 for example 

4. Once you are in the directory you then type $./configure this will begin configuring the libvpx 0.9.1 for building the source code, which is written in C programming language. 

5. Once libvpx 0.9.1 has been configured and tested on your machine either i386 or 86_64 ELF build for 32-bit or 64-bit Linux machines you can then begin compiling the source code. If there were problems scroll up to see if you can diagnose what the problem is i.e if you are missing dependencies it should tell you what's needed. 

6. To compile the source code you need to make sure you have root permission. If you do not contact the person who is charge of your system and ask them for the root privileges if you know the password type $sudo make install. This will begin compiling the WebM encoder. 

7. If there were NO compile time errors WebM should be installed on your system. Open a terminal and type $ivfenc -help to run the encoder. If it's not there you may need export your $PATH variable to include the search path for wherever the binary is located on your system. 

8. Now that you have have successfully installed WebM on your system you can now enable it in FFMPEG 0.6 optionally if you would like. Proceed to the next section. 

Enabling WebM in FFMPEG 0.6: 

1. Assuming you have libvpx 0.9.1 installed on your system and you followed the above steps you can now download the FFMPEG 0.6 source. Follow the same steps above to download the source code to FFMPEG 0.6 (tar archive) unzip it to a temporary directory or your desktop. 

2. Navigate to $cd /home/USER/ffmpeg-0.6 directory or wherever you placed the folder. 

3. Once you are in the directory you need to configure FFMPEG 0.6. This is the tricky part. You need to have YASM installed. Do a search for this in the Synaptic Package Manager and install it before you begin to configure FFMPEG (Note: This package is needed to do some complicated assembly linkage in the program before it's built). 

4. Once YASM have been installed begin configuring FFMPEG for WebM support $./configure --enable-libvorbis --enable-libvpx --enable-pthreads . (Note: The last part is necessary for 64-bit Linux distros that have multi-threading instruction sets. If you don't enable it you will get an error!). 

5. Once the configuration has been completed and there were no errors you can then start to build FFMPEG 0.6 with WebM support. Almost every media program in the known universe uses FFMPEG including VLC. Even if you don't use it you can take advantage of it in the future!. Type 
$sudo make install. This will enable VP8 / Vorbis libraries and build them into FFMPEG 0.6. 

6. You are finished! You can now begin encoding with WebM encoder! If you need to know to how encode with WebM I highly recommend you go to Google WebM website and look for "encoding parameters" in the documentation. I will write a tutorial next time on how to do that soon. 

Any trackbacks or questions are welcomed. Please feel free to contact me if there is a problem. Take care and happy hacking!

你可能感兴趣的:(Linux,Google,Go,UP)