ProRes support in FFmpeg – I love it!

FFmpeg added support for ProRes in october 2011 – which made my life a little easier. The added support for ProRes closed a big gap for me as I quite often get exports in ProRes and need to transcode it into something more lossy like H.264 for usage on the web.
FFmpegs support for ProRes will also lead VLC in supporting ProRes in their upcoming 1.2 release. Great!
(Update: It was later renamed to version 2.0 and was released in february 2012.)

A quick note on how to trancode to Apple ProRes (often denoted APCN) using a recent build of FFmpeg:

ffmpeg -i input.mov -vcodec prores -profile:v NUMBER  output.mov

For different flavors of ProRes replace NUMBER with a number from zero to 3 where:
0 : ProRes422 (Proxy)
1 : ProRes422 (LT)
2 : ProRes422 (Normal)
3 : ProRes422 (HQ)

The following was taken from FFmbc’s wiki site:

The encoder behave differently based on 3 options:
-qscale < value > or -cqp < value >
Specify a fixed quantizer that will be used for every frame. This is a VBR encoding method.

If bitrate is not specified, the bitrate will be automatically chosen based on video resolution and will be similar to the reference encoder for the same profile.
-b < bitrate >
Specify a approximately constant bit rate to use during encoding.
444 encoding: add -pix_fmt yuv444p10 to your commandline options.

Update: ProRes 444 doesn’t seem to work, but people are working on a patch as learned from this thread:
http://ffmpeg.org/pipermail/ffmpeg-user/2012-September/009521.html
I must admit I haven’t used the codec lately, but people write that Final Cut Pro often gives the warning that ProRes files made with FFmpeg, are not optimized for FCP. All that means is, that the file wasn’t compressed using FCP but the file should work fine.

If you use the ProRes encoder, you might want to read this blogpost by the author Kostya.

