ffmpeg – marking frames – Video Production Stack Exchange

I use this command to mark each frame with a green mark:

ffmpeg -i “F:\Avatar\film3\film.mp4” -vf “drawbox=x=0:y=0:w=5:h=3:color=green:t=fill” “F:\Avatar\film3\output_with_markers3.mov”

Please, tell me, how can I make a similar marking, but only for each even frame? Odd frames must remain unmarked.

I tried to do this:

ffmpeg -i “F:\Avatar\film3\film.mp4” -vf “select=”(mod(n,2))”, drawbox=x=0:y=0:w=5:h=3:color=red:t=fill” “F:\Avatar\film3\output_with_markers3.mov”

But the unmarked frames do not remain in the final video.

Read more here: Source link