ffmpeg reads from an arbitrary number of input "files" (which can be regular files, pipes, network streams, grabbing devices, etc.), specified by the -i option, i.e., and writes to an arbitrary number of output "files", which are specified by a plain output file name. Anything found on the command line which cannot be interpreted as an option is considered to be an output file name.
FFmpeg Windows Builds are available at Zeranoe FFmpeg Builds.
The syntax is
ffmpeg [[infile options][`-i' infile]]... {[outfile options] outfile}...
Therefore ffmpeg can be used for video/audio stream demuxing (splitting) and muxing (recombining).
For example, get the video only and audio only from a file:
- Video: ffmpeg -i test.avi -vcodec copy -f h264 test.264
- Audio: ffmpeg -i test.avi -acodec copy -f s16le test.pcm, assuming pcm_s16le is applied when audio stream is captured. pcm_s16le is a common file format when TI DSP is used
Or one command line does it all:
ffmpeg -i test.avi -acodec copy -f s16le test.pcm -vcodec copy -f h264 test.264
If we want to recombine the audio and video files to one file
ffmpeg -i test.264 -i test.pcm -vcodec copy -acodec copy -f avi test.avi
The following video and audio codecs are supported with ffmpeg:
video codecs
Video codec name | Description |
---|---|
mjpeg | Motion JPEG |
ljpeg | lossless JPEG |
jpegls | JPEG LS |
targa | Targa image |
gif | GIF image |
bmp | BMP image |
png | PNG image |
h261 | H.261 |
h263 | H.263 |
h263p | H.263+ |
mpeg4 | ISO standard MPEG-4 (DivX, Xvid compatible) |
msmpeg4 | pre-standard MPEG-4 variant by MS, v3 (AKA DivX3) |
msmpeg4v2 | pre-standard MPEG-4 by MS, v2 (used in old ASF files) |
wmv1 | Windows Media Video, version 1 (AKA WMV7) |
wmv2 | Windows Media Video, version 2 (AKA WMV8) |
rv10 | RealVideo 1.0 |
rv20 | RealVideo 2.0 |
mpeg1video | MPEG-1 video |
mpeg2video | MPEG-2 video |
huffyuv | lossless compression |
ffvhuff | FFmpeg modified huffyuv lossless |
asv1 | ASUS Video v1 |
asv2 | ASUS Video v2 |
ffv1 | FFmpeg's lossless video codec |
svq1 | Sorenson video 1 |
flv | Sorenson H.263 used in Flash Video |
flashsv | Flash Screen Video |
dvvideo | Sony Digital Video |
snow | FFmpeg's experimental wavelet-based codec |
zmbv | Zip Motion Blocks Video |
dnxhd | AVID DNxHD |
audio codecs
Audio codec name | Description |
---|---|
ac3 | Dolby Digital (AC-3) |
adpcm_* | Adaptive PCM formats - see supplementary table |
flac | Free Lossless Audio Codec (FLAC) |
g726 | G.726 ADPCM |
libfaac | Advanced Audio Coding (AAC) - using FAAC |
libgsm | ETSI GSM 06.10 full rate |
libgsm_ms | Microsoft GSM |
libmp3lame | MPEG-1 audio layer 3 (MP3) - using LAME |
mp2 | MPEG-1 audio layer 2 (MP2) |
pcm_* | PCM formats - see supplementary table |
roq_dpcm | Id Software RoQ DPCM |
sonic | experimental FFmpeg lossy codec |
sonicls | experimental FFmpeg lossless codec |
vorbis | Vorbis |
wmav1 | Windows Media Audio v1 |
wmav2 | Windows Media Audio v2 |
PCM/ADPCM format supplementary table
PCM/ADPCM codec name | Description |
---|---|
pcm_s32le | signed 32-bit little-endian |
pcm_s32be | signed 32-bit big-endian |
pcm_u32le | unsigned 32-bit little-endian |
pcm_u32be | unsigned 32-bit big-endian |
pcm_s24le | signed 24-bit little-endian |
pcm_s24be | signed 24-bit big-endian |
pcm_u24le | unsigned 24-bit little-endian |
pcm_u24be | unsigned 24-bit big-endian |
pcm_s16le | signed 16-bit little-endian |
pcm_s16be | signed 16-bit big-endian |
pcm_u16le | unsigned 16-bit little-endian |
pcm_u16be | unsigned 16-bit big-endian |
pcm_s8 | signed 8-bit |
pcm_u8 | unsigned 8-bit |
pcm_alaw | G.711 A-LAW |
pcm_mulaw | G.711 μ-LAW |
pcm_s24daud | signed 24-bit D-Cinema Audio format |
pcm_zork | Activision Zork Nemesis |
adpcm_ima_qt | Apple QuickTime |
adpcm_ima_wav | Microsoft/IBM WAVE |
adpcm_ima_dk3 | Duck DK3 |
adpcm_ima_dk4 | Duck DK4 |
adpcm_ima_ws | Westwood Studios |
adpcm_ima_smjpeg | SDL Motion JPEG |
adpcm_ms | Microsoft |
adpcm_4xm | 4X Technologies |
adpcm_xa | Phillips Yellow Book CD-ROM eXtended Architecture |
adpcm_ea | Electronic Arts |
adpcm_ct | Creative 16->4-bit |
adpcm_swf | Adobe Shockwave Flash |
adpcm_yamaha | Yamaha |
adpcm_sbpro_4 | Creative VOC SoundBlaster Pro 8->4-bit |
adpcm_sbpro_3 | Creative VOC SoundBlaster Pro 8->2.6-bit |
adpcm_sbpro_2 | Creative VOC SoundBlaster Pro 8->2-bit |
adpcm_thp | Nintendo GameCube FMV THP |
adpcm_adx | Sega/CRI ADX |
No comments:
Post a Comment