I want to extract all video frames as images and change every black (pure black) pixel of the images to a special color. (R=3,G=3,B=3)

I used this command to extract video frames :

ffmpeg -I myVideo.avi -f image2 -vf yadif -vcodec png image%d

Please tell me how to change every black pixel of the images to color that I want? (I want R=3,G=3,B=3)


1 Answer 1


You can use the LUT or GEQ filters for this.

e.g. with LUT

ffmpeg -i myVideo.avi
  • That code looks like it doesn't do as asked. For example a pixel with 0, 100, 0 is changed to 3, 100, 3
    – pete
    Jun 1, 2023 at 1:39

Your Answer

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

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