Appendix H. Encoding with FFmpeg
You can convert video between container formats and re-encode the audio and video streams within them using several different utilities. In this appendix you’ll concentrate on FFmpeg, a command-line tool. Let’s review several good reasons for using this tool:
- It’s open source and freely downloadable.[1]
1 FFmpeg is free, but you may be required to pay a licensing fee to the MPEG-LA if you use it to encode h264 video.
- It’s available for all the major client and server platforms: Windows, OS X, and Linux.
- Command-line tools lend themselves to scripting, if you have to process many videos.
- It can be called from server-side code.
Let’s also look at disadvantages:
- You may be unfamiliar with command-line tools if you’ve mainly used Windows OSes.
- The sheer flexibility of FFmpeg means it has a confusing plethora of options and configurations.
In this appendix, we’ll do our best to walk you through using FFmpeg, but if you’re planning to do serious video work, you’ll need to get down to the nuts and bolts. If you’re only interested in playing around with the video element itself, you can just stick with an easy-to-use tool such as Miro Video Converter (http://www.mirovideoconverter.com/).