1

I am looking for a possibility to remove the flickering from LEDs on a video under Linux on the commandline. To do that one would have to

  • Put the video on one track
  • Put the same video on a second track with 1-2 frames delay
  • Overlay the second track with 50% transparency
  • Use the audio from one of the tracks

Thanks a lot in advance!

1

You would carry that out, like this:

ffmpeg -i in.mp4 -filter_complex \
  "[0]split=2[base][shifted]; \
   [shifted]setpts=PTS+1/TB/FRAME_RATE,format=yuva444p,colorchannelmixer=aa=0.50[shifted]; \
   [base][shifted]overlay"   out.mp4

setpts=PTS+1/TB/FRAME_RATE delays the overlay by 1 frame. Change the 1 to adjust delay.

format=yuva444p makes sure there's an alpha channel.

colorchannelmixer=aa=0.50 sets the alpha to 50%.

I haven't specified any encoding parameters, so the defaults will be used.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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