Search Unity

Question Recorder: is it pointless to use Apple ProRes 4444 XQ codec with HD Rec 709 Color Def?

Discussion in 'Audio & Video' started by TzuriTeshuba, Feb 28, 2023.

  1. TzuriTeshuba

    TzuriTeshuba

    Joined:
    Aug 6, 2019
    Posts:
    185
    So after trying recording with MP4, WebM, and ProRes QuickTime, I have found that ProRes QuickTime is the only acceptable option. MP4 provides garbage image quality. WebM slows my gameplay down to insufferable FPS. ProRes QuickTime's only downside is massive file sizes, but I can deal with that.

    The only Color Definition Option provided is "HD Rec. 709". When I read the docs on Apple's website (link below), it says this about "Apple ProRes 4444 XQ" codec:
    "...Apple ProRes 4444 XQ preserves dynamic ranges several times greater than the dynamic range of Rec. 709 imagery.".

    I don't know much about video, but this leads me to believe that recording with "Apple ProRes 4444 XQ" codec and "HD Rec. 709" is pointless, and the same result would be acheived using a lower quality codec. So I am here asking is my reasoning correct or misguided? If it really is pointless to combine the 2 settings, which codec format would be the highest quality that would see a loss from downgrading?

    Link to Apple ProRes Codecs:
    https://support.apple.com/en-us/HT202410

    Thanks in advance!
     
  2. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    My novice understanding is dynamic range etc can be particularly helpful if you are going to create a video then do lots of visual effects, color grading, etc in an external video editing app. The greater the dynamic range, the more adjustments you can do without losing color depth. If you don't use external video editing software, I don't know what benefit there would be.

    Note: I have also found that Unity MP4 is pretty fast but not good quality. Recorder 4.0.0 however I just tried today and it's MUCH better than before. WebM I also found slowed down playback rate a lot. Someone pointed out the ffmpeg option with Recorder 4.0.0 as well, but it requires the ffmpeg executable to be installed on your computer as well.

    See also this thread: https://forum.unity.com/threads/unity-recorder-low-video-quality.599176/#post-7423268 (I just posted an update to the thread today with a quick blog with some more screenshots etc.)
     
  3. TzuriTeshuba

    TzuriTeshuba

    Joined:
    Aug 6, 2019
    Posts:
    185
    Thanks so much for the help. Im using Unity 2020.3, and dont plan on updating versions on this project, so i am stuck with Recorder 2.5.7 :(
     
  4. cguertin

    cguertin

    Unity Technologies

    Joined:
    Aug 20, 2019
    Posts:
    83
    Hey @TzuriTeshuba!

    We've made large improvements to this recently but they are unfortunately not available in your current version of the Recorder. With Recorder 4.0.0 (requires Unity 2022.1+), there is a new option to set custom codec settings for H.264/MP4. This allows you to adjust the bitrate according to your desired quality.
    Screenshot 2023-02-28 173424.png

    For your current version of Unity/Recorder, the best option is probably Prores. As you saw, the file sizes are quite large since it's an uncompressed format optimized for post-production. Re-encoding it with a compressed codec might be desirable depending on your needs (ex: uploading it online).
     
    ilmario and TzuriTeshuba like this.
  5. TzuriTeshuba

    TzuriTeshuba

    Joined:
    Aug 6, 2019
    Posts:
    185
    thanks for the update, this is good news for future projects! of the current PreRes codec options, which would be my best bet if my intention is to immediately convert to mp4 (h.264)?
    By "best bet", i mean that a higher quality ProRes codec wouldnt have any benefit when converted to mp4, but a lower quality ProRes codec would be worse off? Asking within the context of my use case (immediate conversion to mp4).
     
  6. cguertin

    cguertin

    Unity Technologies

    Joined:
    Aug 20, 2019
    Posts:
    83
    The highest quality Prores option would be
    4444 XQ
    . With this, almost all of the data coming from Unity is preserved.

    In reality,
    422 HQ
    might also be sufficient for your needs. This codec uses chroma subsampling, which essentially reduces the number of colors saved in the file but keeps the luminance values intact (you can see an example on this page). While some data is lost compared to
    4444 XQ
    , this is done in way that is perceptually invisible to our eyes.

    So, the fool-proof option in your case would be to go with
    4444 XQ
    . But if disk usage becomes an issue, you could try to experimenting with the other options that generate slightly smaller file sizes and evaluate if there are noticeable visual differences.
     
  7. TzuriTeshuba

    TzuriTeshuba

    Joined:
    Aug 6, 2019
    Posts:
    185
    i see. i was under the impression that no subsampling (4:4:4) would get lost by converting to mp4 and that something like ProRes 4:2:2 would yield the same result post conversion. The memory isn't as much the issue for me. it is moreso that it takes a couple hours for a 30 second ProRes 4444 video file to be ready for playing (422 HQ takes seconds). And if i wouldn't even see a better result, post conversion, i'm just being dumb lol.

    Thanks for your help, i really appreciate it! I will be evaluating my final results at 422, just wanted to check the "technical" answer because my eyes just binarily detect between "good enough quality" and "not good enough", while i know the expected viewers detect more subtle differences.
     
    cguertin likes this.
  8. sawyj

    sawyj

    Unity Technologies

    Joined:
    Mar 5, 2021
    Posts:
    2
    Using ProRes 4444 XQ codec with HD Rec 709 Color Def preserves, according to their documentation, 12 bits of precision per color channel on top of a 16-bit alpha channel.
    Apple ProRes 422 HQ, still reading their documentation, uses 10 bits of information per channel with no alpha channel support.
    I would tend to agree that Apple ProRes 422 HQ meets the current standard of "good enough quality". If your workflow has no involvement with manipulating the alphas, I would define the minimum bit depth and go from there. Probably using the 10 bits flavor of 422.

    -> Is it pointless to use Apple ProRes 4444 XQ codec with HD Rec 709 Color Def?
    If one needs the alpha channel along a broader bit depth; one would prefer this flavor.
     
    TzuriTeshuba likes this.