How to get an excerpt from a video with FFmpeg.

Extracting an excerpt from a video is very useful, this is how to do it. The command below extracts an excerpt from a video at 00:00:05 to 00:00:15. This is scaled to 640×360 pixels and is good quality. ┌──[[email protected]]─[~/Videos] └──╼ ╼ $ ffmpeg -v 1 -i agropromfun.mp4 -ss 00:00:05 -to…

Read More

How to best encode a video for Youtube on Linux.

This simple one-liner will encode a video to a format suitable for Youtube. 4.4 Tue Sep 04 jason@Yog-Sothoth 0: $ ffmpeg -i scorcher.avi -codec:v libx264 -crf 21 -bf 2 -flags +cgop -pix_fmt yuv420p -codec:a aac -strict -2 -b:a 384k -r:a 48000 -movflags faststart scorcher.mp4 This gives good quality output whilst…

Read More

How to encode a video to webm format and use it as a GIF replacement.

This is how to encode a video to webm format without sound to create a GIF replacement. The ffmpeg utility allows encoding a video in different formats. This is the perfect command for encoding a good quality webm video. ffmpeg -i gzdoom_2012_11_04_20_34_10_391.avi -ss 00:01:00.000 -to 00:01:20.000 \ -codec:v libvpx -quality…

Read More