Skip to content

Tag Archives: FFmpeg

(FFmpeg) How to Generate a Color Palette From a Video and apply it to another?

21-May-20

Ever look at a video with an amazing color grading and wish you could copy it? Getting that look can be accomplished using the palettegen filter. palettegen generates a single palette for an entire video stream and saves it as an image file.  In this example, a color palette of 256 pixels is generated, as […]

(FFmpeg) How to Remove All Colors Except One From a Video?

13-May-20

FFmpeg has a filter called colorhold with documentation that states: Remove all color information for all RGB colors except for [a] certain one. This is incorrect, colorhold does not work this way… well not exactly. It removes colors but it’s completely unpredictable.  For example, in input.mp4 there are two blue bars on the train. If […]

(FFmpeg) How to Apply a Vignette to a Video?

13-May-20

A vignette is a fade that is added to the edges of an input. It’s a simple way to add atmosphere or emulate vintage television sets.  A vignette can be added without additional parameters as seen in figure 62.0: The vignette filter also has an angle parameter to adjust the angle of the fade. Below […]

(FFmpeg) How to RGB Shift a Video?

04-May-20

RBG shifting is one of the coolest and easiest effects for emulating 3D or add that Vaporwave Aesthetics. With rgbashift, the RGBA pixels can freely shift horizontally and/or vertically. In this example, a red horizontal shift is applied to create red/blue 3D, as seen in figure 61.0: In this example, a blue horizontal shift is […]

(FFmpeg) How to Invert the Colors of a Video?

29-Apr-20

FFmpeg has a very simple filter, negate, that inverts the colors of the input. The train station looks really futuristic with this filter on. Although this filter is simplistic in use, it has a great effect, below is the command as seen in figure 60.0:

(FFmpeg) How to Edit the Saturation of a Video?

29-Apr-20

Although the hue filter has a saturation variable, FFmpeg also has another filter called vibrance which is used to adjust the color intensity. Both filters give slightly different saturation effects but each has its place. In this example, all colors are boosted in the video, as seen in figure 59.0: A specific color can also […]

(FFmpeg) How to extract screenshots from multiple parts of a video (one-liner)?

28-Apr-20

This question was asked on the FFmpeg Discord. For some reason the person pinged me to answer it so I took a stab at it. Here was the request: @jdriselvato Hey, I’ve got a question if something is even possible. I want to do. but for multiple seek times and output names (those I guess […]

(FFmpeg) How to Convert a Video to Black and White?

27-Apr-20

Turning a video to black and white is also accomplished by using the hue filter.  Setting the saturation value to 0 results in a black and white video, as seen in figure 58.0: Challenge: In addition to changing the video to black and white, add a grain filter to make the video look vintage.

(FFmpeg) How to Edit the Hue of a Video?

27-Apr-20

The hue filter allows for modification of the hue and saturation of a video.  In the example below, the hue is set to 45 degrees with an increased saturation, as seen in figure 57.0: The hue filter also has framing and time parameters that allow for great effects like animating through hue colors quickly. Expressions […]

(FFmpeg) How to Add Color Balance to a Video?

24-Apr-20

The color balance filter allows the RGB shadows, midtones, highlights and preserving lightness can be adjusted. This filter can be used to apply very custom color grading or used to create trippy color changes.  In this example, the green shadows are increase and the blue highlights are maxed out, as seen in figure 56.0: Tip: […]