[FFmpeg-user] Unable to get correct decoded file

Leo Izen leo.izen at gmail.com
Sat Apr 30 02:47:28 CEST 2011


On Fri, Apr 29, 2011 at 8:16 PM, Hardik Sharma <hardik.sharma22 at yahoo.com>wrote:

>
> Command line for decoding-
>
>  ffmpeg -r 30 -b 256k -s 352x288 -i output.h264 -vcodec libx264 -b 256k
> -s 352x288 -preset slow -f rawvideo -threads 0 slient.yuv
>

You should use -vcodec rawvideo for decoding. I also suggest this:

Your full command line for decoding should be this:

ffmpeg -i in.h264 -vcodec rawvideo -f yuv4mpegpipe out.y4m

I have removed most unnecessary options, but left some to show a point.

Generally you should store rawvideo that is in some yuv pixel format in the
yuv4mpegpipe (y4m) container, as it is simply a wrapper for the video, but
has data like size and frame rate, so the user of the program reading it
doesn't have to specify this data. Note: this only stores these pixel
formats: yuv444p, yuv422p, yuv420p, yuv411p and gray. y4m files also can't
contain audio, or any non-raw video. But it is very useful for video.


More information about the ffmpeg-user mailing list