use FFMpeg to send BMPs to stdout

I see lots of examples using FFMpeg to make a video file from a set of images. I can also see how to do the opposite if I want individual files. However, I want the images to be pushed to stdout. This line fails:

ffmpeg -hwaccel auto -i Wildlife.wmv -pix_fmt bgr24 -an -sn -f bmp - > junk.bin

It says "Requested output format 'bmp' is not a suitable output format". However, this line works fine to generate image files:

ffmpeg -hwaccel auto -i Wildlife.wmv -pix_fmt bgr24 -an -sn test%03d.bmp

How can I get images pushed to stdout?


Solution 1:

The problem is that in ffmpeg, BMP is not a file format. It's an encoder (as seen under ffmpeg -encoders). Normal BMP files can be written with the image2 muxer, but if you only want the raw video codec, you need the rawvideo format.

So, use something like this:

ffmpeg -i input.wmv -c:v bmp -f rawvideo -an - > output.bin