Skip to content

Tag Archives: FFmpeg

(FFmpeg) How to Use Green Screen to Mask a Video Into Another Video?

23-Apr-20

The use of a green screen is the most common way to add a subject to a scene in video production. By setting the scene at the purest green (not commonly found in nature) objects can interact on the green screen while computer generation can replace a new image in the background. With FFmpeg, this […]

“FFmpeg For Beginners” is now on Amazon! (Paperback & Ebook)

22-Apr-20

Today I am extremely excited to announce that “FFmpeg For Beginners” is now on Amazon. Cover over 112 different concepts, this is the ultimate FFmpeg programmers guide for users at any level. Readers at the novice level can gracefully learn FFmpeg and become upper-intermediate in no time. Soon you’ll be able to edit audio and […]

(FFmpeg) How to Blend Two Videos Together?

22-Apr-20

Blending has an interesting effect when two inputs are used. The blend filter has the potential to create outstanding artistic results, so let’s try it out.  Tip: In order to blend two files, they must contain the same resolution. blending two videos In this example, using the difference filter applied to both video inputs gives […]

(FFmpeg) How to Concatenate Multiple Videos?

20-Apr-20

Using concat with a txt file has one catch, all the MP4s must have the exact codec, framerate, resolution, etc. An example text file is shown below (file.txt):  Then run the following command to load the txt file to create a single file from the list: But how can you join multiple MP4 files that […]

(FFmpeg) How to Loop a Section of Video Multiple Times?

20-Apr-20

Looping a section of a video can be useful for presentations or advanced video editing. In this example the input.mp4 is a 5 minute long video with the requirement that after the 1 minute mark, the video will loop 10 times. In the requirements for this example, it was stated after the 1 minute mark […]

(FFmpeg) How to add a motion blur to a video?

18-Apr-20

I saw this question on Reddit and started messing with the effects recommended and totally liked the effect seen in the video below: Here’s the full script using the tmix filter: What you’ll notice here is the more frames you set the more motion effect is applied. The weights must equal the same number of […]

(FFmpeg) How to Splice a Video into Segments?

18-Apr-20

Splicing a video (or dividing a video into multiple segments) is a common way to break large files into smaller parts. This is commonly found in streaming but can also be used to break up a video into smaller clips.  Here is a basic example where the input is a 20 second clip with the […]

(FFmpeg) How to Trim ‘x’ Seconds From the Start and End of a Video?

17-Apr-20

The last two questions covered trimming the start of a video and trimming the end of a video, but what does the command look like combined?  In this example, the input file is 5 minutes long with the requirement of 15 seconds to be removed from the start and 1 minute to be removed from […]

(FFmpeg) How to Trim ‘x’ Seconds From the End of a Video?

17-Apr-20

Trimming a couple of seconds, minutes or hours off the end of a video is easy but again requires a different understanding of time in FFmpeg. Trimming from the end of an MP4 uses the argument -t or duration with no seeking. Tip: The duration must be set before the input else FFmpeg applies the […]

(FFmpeg) How to Trim ‘x’ Seconds From the Start of a Video?

17-Apr-20

Trimming a few seconds, minutes or hours from a video is simple but requires an understanding of the seeking and duration options. In this example, the input file is 5 minutes long with a 15 second introduction that needs to be removed. It’s important to identify these two numbers because trimming requires tricky subtraction. Let’s […]