I have a task to label video frames. I need to mark all odd frames of a video with green pixels and even ones with red pixels. I do this in two steps:
ffmpeg -i video.mp4 -filter_complex "drawbox=x=0:y=0:w=5:h=3:color=#ff0000:t=fill:enable='not(mod(n,2))'" green.mp4
ffmpeg -i green.mp4 -filter_complex "drawbox=x=0:y=0:w=5:h=3:color=#00ff00:t=fill:enable='mod(n,2)'" greenred.mp4
Can you please tell me how to combine this into one step?