32 Comments

  1. I don’t think you can use -profile name anymore…but I could be mistaken…

    • In recent ffmpeg, you have to use ‘-profile:v’ instead of ‘-profile’.

      This means that you can also use ‘-profile:a’ for some audio codecs that support profiles, or even select individual streams: ‘-profile:0’ would select the first stream (be it video or audio), ‘-profile:v:0’ will select the first video stream, and so on.

      • Thanks for the info on the profiles Liam! Just a minor spelling mistake: It is -profile:v 0. without the space ffmpeg doesnt recognize the syntax of the arguments. You can also use short forms “-c:v prores” or “-c:a copy” for video and audio instead of -vcodec prores and -acodec copy.

      • Just grabbed a fresh build and both “-profile:v” and “-profile” works, but “-profile:v” seems more correct, so i’ve updated the post. Thanks.

  2. thanks for this post, I know this is a late reply;) so when i try to encode via
    ffmpeg -i input.mov -vcodec prores -profile:v 3 -an output.mov I get an error saying “Unknown encoder ‘prores’ ”

    I have an actual linux running (ubuntu dream) .. any thoughts? thanks so much!

  3. That is not the FFmpeg version but your Ubuntu version. You need a newer version of FFmpeg. When you start FFmpeg, you can see the build date in the CLI. The build has to be from at least 2012, but a fresh build is better since there has been improvements recently.

  4. Ok Thanks so much for your advice, I ll check that right now and install the latest ffmpeg build!

  5. ffmpeg i get:

    built on Apr 5 2013 11:53:09 with gcc 4.6.3
    *** THIS PROGRAM IS DEPRECATED ***
    This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.

    h m i m really lost here sorry, coming from sound i m a bit new to the video world.

    when i use winff instead of your command and use a preset I get this output:

    “[prores @ 0x8fde7e0] alpha channel not implemented. Update your Libav version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.”

    your help is very much appreciated!! thanks! kris

  6. Thank you very much, this opened my eye to that there is a very competent free option available for converting MTS2 to Prores.

  7. Hi,
    Nice post!

    One query though: I’ve tried to use profile 0 to encode with Proxy settings (just like in the post) but I got instead a bitrate equivalent to the Prores HQ.

    Also HQ is much higher than the specifications. Did you notice anything strange on this topic yet? Maybe the profiles map is not accurate?

    Here’s what I’ve used for a comparison:
    http://documentation.apple.com/en/finalcutpro/professionalformatsandworkflows/index.html#chapter=10%26section=4%26tasks=true

  8. FYI, you can now to do prores444 encoding with the most recent build of ffmpeg, not sure if the alpha remains in tact though… use this to define the encoder: -vcodec prores_ks -profile:v 4 -r 29.97
    filename.mov

    *Note that the numbers following “-r ” will be your playback frame rate.

  9. Thanks for the info! i just tried encoding and everything was ok except for the fact i’m getting no audio on the output file. I’m very interested in this option, anyone can give me advice on what may be happening in my transcode please?

  10. Great post.
    Do you happen to know the difference between prores_aw and prores_ks?

  11. Thank you, you saved me a headache with the profile options.

  12. Is it possible to encode to ProRes 4444 XQ? I can’t find a command to do this in either ffmpeg or ffmbc.

    • Hey Daniel,

      Well FFmpeg supports alpha channel, so give the following a try:
      ffmpeg -i input.mov -codec prores_ks -pix_fmt yuva444p10le -alpha_bits 16 -profile:v 4444 -f mov output.mov

      From what I read, if your input is a DNxHD file, it will not work – otherwise it should…

      • Daniel Fort

        2015/31/10 at 2:18 PM

        Thanks you so much for the speedy reply. I will certainly give that a try and pass your tip along to the other members of the team.

        By the way, the project is converting Magic Lantern raw video to ProRes 4444 XQ with a Log C profile in order to make it easier to mix in with ARRI footage.

  13. Thank you for all the tips!
    i have the same problem as Andy Abud. The files do not have audio. What does the “-an” do? When I put “-c:a copy” at the end, there is still no audio, but if I delete “-an” the audio is there but than I get “Codec for stream 1 dows not use global headers but container format requires global headers” message while encoding.

    Thank you for your help!

    • Hey Mike,

      They -an does the following:
      -an (output)
      Disable audio recording.

      So, that’s why you get no audio. Try to loose the “-c:a copy” and the “-an” part and see, if that works. “-c:a copy” copies the audio stream from the input file without any transcoding, but if the input audio codec isn’t correct, then it won’t work. But if you loose the “-c:a copy” part, FFmpeg will transcode the audio part to the appropriate format.
      Give it a try and let’s hear if that worked…

      /Frederik

  14. Thank you for the fast answer!
    i do not understand it completely, with “-c:a copy” I get the error described, but it still works. With nothing, just deleting “-an” I do not get the error, audio is a little smaller in size, same codec and it stills works.
    But now I saw that the ordinal file is BT.709 and after ffmpeg the prores file has a matrix coefficients BT.601. Does it do a color conversation? is it possible to exclude that step?

    Thank you very much!

    Mike

  15. Thanks again for your help and the link!
    I tried it with a H.264 4:2:0 and a DNxHD 115 4:2:2 file. Both 1080p BT.709. Both end up as BT.601 in the Prores file transcoded with ffmpeg. As far as I know the Prores file should also be BT.709.

  16. Any clues on why 4444 encoding would look really compressy? I got the alpha channel, which is what I need, but things like graphics look TERRIBLE. Any more quality options I can supply along with this…

    ffmpeg -i input.mov -codec prores_ks -pix_fmt yuva444p10le -alpha_bits 16 -profile:v 4444 -f mov output.mov

    Coming from a nice clean animation codec file. Hmmm

    • You probably need to also specify the “quality level” for the output…but that’s only a hunch and about all I know 🙂

    • Hmm, dunno. But I try: -codec prores_aw instead of -codec prores_ks
      – I doubt that it will work, but worth a shot. FFmpeg contains two ProRes implementations where prores_ks generally is the better one. Another thing you could try is to stay with the prores_ks codec and add the -qscale:v parameter that might work. Try adding -qscale:v 9 and see if it helps.

      • Thanks for the suggestions. After futzing with it for a while, these settings look REALLY nice. These are largely formatted for ‘AnotherGUI’

        -i -y
        -codec prores_ks
        -pix_fmt yuva444p10le
        -qscale:v 1
        -quant_mat 4
        -alpha_bits 8
        -bits_per_mb 2400
        -f mov
        -vendor ap10

Leave a Reply

Your email address will not be published.

*