1 karma · joined Jul 7, 2024 (2y ago) · 1 submissions
comment 2y ago · link · parent
- Split the mp4 up into pngs (better quality than jpgs) with ffmpeg.
- Process each png, filling the white caption areas with data from the nearest non-caption pixels.
- Join the pngs back to an mp4 (ffmpeg).
- Get the original audio with ffmpeg and merge it into the mp4, ffmpeg again.
The actual processing was with C# on Windows because that's home turf for me.
Lessons:
1) You need a lot of space for 200,000 decent quality .pngs
2) You need to be prepared to wait a few hours for the process to run
3) ffmpeg is blooming marvelous. https://ffmpeg.org.
I probably spent 20 hours on it, maybe more. I don't use it at all now, it was a one-off solution, but I occasionally see a video and think "I could run my app on that ... "