Log in

View Full Version : Encoding a YUV file


neoragexxx
17th June 2011, 12:14
Hello,

I am trying to encode using the command

ffmpeg -s cif -r 30 -b 64000 -bt 3200 -g 30 -i foreman_cif.yuv -vf "format=yuv420p" -vcodec mpeg4 foreman_cif.m4v

but i get the errors:

[rawvideo @ 0xa3b7720] Pixel format was not specified and cannot be detected
[rawvideo @ 0xa3b5b60] Could not find codec parameters (Video: rawvideo, 352x288)
[rawvideo @ 0xa3b5b60] Estimating duration from bitrate, this may be inaccurate
foreman_cif.yuv: could not find codec parameters

I have the latest ffmpeg installed, any help will be appreciated

nm
17th June 2011, 12:51
ffmpeg -s cif -r 30 -b 64000 -bt 3200 -g 30 -i foreman_cif.yuv -vf "format=yuv420p" -vcodec mpeg4 foreman_cif.m4v

Add -pix_fmt <whateverformat> to the input options and move encoding options after the input (otherwise they won't have an effect). If the input is yuv420p, you can also drop the format conversion filter:

ffmpeg -s cif -r 30 -pix_fmt yuv420p -i foreman_cif.yuv -vcodec mpeg4 -b 64000 -bt 3200 -g 30 foreman_cif.m4v


Your question has nothing to do with MPEG-4 AVC / H.264, by the way.

neoragexxx
17th June 2011, 13:15
i thought i should post here because i am using the mpeg4 codec to encode. maybe a moderator could move the thread.

thanks for the help:thanks:!! it worked!