[FFmpeg-user] Fw: Unable to get correct decoded file

Hardik Sharma hardik.sharma22 at yahoo.com
Wed May 4 21:33:16 CEST 2011


Hi guys,
Even after using following suggestions my decoded output file is still not correct. Decoded yuv video is with very slow frame rate as compared to original and with gap in between every frame. Please let me know if I am missing anything or any parameter in my command line. For encoding my command line is-
ffmpeg -f rawvideo -r 30 -b 256k -s 352x288 -i silent_cif.yuv -vcodec libx264 -b 256k -s 352x288 -preset slow -f h264 -threads 0 silent264.264 
For decoding- 
ffmpeg -i in.h264 -vcodec rawvideo -f yuv4mpegpipe out.y4m

Thanks,
Hardik Sharma
>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.

----- Forwarded Message -----
From: Hardik Sharma <hardik.sharma22 at yahoo.com>
To: ffmpeg <ffmpeg-user at ffmpeg.org>
Cc: "leo.izen at gmail.com" <leo.izen at gmail.com>
Sent: Sunday, 1 May 2011 1:33 PM
Subject: Fw: Unable to get correct decoded file




Thanks Leo but still I am not getting desired output. My decoded video output is with very slow frame rate (even after mentioning frame rate as 30fps) and there is some problem in video frames as per appearance concern. It's different from the input yuv video even without much loss.

Please tell me if I should include more format option while encoding or decoding video sequence. I really appreciate your help. Thanks.

Regards,
Hardik Sharma     

--- On Sat, 30/4/11, Hardik Sharma <hardik.sharma22 at yahoo.com> wrote:


>From: Hardik Sharma <hardik.sharma22 at yahoo.com>
>Subject: Unable to get correct decoded file
>To: "ffmpeg" <ffmpeg-user at ffmpeg.org>
>Date: Saturday, 30 April, 2011, 12:16
 AM
>
>
>Hi,
>
>I am a new bee with Ubuntu and ffmpeg both so please help me with this issue. I encoded the yuv video to h264 by following command-  
> ffmpeg -f rawvideo -r 30 -b 256k -s 352x288 -i silent_cif.yuv -vcodec libx264 -b 256k -s 352x288 -preset slow -f h264 -threads 0 silent264.h264
>
>But I don't think I am getting correct encoded file as after decoding 
back to yuv video, I am only getting 2 frames and that too wrong frames. 
>
>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
>
>Please tell me my mistake in command line. I really appreciate your help. Thanks.
>
>Regards,
>Hardik Sharma  
>
>  


More information about the ffmpeg-user mailing list