FFmpeg is a free and open-source software project consisting of a suite of libraries and programs for handling video, audio, and other multimedia files and streams.
At its core is the command-line ffmpeg tool itself, designed for processing of video and audio files.
Source: Wikipedia: FFmpeg
...from an Organic Farmer's Market.
ffmpeg [-y] -i INPUT_FILE [PARAMETER] [-f FORMAT] OUTPUT_FILE
-formats
File formats: D. = Demuxing supported .E = Muxing supported
-codecs /
-encoder /
-decoder
Codecs: D..... = Decoding supported .E.... = Encoding supported ..V... = Video codec ..A... = Audio codec ..S... = Subtitle codec ...I.. = Intra frame-only codec ....L. = Lossy compression .....S = Lossless compression
ffmpeg -i INPUT_FILE -c copy -map 0 OUTPUT_FILE
ffprobe -i INPUT_FILE
ffprobe -i INPUT_FILE [-show_format] [-show_streams] [-of ...] [-pretty]
FFprobe Dokumentation
-vn -an -c:v CODEC -c:a CODEC -c copy
ffmpeg -i INPUT_FILE
-c:v ffv1
-c:a pcm_s24le
OUTPUT_FILE
ffmpeg -i INPUT_FILE -c:v ffv1 -c:a pcm_s16le OUTPUT_FILE
-s WIDTHxHEIGHT -aspect X:Y -r FPS
ffmpeg -i INPUT_FILE -an -c:v ffv1 -vf scale=720:-1 OUTPUT_FILE
ffmpeg -i INPUT_FILE -an -c:v ffv1 -aspect 4:3 OUTPUT_FILE
ffmpeg -i INPUT_FILE -an -c:v ffv1 -r 30000/1001 OUTPUT_FILE
-pix_fmt FORMAT -pix_fmt +
Show list: -pix_fmts
By simply setting the output pix_fmt 'as desired':
ffmpeg -i INPUT_FILE -c:v ffv1 -pix_fmt yuv422p OUTPUT_FILE
(Watch out: requires re-encoding!)
-c:a CODEC -ar SAMPLERATE -ac CHANNELS -b:a BITRATE{k,M} -b:v BITRATE{k,M} -minrate BITRATE -maxrate BITRATE -g FRAMES -ss TIME_BEGIN -sseof TIME -t TIME_DURATION -to TIME_END
FFmpeg's "TIME" SYNTAX:
Timecode: [-][HH:]MM:SS[.m]
or
Seconds: [-]S[.m]
ffmpeg -ss TIME_BEGIN -i INPUT_FILE -c copy OUTPUT_FILE
ffmpeg -t TIME_DURATION -i INPUT_FILE -c copy OUTPUT_FILE
ffmpeg -ss TIME_BEGIN -t TIME_DURATION -i INPUT_FILE -c copy OUTPUT_FILE
ffmpeg -ss TIME_BEGIN -to TIME_END -i INPUT_FILE -c copy OUTPUT_FILE
FFV1, which stands for "FF video codec 1", is a lossless intra-frame video codec.
-c:v ffv1 -level {1,3} -coder {0=golomb,1=range} -context {0=small,1=large} -slices {4,6,9,12,16,24,..} -slicecrc {0,1} Quellen: Wikipedia: FFV1, ffv1.info
ffmpeg -i INPUT_FILE
-an
-c:v ffv1
-level 3
-slices 24
-slicecrc 1
"Apple ProRes is a lossy video compression format developed by Apple Inc. for use in post-production"
-c:v {prores,prores_aw,prores_ks} -profile:v {proxy,lt,standard,hq,4444,4444xq} Quellen/Links: Wikipedia: Apple ProRes, FFmpeg docs, Kieran Kunya's Blog, FinalCut docs
ffmpeg -i INPUT_FILE
-an
-c:v prores_ks
-profile:v hq
"x264 H.264/MPEG-4 AVC encoder wrapper. [...]
libx264 supports an impressive number of features, [...]"
-c:v libx264 -b:v BITRATE{k,M} -crf 0
(lossless) - 51
(worst)
-preset:v {ultrafast,superfast,veryfast,faster,fast,medium(*),slow,slower,veryslow}
-tune {film,animation,grain,...}
Quellen/Links: FFmpeg Wiki, FFmpeg docs
ffmpeg -i INPUT_FILE -an -c:v libx264 -preset:v superfast -crf 22
ffmpeg -i input.mp4
-an out/delme_%04d.png
-vn -c:a pcm_s16le out/delme.wav
ffmpeg -r $FPS -start_number $FRAMENO -i out/xxx_%04d.png -i out/xxx.wav
-c:v libx264 -crf 22
-c:a aac -b:a 128k
output.mkv
Der Text dieser Präsentation steht unter einer freien Lizenz zur Verfügung:
Creative Commons "Attribution-ShareAlike"
(CC-BY-SA)
Peter Bubestinger-Steindl
(Peter@ArkThis.com)