FFmpeg filter Overview

Source: Internet
Author: User

FFmpeg filter Overview

The filter function in FFmpeg is implemented through the libavfilter library.

In libavfilter, a filter can have multiple inputs or outputs. To illustrate possible scenarios, let's take a look at the following.

, Input streams are circulated through split and copied to two streams ([main], [TMP]). Then, one of them is filtered by crop and vflip, and superimposed with another stream before merging. You can use the following command to achieve this goal:

ffmpeg -i INPUT -vf "split [main][tmp]; [tmp] crop=iw:ih/2:0:0, vflip [flip]; [main][flip] overlay=0:H/2" OUTPUT

After this command is executed, the video image becomes the image of the upper half. For example:

Filters of the same linear chain are separated by commas, while unused linear chains are separated by semicolons.

In the preceding example, crop and vflip are in the same linear chain, while split and overlay are separated from each other.

Labels are used at the intersection of linear chains and are identified by square brackets.

In the preceding example, the split filter generates two outputs, which are identified by the [main] tag and [TMP] tag. The stream named [TMP] is first processed by crop, cut down half of the image, and then flip the image through vflip. Overlay overlays the stream labeled as [flip] (processed by crop and vflip) into the lower half of the unprocessed stream [main.

Some filters enter a parameter list: they specify the name of the filter and an equal sign, which are separated by colons.

There is a so-called source filter, there is no audio/video input, and the sink filter has no audio/video output.

FFmpeg filter Overview

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.