Month October 2018

Convert subtitles from the command line with SubtitleEdit

We can use SubtitleEdit from the command line in Windows to do batch operations on subtitle files. Just install SubtitleEdit first. If you are using the portable version, make sure you put the exe in PATH. Example: Convert TTML to SRT: It’s even easier in a Directory Opus button. Just make sure it is set to run as MS-DOS Batch function: Output: Becomes this:

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

Rotate videos with FFmpeg

This post is outdated. If you are using a newer version of FFmpeg you should use display_rotation instead. Read more here: There are actually two ways you can rotate videos with FFmpeg: If you can, you should always change…

Convert audio to visualization video

FFmpeg has a bunch of really cool filters you can use to turn audio into visualizations. Showvolume is my favorite as it shows volume changes in real-time, but the others are great too depending on use case. avectorscope showcqt ahistogram aphasemeter showfreqs showspectrum showwaves showvolume

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.…