HackerTrans
TopNewTrendsCommentsPastAskShowJobs

HackHawk

no profile record

comments

HackHawk
·il y a 2 ans·discuss
Lots, but my favourite is a caption remover. I found a film I wanted to watch, the audio was in English, but there were Greek captions spread over the bottom quarter of the screen.

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