For generating raw images from every second of an input video,when i use the below command:<br><br>ffmpeg -i c:\test\animals.wmv -r 1 -f image2 -vcodec rawvideo -pix_fmt yuvj420p c:\test\Img-%03d.yuv<br><br> for every second of the video the ffmpeg generate two types of files:<br>
Img---.yuU  and Img---.yuv<br>And when i open the yuv file(with Irfanview), the 1/4th of the top part of the image has been chopped and filled with smooth green colour. The rest colour theme of the whole picture is also in green scale. (I use Irfanview /open raw and enter height and width and 24 BPP and yuv 420.<br>
<br>but without -vcodec rawvideo ffmpeg generate only Img---.yuv files. But this file can not be opened as raw files and actually are jpg with yuv extension.( As you told it is because the default of image2 which is jpg)<br>
<br>BTW how can i see the different switches of -vcodec? (ffmpeg -vcodec list does not show any list)<br><br><br><br>
<br><br><div class="gmail_quote">On Tue, Jun 28, 2011 at 7:14 PM, Alex Cohn <span dir="ltr"><<a href="mailto:alexcohn@netvision.net.il">alexcohn@netvision.net.il</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Amir,<br>
<div class="im"><br>
> 1- i convert a video to yuv images (1 image per second) as below:<br>
> ffmpeg -i c:\test\animals.wmv -r 1 -f image2 -s 320x240 -pix_fmt yuvj420p c:\test\Img-%03d.yuv<br>
<br>
</div>By default, -f image2 produces JPEG files. You should use -vcodec<br>
rawvideo to produce yuv420 images, e.g.<br>
<br>
ffmpeg -i c:\test\animals.wmv -r 1 -f image2 -vcodec rawvideo -pix_fmt<br>
<div class="im">yuvj420p c:\test\Img-%03d.yuv<br>
<br>
</div>Note that you can skip -s if you do not resize the result.<br>
<br>
Sincerely,<br>
<font color="#888888">Alex<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div>Amir H. Rouhi</div>
<div>PhD Student/ CSIT RMIT University</div>
<div>Room: 14-09-04</div>
<div><a href="mailto:rouhi_amirhossein@student.rmit.edu.au" target="_blank">rouhi_amirhossein@student.rmit.edu.au</a></div>
<div><a href="mailto:amir.rouhi@rmit.edu.au" target="_blank">amir.rouhi@rmit.edu.au</a></div>
<div> </div><br>