Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was simulating a lot of videos in cif format, also all videos came with yuv format file. I used the expression below and it works well:

ffmpeg -s cif -r 30 -i video.yuv -vcodec mpeg4 -g 12 -bf 2 -sameq video.m4v

But now I'm looking for simulations with HD videos and they come with y4m extensions. Do you know witch expression I should use?

I tried to replace -s hd720, instead of -s cif and still not working:

ffmpeg -s hd720 -i ducks_take_off_420_720p50.y4m -vcodec mpeg4 -g 12 -bf 2 -sameq video.m4v

Error: Option video_size not found

share|improve this question

migrated from May 31 '13 at 1:31

This question came from our site for professional and enthusiast programmers.

You should not need to declare an input -s or -r for y4m (YUV4MPEG2). It contains a header with the frame width, frame height, and frame rate, among other information that may be present.

Also, -sameq does not mean "same quality" and has been removed from ffmpeg. You can use -qscale:v instead when using the encoder mpeg4. A sane value is 2-5, and a lower value is a higher quality. 2 is roughly visually lossless.

share|improve this answer

If you are willing to scale the input video the the -s tag should come AFTER the -i

The following should work (with updated syntax):

ffmpeg -i ducks_take_off_420_720p50.y4m -s hd720 -c:v mpeg4 -g 12 -bf 2 -q:v 0 video.m4v

If you are not willing to scale the video, you should not include the -s tag at all and make sure that the input video is an hd720 video.

share|improve this answer

You must log in to answer this question.