

Your GRAPH_DESCRIPTION string will need to be of the form: nullsrc,scale=640:360,nullsink For example if your command line is of the form: ffmpeg -i infile -vf scale=640:360 outfile Note that this string must be a complete self-contained graph, with its inputs and outputs explicitly defined. You can then pass the dot description to the dot program (from the graphviz suite of programs) and obtain a graphical representation of the filtergraph.įor example the sequence of commands: echo | \Ĭan be used to create and display an image representing the graph described by the GRAPH_DESCRIPTION string. The graph2dot program included in the FFmpeg tools directory can be used to parse a filtergraph description and issue a corresponding textual representation in the dot language. There exist so-called source filters that do not have an audio/video input, and sink filters that will not have audio/video output. Some filters take in input a list of parameters: they are specified after the filter name and an equal sign, and are separated from each other by a colon. The overlay filter takes in input the first unchanged output of the split filter (which was labelled as ), and overlay on its lower half the output generated by the crop,vflip filterchain. The stream sent to the second output of split, labelled as, is processed through the crop filter, which crops away the lower half part of the video, and then vertically flipped. In the example, the split filter generates two outputs that are associated to the labels and. The points where the linear chains join are labelled by names enclosed in square brackets. In our example, crop,vflip are in one linear chain, split and overlay are separately in another. The result will be that the top half of the video is mirrored onto the bottom half of the output video.įilters in the same linear chain are separated by commas, and distinct linear chains of filters are separated by semicolons. You can use the following command to achieve this: ffmpeg -i INPUT -vf "split crop=iw:ih/2:0:0, vflip overlay=0:H/2" OUTPUT This filtergraph splits the input stream in two streams, then sends one stream through the crop filter and the vflip filter, before merging it back with the other stream by overlaying it on top. To illustrate the sorts of things that are possible, we consider the following filtergraph.

In libavfilter, a filter can have multiple inputs and multiple outputs. Filtering Introductionįiltering in FFmpeg is enabled through the libavfilter library. This document describes filters, sources, and sinks provided by the libavfilter library. allrgb, allyuv, color, colorchart, colorspectrum, haldclutsrc, nullsrc, pal75bars, pal100bars, rgbtestsrc, smptebars, smptehdbars, testsrc, testsrc2, yuvtestsrc.


#Ffmpeg filter yadif windows#
I'm using Windows and batch converting some SD captures that are 544x576, I want to deinterlace them and scale them to show at the proper aspect ratio.
