1

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

llogan
  • 63,280

2 Answers2

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.

llogan
  • 63,280
1

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.

E.G.
  • 380