0

I have a short screen recording of an old video game (duration 1:38.72, 2468 frames, 25 fps, 320×200 px, 4 colours only, bgr24, CamStudio Lossless Codec, no sound, AVI).

The video contains an incorrect area (static, 16×16 px, top left corner at [136, 144]) in a range of frames (starting at 0:43.88 and ending at 1:38.44).

I'd like to replace that area in that range with correct data, everything losslessly.

I searched for "replace area in range of frames" on this server but didn't find anything.

Would you know how to do that with free software on Windows please? Maybe FFmpeg?

2 Answers 2

0

I don't know if FFmpeg supports the Camstudio Lossless Codec, but if it would. Then replacing the area with a PNG file (hence: adding a logo) could be a solution.

The explanation is done here at "Timing the overlay". https://superuser.com/questions/683643/how-to-add-my-logo-for-the-first-30-seconds-in-a-video-with-ffmpeg

In that example codec:a copy was already given (for audio). If you would take any lossless videocodec the result will be lossless.

3
  • I'm surprised the overlay filter processing does not take place at RGB or YUV444. Great catch.
    – Skinkie
    May 4, 2021 at 10:07
  • Thanks for pointing me to overlays, Skinkie! I've checked Low power's answer at ffmpeg - how to apply filters without losing quality and overlays in FFmpeg documentation. The command that will do the magic is: ffmpeg -hide_banner -i input.avi -i patch.png -filter_complex "[0:v][1:v]overlay=136:144:enable=between(t\,43.88\,98.44):format=auto" -f yuv4mpegpipe -pix_fmt yuv444p output.y4m May 5, 2021 at 6:44
  • OK, it's not exactly lossless because the color space conversion from bgr24 to yuv444 alters the colors slightly. But I still internally consider it lossless because no artifacts are introduced and the output still has exactly 4 colors. :-) May 6, 2021 at 5:32
0

I would use Davinci Resolve to do this. It is free, runs on windows, and has great object removal tools.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.