Difference between revisions of "FFMPEG Commands"

From Hawk Wiki
Jump to: navigation, search
Line 1: Line 1:
==Extracting images (jpeg) from a video:==<br>
+
=== Extracting images (jpeg) from a video: ===
 
ffmpeg -i foo.avi -f image2 f%03d.jpg<br>
 
ffmpeg -i foo.avi -f image2 f%03d.jpg<br>
ffmpeg convert to photo-jpeg<br>
+
----
 +
=== ffmpeg convert to photo-jpeg ===
 
ffmpeg -i input.mov -pix_fmt yuv420p -vcodec mjpeg -qscale 1 output.mov<br>
 
ffmpeg -i input.mov -pix_fmt yuv420p -vcodec mjpeg -qscale 1 output.mov<br>
 
ffmpeg -i f%03d.jpg -pix_fmt yuv420p -vcodec mjpeg -qscale 1 output.mov<br>
 
ffmpeg -i f%03d.jpg -pix_fmt yuv420p -vcodec mjpeg -qscale 1 output.mov<br>
==Add water mark==<br>
+
----
ffmpeg -i image.%04d.jpg -vcodec libx264 -b 15M -f mov -g 30 -bf 3 -b_strategy 1 -coder 1 -qmin 20 -qmax 51 -sc_threshold 40 -flags +loop -cmp +chroma -me_range 16 -me_method hex -subq 5 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -directpred 1 -flags2 +fastpskip -dts_delta_threshold 1 -acodec libfaac -ab 192k -y -vfilters "movie=0:png:o.png, scale=1280x720 [wm];[in][wm] overlay=0:0:1 [out]" -s 1280x720 output_watermark.mov
+
=== Add water mark & H264 output===
 +
ffmpeg -i image.%04d.jpg -vcodec libx264 -b 15M -f mov -g 30 -bf 3 -b_strategy 1 -coder 1 -qmin 20 -qmax 51 -sc_threshold 40 -flags +loop -cmp +chroma -me_range 16 -me_method hex -subq 5 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -directpred 1 -flags2 +fastpskip -dts_delta_threshold 1 -acodec libfaac -ab 192k -y -vf "movie=0:png:o.png, scale=1280x720 [wm];[in][wm] overlay=0:0:1 [out]" -s 1280x720 output_watermark.mov

Revision as of 16:53, 3 August 2011

Extracting images (jpeg) from a video:

ffmpeg -i foo.avi -f image2 f%03d.jpg


ffmpeg convert to photo-jpeg

ffmpeg -i input.mov -pix_fmt yuv420p -vcodec mjpeg -qscale 1 output.mov
ffmpeg -i f%03d.jpg -pix_fmt yuv420p -vcodec mjpeg -qscale 1 output.mov


Add water mark & H264 output

ffmpeg -i image.%04d.jpg -vcodec libx264 -b 15M -f mov -g 30 -bf 3 -b_strategy 1 -coder 1 -qmin 20 -qmax 51 -sc_threshold 40 -flags +loop -cmp +chroma -me_range 16 -me_method hex -subq 5 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -directpred 1 -flags2 +fastpskip -dts_delta_threshold 1 -acodec libfaac -ab 192k -y -vf "movie=0:png:o.png, scale=1280x720 [wm];[in][wm] overlay=0:0:1 [out]" -s 1280x720 output_watermark.mov