[HELP] Setting PAR and color matrix on container-level - Printable Version +- Selur's Little Message Board (https://forum.selur.net) +-- Forum: Hybrid - Support (https://forum.selur.net/forum-1.html) +--- Forum: Problems & Questions (https://forum.selur.net/forum-3.html) +--- Thread: [HELP] Setting PAR and color matrix on container-level (/thread-2825.html) |
Setting PAR and color matrix on container-level - potejan - 09.07.2022 Hello again. I have a workflow where I take SD videos, for example PAL 16:15, bt470bg/bt470bg/bt709, and I deinterlace + bob using Hybrid. However, the output file, no matter what container or encoder, will not contain the PAR or color matrix/curve hints. This causes players to stretch the video and/or display it using wrong colors. I found a work around - h264 and h265 encoders in Hybrid allow you to override these hints, and that gets picked up by players at the end. But for every other encoder type, e.g. UT-VIDEO, there is no such option. Currently I need a post-processing step like this: ffmpeg -i hybrid.mkv -colorspace bt470bg -color_primaries bt470bg -color_trc bt709 -aspect 4:3 -c copy -o fixed.mkv I was wondering is there any way to do this using Hybrid? Thanks! I actually found a solution for MKV files. In Config > Containers, add the following "Mkvmerge command line addition": --aspect-ratio 0:4/3 --colour-matrix-coefficients 0:5 --colour-transfer-characteristics 0:1 --colour-primaries 0:5 However, I don't see a "command line addition" option for MP4Box or FFmpeg in general. Any chance to add them? Having that would allow one to customize the output beyond the options present in Hybrid. Thanks! RE: Setting PAR and color matrix on container-level - Selur - 09.07.2022 I have a workflow where I take SD videos, for example PAL 16:15, bt470bg/bt470bg/bt709, and I deinterlace + bob using Hybrid. However, the output file, no matter what container or encoder, will not contain the PAR or color matrix/curve hints MKV allows additional HDR related signaling through the container. I could probably add support through ffmpeg, mp4box, mkc for additionally signaling vui stuff through the container. (ffmpeg is well documented over at https://www.ffmpeg.org/ffmpeg-all.html, mkv is well documented through https://mkvtoolnix.download/doc/mkvmerge.html) Main problem is I would need some documentation, for mp4box, since Quote:colr (string)see: https://www.mankier.com/1/mp4box#Hinting_Options -> without any clue how ISO/IEC 23001-8 I would need some additional details on how to use nclx and nclc Cu Selur Ps.: busy this weekend (helping a friend move to a new apartment, but I could look into it next week) RE: Setting PAR and color matrix on container-level - potejan - 10.07.2022 Quote:PAR and VUI signaling should be on stream not container level. I'll be honest, I'm clueless where the signaling is or should be stored. With my mkvmerge options above, it gets picked up in both players and ffmpeg. Does that go in container or stream? I actually tried the "MKV tagging" tab in Hybrid, which I think definitely goes in the container, and setting the color properties there got utterly ignored by virtually every player and tool I tried, including ffmpeg. Quote:without any clue how ISO/IEC 23001-8 I would need some additional details on how to use nclx and nclc I wish I could help with this one, but looking at the docs it means even less to me... For my use case the mkvmerge options are more than enough though, so no pressure if this is a complicated ask! Good luck with moving! Thank you |