Thursday, December 8, 2022

Convert VHS mpg files to mp4 to import in DaVinci Resolve

I recently got my hands on a bunch of mpg files ripped from VHS cassettes (32 files spanning 157 GB), and I wanted to edit them with DaVinci Resolve. To my surprise, mpg files are not supported, so I had to convert them. I choose to use FFmpeg and convert them into H.264/MPEG-4 AVC compression format with Advanced Audio Coding (AAC) using the following command:

The command loops through the mpg files in the directory and converts them to mp4 files using the FFmpeg command. The end result was 3.4 times smaller, meaning that a 7.38 GB 2h and 5minute mpg file shrunk into 2.17 GB with the same quality.

Note: If you run into an “Unknown encoder ‘libx264’” issue, you will need to get an FFmpeg executable built with the corresponding flag set during build time. I used a build from gyan.dev.

No comments: