[FFmpeg-user] extract one color channel frames

Rik Verdonck rik.verdonck at bio.kuleuven.be
Wed Jan 20 11:32:43 CET 2016

Dear ffmpeg users,

I'm working on an image analysis project and I need to convert an .avi movie into a series of frames. I know I can do this with the following command:

ffmpeg -i  inmovie.avi ./somedirectory/picture%d.jpg

Works well. No problem.
Now, I actually only need the red channel of my images for downstream analysis, and I want the images to be as small as possible without losing resolution (for downstream analysis speed). This is where my knowledge about image and movie formats becomes a bit wobbly. Is there a way I can let ffmpeg output files that are essentially just a matrix of red values in 8 bit encoding? I guess the answer lies in some kind of color-to-greyscale conversion where the single channel in grayscale is just a copy of the red channel of the original frame. Any suggestions for ffmpeg code that would do this at once?

Many thanks!

More information about the ffmpeg-user mailing list