wiki:FilteringGuide

Version 1 (modified by llogan, 15 years ago) ( diff )

make initial page and add some examples

FFmpeg has access to many filters and more are added on a regular basis. To see what filters are available with your build see ffmpeg -filters. Refer to the ​libavfilter documentation for more information and examples. This wiki page is for user contributed examples and tips. Contributions to this page are encouraged.

Examples

Scaling
Starting with something simple. Resize a 640x480 input to a 320x240 output.

ffmpeg -i input -vf scale=iw/2:-1 output

iw is input width. In this example the input width is 640. 640/2 = 320. The -1 tells the scale filter to preserve the aspect ratio of the output, so in this example the scale filter will choose a value of 240. See the ​libavfilter documentation for additional information.

Speed up your video
Increase the speed of a 20 minute video to fit 1 minute output. 1 minute / 20 minutes = 0.05.

ffmpeg -i input -vf setpts=0.05*PTS output

Note that this method will drop frames to achieve your desired speed.


Please show a complete command if you would like to add more examples.

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.