Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com May 31 '13 at 1:31

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

2 Answers 2

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.