Mass-Convert Videofiles Script
May 5, 2024
I worked as an "Onsite Administrator" at a congress for my company, where we were responsible for presentation management and producing video recordings and webcasts of the event’s presentations.
After the first day of presentations, we realized we had made a significant mistake: all videos and webcasts were recorded "zoomed out," showing unintended content around the desired content. We were faced with two options:
- The first option was to manually edit over 120 videos, zooming in and re-exporting each one. This would have required multiple people working for at least an entire day. Additionally, the re-rendering process could have introduced compression artifacts, potentially harming the output quality.
- The second option was to write a script to automate the process using FFmpeg. FFmpeg’s compression is minimal, and once the script was set up, it would only depend on computing power, requiring no additional manual effort.
So after the congress day was over, I sat down and started experimenting with FFmpeg to find the right settings. After three hours of testing, I successfully created a PowerShell script that iterated over all files in a folder, applied the necessary zoom adjustments, and exported them to a new folder while maintaining the original filenames.
The script ran throughout the night, and by morning, all the videos were converted and ready for upload. This approach saved us a tremendous amount of time and ensured the final videos maintained their quality.