Wednesday, April 9, 2008

FFmpeg convert stream audio and video

FFmpeg is a complete solution to record, convert and stream audio and video. It includes libavcodec, the leading audio/video codec library. FFmpeg is developed under Linux, but it can compiled under most operating systems, including Windows.
The project is made of several components:

ffmpeg is a command line tool to convert one video file format to another. It also supports grabbing and encoding in real time from a TV card.
ffserver is an HTTP (RTSP is being developed) multimedia streaming server for live broadcasts. Time shifting of live broadcast is also supported.
ffplay is a simple media player based on SDL and on the FFmpeg libraries.
libavcodec is a library containing all the FFmpeg audio/video encoders and decoders. Most codecs were developed from scratch to ensure best performances and high code reusability.
libavformat is a library containing parsers and generators for all common audio/video formats.
Download
Lasted version mirror site
Example


Apple QuickTime Player
The following command lines produced QuickTime files that were playable with Apple QuickTime Player v6.5.2:
ffmpeg -i <inputfile.ext> <file.mov>
ffmpeg -i <inputfile.ext> <file.mp4>
These command lines will produce MPEG-4 QuickTime files with ISO MPEG-4 video and AAC audio. Note that AAC encoding support is external to FFmpeg and must be configured appropriately.
Another compatible format that Apple's QuickTime Player can handle is vanilla MPEG. The command line:

ffmpeg -i <inputfile.ext> <file.mpg>
will create a MPEG file with MPEG-1 video and MP2 audio.

0 comments: