2

My camera recently ran through some trouble and now my sensor chip has four dead pixels, spread across the screen. (Yes, it's actually the censor, I've quadruple checked. It's not the screen.) So there are some dead pixels on all my footage now.

If it matters, my footage is in the following format

Resolution: 1920x1090
Frame rate: 29.970030
Codec: H264 - MPEG-4 AVC (part 10) (avc1)
Decoded format: Planar 4:2:0 YUV full scale

Is there any known approach to removing these?

(I was thinking of some sort of program to which I manually pass the positions of the dead pixels and it then replaces them by an average of the surrounding pixels. Some ffmpeg filter maybe?)

2 Answers 2

3

You can use the delogo filter with ffmpeg or ffplay. Instead of re-encoding, you can just filter upon playback:

enter image description hereenter image description here
Before and after delogo.

Example: playback

ffplay -vf \
"delogo=x=10:y=120:w=1:h=1, \
 delogo=x=862:y=438:w=1:h=1, \
 delogo=x=56:y=207:w=1:h=1, \
 delogo=x=1259:y=943:w=1:h=1" \
input.mp4

Example: encoding

ffmpeg -i input.mp4 -vf \
"delogo=x=10:y=120:w=1:h=1, \
 delogo=x=862:y=438:w=1:h=1, \
 delogo=x=56:y=207:w=1:h=1, \
 delogo=x=1259:y=943:w=1:h=1" \
-c:a copy cleaned-output.mp4
  • Results may vary, and I did not investigate why delogo caused a slight washed out look in my example.

  • You can extract an image from the video (ffmpeg -i input -ss 5 -vframes 1 output.png) and import it into the GIMP to find the pixel x,y locations.

1
  • +1 for the GIMP idea, that helps a lot. With the given Footage I did not experience any washout either. Dec 8, 2015 at 21:37
1

At a glance, I think you can use avidemux with a "delogo" filter. Though with the pixels far apart, you'll need multiple runs, and there might be better options.

1
  • Great suggestion with the delogo but @LordNeckbeard's solution (with ffmpeg instead of avidemux) is more suitable for me because I can filter multiple points at the same time and it's scriptable, so I can run it on a all of my footage automatically. Dec 8, 2015 at 21:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .