I recorded lectures using OBS and uploaded them to Youtube. Later I found that the recorded videos flicker and show the underlying desktop image. The flickering really disturbs but it would be a huge effort to record everything from scratch.
I can extract the unwanted image from the video. Is there a way to identify this image (or parts of it) in the recorded videos and remove them? Or somehow reduce the flickering?
Here is an example of a flickering video.
I'm not very good with ffmpeg. I've tried to reduce the flicker with this
ffmpeg -i in.mp4 -vf "tblend=average,framestep=2,setpts=1*PTS" -r 10 out.mp4
It reduces the disco effect but leaves heavy shadows of the background image.
I also tried to identify the corrupted frames with something like this
ffmpeg -i in.mp4 -r 1 -loop 1 -i background.png -filter_complex "blend=difference:shortest=1,blackframe=30:20" -f null -
but I'm not sure if it is the right approach and how to continue from this.
I believe that my command reports the frames that match the image. I thought that it would be possible to replace those frames with white and then use blending to fill in the missing bits. Ideally I'd like to do all that with a single command. Any help is much appreciated!
question from:
https://stackoverflow.com/questions/65880623/how-to-remove-a-flickering-background-image-from-a-video-using-ffmpeg 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…