Copy link to clipboard
Copied
I can't figure out how to set the color space when exporting a video with h.264. Here are my settings:
That said, I'm not even trying to change the color space per se; I just need to explicitly set it. I'm running into a compatability issue with Unity where the engine says that the color space isn't defined in the source file.
To fix this problem, the equivalent in ffmpeg would be something like:
ffmpeg -i input.mp4 -color_primaries bt709 -color_trc bt709 -colorspace bt709 -color_range pc -vcodec libx264 -profile:v baseline output.mp4
Basically, you can encode the file while explicitly defining the color space. Even though Rec. 709 is auto-selected in Premiere Pro, it seems that it isn't explicitly defining the color space, because I can't see the color space in MediaInfo afterwards (and Unity gives a warning because of the missing metadata).
Anyway, does anyone know why the box is greyed out and/or how to make Premiere Pro do something like the above ffmpeg command?
Welcome the the world of Adobe where video profile tagging and management is nearly non-existent.
However by default in SDR land it should always apply the Rec.709 tags to the primaries and transfer characteristics...
Not sure why it isn't in your case. Do you get any different results with sending it to Media Encoder to export there?
[edit]
nvm, I just checked a bunch of projects of ours all the master H264 files have no tags. It's only with Quicktime that it tags automatically I think.
Haven't c
Copy link to clipboard
Copied
Welcome the the world of Adobe where video profile tagging and management is nearly non-existent.
However by default in SDR land it should always apply the Rec.709 tags to the primaries and transfer characteristics...
Not sure why it isn't in your case. Do you get any different results with sending it to Media Encoder to export there?
[edit]
nvm, I just checked a bunch of projects of ours all the master H264 files have no tags. It's only with Quicktime that it tags automatically I think.
Haven't checked myself but what about H265? (if supported by Unity). Otherwise you'll have to inject them via other software to fix it...
Copy link to clipboard
Copied
Interesting, thanks for the reply. Good to know that it's not just me, at least.
There's a workaround to just transcode the video to VP8 within Unity, which is probably good enough for my use case. It's a weird problem, but at least I know my setup isn't incorrect.
Copy link to clipboard
Copied
If you have to transcode it I would recommend exporting to an intermediate format first (like ProRes 422 HQ or 4444) so you don't double compress the heck out of it. Unless that is of no concern for the purpose of your files. And not sure how effective you find it to do within Unity but a very capable software that actually does do tagging is Resolve which has a free version allowing up to 4K export. Could be an alternative.
Copy link to clipboard
Copied
ProRes 422 HQ or 4444
Good point, I should probably do that.
Re: Resolve, that's actually my typical go-to editor, but for some reason I didn't use it for this project. I'll try that next time.
Copy link to clipboard
Copied
I can't figure out how to set the color space when exporting a video with h.264.
By @_eternal
Set the Performance to Software Encoding and then change Profile to High10.
Copy link to clipboard
Copied
That is not how you solve the issue. High10 means creating a 10bit H264 file. This format exists to offer higher quality files but also support HDR encodings. While it does create a BT709 tag it is not the way, but a mere bandaid approach. Unity may not even support 10bit video.
Copy link to clipboard
Copied
Fascinating discussion. I've exported H.264 and H.265, ProRes, DNx, and always in MediaInfo there is color space information listed. Normally of course, Rec.709 limited range, Y'CbCr ... as it should be.
But on some rigs, it isn't putting color space data in? I'd love to test one of those files on my system!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now