[FFmpeg-user] Blue images from raw capture

Yan Seiner yan at seiner.com
Tue Nov 20 03:43:31 CET 2012


Carl Eugen Hoyos wrote:
> Yan Seiner <yan <at> seiner.com> writes:
>
>   
>> ffmpeg -f rawvideo -pix_fmt yuyv422 -s $SIZE 
>> -i /tmp/video.raw -vf yadif -f image2 /tmp/road%02d.png
>>
>> ffmpeg version 0.11.2
>>     
>
> This is old.
>   
It's the newest I can get to compile on my MIPS box and run.  :-(


> Since the png encoder does not support yuyv422, you 
> have to give a hint which colourspace it should use.
> (But that is not necessarily related to "blue", why 
> do you think that the v4l2 input is yuyv422? 
> Consider trying uyvy.)
>   
I tried a bunch of different pix_fmts.  All looked wrong, but ffmpeg 1.0 
gave me an idea....

Here's the "correct" version that works for me:

ffmpeg -f video4linux2 -s $SIZE -i /dev/video0 -vframes $NFRAMES -f 
rawvideo /tmp/video.raw
ffmpeg -f rawvideo -pix_fmt yuyv422 -s $SIZE -i /tmp/video.raw -f image2 
-pix_fmt rgb24 /tmp/road%02d.png

At least this version of ffmpeg wants you to specify both input and 
output pixel formats to work right.


More information about the ffmpeg-user mailing list