1

Instead of prores_ks ( as in image ), I need to get prores444. How is it possible?

I tried the following and felt that I am limited to this. Is prores_ks an alternative to prores444?

Can you explain how to find an alternative to this, in case it is not present?

EXRFILE="/tmp/v002/fb_sq021_sc003_v002.%04d.dpx" \
QSCALE=4 \
ffmpeg -start_number 0101 -y -probesize 5000000 -f image2 \
-r 24 -i ${EXRFILE} -vcodec prores_ks -qscale:v ${QSCALE} -vendor ap10 \
-pix_fmt yuv444p10 -s 960x540 /tmp/v002/fb_sq021_sc003_v002.mov
3

i need to get prores444

Do you mean ProRes 4444? It's still called "4444" even if you don't use the alpha channel.

Is prores_ks alternative to prores444

Not exactly. The reason there are several ProRes codecs in FFmpeg is that they're all kind of competing. Maybe at some point the libavformat maintainers will start removing some of the alternatives.

Some of these codecs are decode-only (e.g. prores_lgpl), so for the purposes of this question, the available choices are:

  • prores: Currently, this only supports pixel format yuv422p10le, meaning that it encodes ProRes 422 only.

  • prores_aw: Shares the same limitation as prores

  • prores_ks: I believe it is this codec, and at least as of FFmpeg 2.1.3, it accepts pixel format yuva444p10le, which is what you need to get ProRes 4444.

This alternative to your given command works here on my Mac, which has the official Apple ProRes codecs installed:

$ EXRFILE="/tmp/v002/fb_sq021_sc003_v002.%04d.dpx"
$ ffmpeg -start_number 0101 -y -f mov -r 24 -i ${EXRFILE} -vcodec prores_ks -pix_fmt yuva444p10le -profile:v 4444 -s 960x540 /tmp/v002/fb_sq021_sc003_v002.mov

Several points:

  • I added the -pix_fmt yuva444p10le option, which tells the codec that we want 4:4:4:4 output. If the input doesn't have an alpha channel, it will give 4:4:4 output instead.

  • I added the -profile:v 4444 option, which seems to be a recent addition to the codec. If you leave this out, you get ProRes 422 despite the 4:4:4:4 pixel format option.

  • I removed the qscale parameter, because it allows the prores_ks codec to violate the limits defined in the ProRes spec.

    ProRes is a profile-based codec, meaning that when you select one of the profiles, it does a fixed amount of compression, defined in the spec. If you want a different compression level, you're supposed to choose a different profile, rather than change a quality setting.

    The prores_ks codec lets you change the bit rate or quality level goals independent of the profile, even if this means the resulting file violates the spec. There may be perfectly compliant ProRes decoders that refuse to accept the file you generate. This is most likely with hardware decoders, since they are necessarily resource-constrained. If you're doing all your decoding in software — e.g. QuickTime Player — you're probably free to violate the spec this way, as long as your PC is fast enough to cope with the higher bit rates that can result.

  • You only need -s if you're rescaling the input frames. If you are, I wonder why you're using formats like EXR and ProRes 4444 in the first place? OpenEXR is usually used where you need lossless images, though it does have a low-loss option. ProRes 4444 is nearly lossless. Rescaling the input frames is inherently lossy.

    If it only has to look good on a PC monitor in realtime playback, you can probably get by with high-bit-rate H.264. For 540p, I'd think 10 Mbit/s or so would be plenty to give output indistinguishable from ProRes 4444, which runs at about 67 Mbit/s for 540p.

    If the video's users will be pausing the video and studying it frame-by-frame, H.264 is a bad idea, but so is rescaling the input frames. At least, you shouldn't be downscaling lower than the monitor's resolution. So, if your EXR source is giving massive 4K frames, there's a good argument for rescaling to, say, 1440×900 for a given monitor, as long as the users then don't want to be able to zoom in.

  • Note the change to the QuickTime (-f mov) container format. This is the normal container for ProRes files.

  • I don't see the point of -vendor ap10, so I removed it. Again, ProRes is ProRes. It doesn't need to be tagged as "from Apple" to work.

  • I removed -probesize 5000000 since I don't see that it provides any value in this case.

how to find an alternative to this.

ffmpeg has a great many alternatives for low-loss video compression. I wrote a long answer on SuperUser.SE explaining it all.

I should probably redo the ProRes tests, as there have apparently been a lot of changes to the ProRes codecs in ffmpeg since I wrote that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.