Tag video editing

Add text to a video with FFmpeg

If you want to add text to multiple video files in a bulk operation, FFmpeg is the way to go. You don’t want to manually edit a bunch of videos just to add the same stuff each time. Automation for the win! In this FFmpeg example, we will add some text to this video clip. As you can see, no text yet. We want to add “hard coded” text (that cannot be removed after it is added). We are not talking subtitles/captions. Here is the command, but hold on for a sec… The following command has been made simpler to read by breaking the long command into multiple lines. If you use this command you should remove all ^-symbols, so that everything is displayed in one line. Also don’t miss the spaces in there. This command is made for a Windows environment so it might look a little different if you are on another OS. You can also make the text with a little better position and padding like this: This is the result: Sources: https://superuser.com/questions/939357/ffmpeg-watermark-on-bottom-right-corner

Slow down video with FFmpeg

Here is a quick example on how you can use FFmpeg to slow down a video. Slowed down video by 50%: -vf setpts=2*PTS will slow down the video twice it’s original speed. -filter:a atempo=0.5 slows down the audio to 50%. Unfortunately, the caveat here is that the tempo must be in the range of 0.5 to 2.0. Also, you do not get that slow-motion down pitched sound as many slow-motion videos have. Sources: Speeding up/slowing down video

Merge video files together with FFmpeg

In FFmpeg merging files together is called concatenation. The video files have to have the same codec. Different file containers are allowed though. For the concatenation to work we need to make a list of every file we want to…

Merge audio and video files with FFmpeg

If the video has no audio: If the video already has audio: When you start to manipulate stuff like this you should try to get a basic grasp of FFmpeg streams. The example above is very basic so no need to dig deeper, but if you are editing a video with multiple audio tracks, for example, you should be a little careful. Here is one example if you want to know more.

Downscale video with FFMpeg

Straight to the point this time. Let’s say we want to resize an 8K video to 4K or perhaps a 4k video to HD. To downscale while keeping the aspect ratio use: To set the resolution regardless of aspect ratio…

Convert video to WebM in FFMpeg

What is WebM and why should you use it? To better understand what WebM is you can watch this short video explanation: What is WebM?. The good news is that as of 2018, ​most browsers support VP9. Read more here.…