Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
10th September 2019, 06:00 | #1 | Link |
Registered User
Join Date: Aug 2008
Location: Italy
Posts: 46
|
Hdr metadata
Hi, I hope among you there is someone who has enough knowledge to answer me.
The question is simple, but I don't know the answer. When in a 4k bluray, the main movie is in a single m2ts file, creating a UNTOUCHED version, muxing the track with mkvtoolnix, the hdr metadata viewable with mediainfo remains unchanged, and therefore you can insert in x265 encoder for the eventual encoding , whether the source is the bluray 4k, whether the source is the UNTOUCHED.mkv version. The problem arises when in the 4k bluray, the main video is split into multiple m2ts files. Each of them shows different hdr metadata in mediainfo, and by creating the UNTOUCHED.mkv version muxed with mkvtoolnix, it will display the metadata of the first .m2ts bluray playlist file. I take as an example the bluray 4k, Alita - Battle Angel. The main movie is in the playlist: 00800.mpls which in turn contains 4 m2ts files (as reported by the BDInfo tool): 00687.m2ts (00:00:35) 00688.m2ts (01:55:51) 00674.m2ts (00:02:01) 00689.m2ts (00:03:28) The hdr metadata shown by mediainfo (for the file Alita - Battle Angel [UNTOUCHED].mkv) currently shows the hdr parameters of the first of the four sequential files (00687.m2ts), which would be the initial credits, namely: Primary colors: BT.2020 Transfer characteristics: PQ Matrix coefficients: BT.2020 non-constant MasteringDisplay_ColorPrimaries: Display P3 MasteringDisplay_Luminance: min: 0.0001 cd / m2, max: 1000 cd / m2 MaxCLL: 233 cd / m2 MaxFALL: 63 cd / m2 These instead are the metadata of the 4 m2ts tracks: Code:
General Complete name : E:\Alita - Angelo Della Battaglia [2019] [BLURAY FULL 4K]\BDMV\PLAYLIST\00800.mpls Format : Blu-ray Playlist File size : 3.81 KiB Duration : 2 h 1 min Overall bit rate mode : Variable Overall bit rate : 4 b/s Video #1 ID : 4113 (0x1011) Menu ID : 1 (0x1) Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main 10@L5.1@High HDR format : SMPTE ST 2094 App 4, Version 1, HDR10+ Profile A compatible Codec ID : 36 Duration : 35 s 952 ms Width : 3 840 pixels Height : 2 160 pixels Display aspect ratio : 16:9 Frame rate : 23.976 (24000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 (Type 2) Bit depth : 10 bits Color range : Limited Color primaries : BT.2020 Transfer characteristics : PQ Matrix coefficients : BT.2020 non-constant Mastering display color primaries : Display P3 Mastering display luminance : min: 0.0001 cd/m2, max: 1000 cd/m2 Maximum Content Light Level : 233 cd/m2 Maximum Frame-Average Light Level : 63 cd/m2 format_identifier : HDMV Source : 00687.m2ts Video #3 ID : 4113 (0x1011) Menu ID : 1 (0x1) Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main 10@L5.1@High HDR format : SMPTE ST 2094 App 4, Version 1, HDR10+ Profile A compatible Codec ID : 36 Duration : 1 h 55 min Width : 3 840 pixels Height : 2 160 pixels Display aspect ratio : 16:9 Frame rate : 23.976 (24000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 (Type 2) Bit depth : 10 bits Color range : Limited Color primaries : BT.2020 Transfer characteristics : PQ Matrix coefficients : BT.2020 non-constant Mastering display color primaries : Display P3 Mastering display luminance : min: 0.0001 cd/m2, max: 1000 cd/m2 Maximum Content Light Level : 737 cd/m2 Maximum Frame-Average Light Level : 130 cd/m2 format_identifier : HDMV Source : 00688.m2ts Video #5 ID : 4113 (0x1011) Menu ID : 1 (0x1) Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main 10@L5.1@High HDR format : SMPTE ST 2094 App 4, Version 1, HDR10+ Profile A compatible Codec ID : 36 Duration : 2 min 1 s Width : 3 840 pixels Height : 2 160 pixels Display aspect ratio : 16:9 Frame rate : 23.976 (24000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 (Type 2) Bit depth : 10 bits Color range : Limited Color primaries : BT.2020 Transfer characteristics : PQ Matrix coefficients : BT.2020 non-constant Mastering display color primaries : Display P3 Mastering display luminance : min: 0.0001 cd/m2, max: 1000 cd/m2 Maximum Content Light Level : 1000 cd/m2 Maximum Frame-Average Light Level : 18 cd/m2 format_identifier : HDMV Source : 00674.m2ts Video #7 ID : 4113 (0x1011) Menu ID : 1 (0x1) Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main 10@L5.1@High HDR format : SMPTE ST 2094 App 4, Version 1, HDR10+ Profile A compatible Codec ID : 36 Duration : 3 min 28 s Width : 3 840 pixels Height : 2 160 pixels Display aspect ratio : 16:9 Frame rate : 23.976 (24000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 (Type 2) Bit depth : 10 bits Color range : Limited Color primaries : BT.2020 Transfer characteristics : PQ Matrix coefficients : BT.2020 non-constant Mastering display color primaries : Display P3 Mastering display luminance : min: 0.0001 cd/m2, max: 1000 cd/m2 Maximum Content Light Level : 505 cd/m2 Maximum Frame-Average Light Level : 13 cd/m2 format_identifier : HDMV Source : 00689.m2ts I suppose there must be a rule, in x265 to determine the correct HDR parameters to use, (including MaxCLL and MaxFALL values), to be included in the x265 encoder, when the bluray 4k movie is splitted in more m2ts files. So, after having exposed the problem, and having examined a specific case, the question is rather short and simple: 1) Which rule must be applied? (question valid for all bluray movies splitted into multiple m2ts files) 2) In the case of the movie Alita - Battle Angel, which HDR metadata should be used? Last edited by cool advertise; 10th September 2019 at 06:41. |
10th September 2019, 07:56 | #3 | Link |
Registered User
Join Date: Aug 2008
Location: Italy
Posts: 46
|
No. It (Alita - Battle Angel) contains HDR10, HDR10+, and Dolby Vision metadata, but i just want to uses HDR10, so i don't need that tool (hdr10plus_parser).
Last edited by cool advertise; 10th September 2019 at 08:03. |
10th September 2019, 08:28 | #4 | Link |
Registered User
Join Date: Dec 2002
Posts: 5,565
|
The only things that change are MaxCLL and MaxFALL? Wouldn't it make sense to choose the highest MaxCLL and the highest MaxFALL for the complete recode, then? Maybe I'm thinking too simple ...
Last edited by sneaker_ger; 10th September 2019 at 08:48. Reason: MaxFALL, not MinCLL |
10th September 2019, 08:39 | #5 | Link | |
Registered User
Join Date: Aug 2008
Location: Italy
Posts: 46
|
Quote:
I have used this metadata for Alita - Battle Angel rip, like other Italian users who have ripped the film: Code:
Color primaries : BT.2020 Transfer characteristics : PQ Matrix coefficients : BT.2020 non-constant Mastering display color primaries : Display P3 Mastering display luminance : min: 0.0001 cd/m2, max: 1000 cd/m2 Maximum Content Light Level : 737 cd/m2 Maximum Frame-Average Light Level : 130 cd/m2 I thought maybe you should choose the maximum value between the various tracks for: Maximum Content Light Level and for Maximum Frame-Average Light Level so in the case of Alita - Battle Angel I thought you have to choose these: Code:
Color primaries : BT.2020 Transfer characteristics : PQ Matrix coefficients : BT.2020 non-constant Mastering display color primaries : Display P3 Mastering display luminance : min: 0.0001 cd/m2, max: 1000 cd/m2 Maximum Content Light Level : 1000 cd/m2 Maximum Frame-Average Light Level : 130 cd/m2 but I'm waiting for a more expert answer. Last edited by cool advertise; 10th September 2019 at 09:26. |
|
10th September 2019, 17:05 | #7 | Link | |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,866
|
Quote:
They are not particularly useful values, since one stray pixel or frame can throw off values for a whole movie. Many displays just ignore the metadata for that reason. Dynamic metadata like Dolby Vision and HDR10+ are a lot more useful in practice. |
|
10th September 2019, 19:07 | #8 | Link |
Registered User
Join Date: Aug 2002
Location: France, Paris
Posts: 672
|
No, that is the issue: it is in the stream only; and HDR10 says that a stream should have a constant value; so from MediaInfo developer (me) point of view, it is not worth it to scan the entire stream just for checking that the stream is conform to HDR10 specs else show the maximum value.
Technically not the most difficult in MediaInfo, just need to load in memory the whole file for a very corner case.
__________________
Want to know all about your media files? http://mediaarea.net/MediaInfo |
10th September 2019, 19:34 | #9 | Link | |
Registered User
Join Date: Aug 2008
Location: Italy
Posts: 46
|
Quote:
Here is the mediainfo log, for the 4 mkv files created by the respective m2ts files: Code:
General Unique ID : 120006851769432838627067574519937895675 (0x5A487A9B834FD93AA576FDC80A700CFB) Complete name : E:\Alita - Angelo Della Battaglia [2019] [BLURAY FULL 4K]\00687.mkv Format : Matroska Format version : Version 4 File size : 167 MiB Duration : 35 s 972 ms Overall bit rate mode : Variable Overall bit rate : 38.9 Mb/s Encoded date : UTC 2019-09-10 17:15:48 Writing application : mkvmerge v37.0.0 ('Leave It') 64-bit Writing library : libebml v1.3.9 + libmatroska v1.5.2 Video #1 ID : 1 Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main 10@L5.1@High HDR format : SMPTE ST 2094 App 4, Version 1, HDR10+ Profile A compatible Codec ID : V_MPEGH/ISO/HEVC Duration : 35 s 953 ms Bit rate : 22.2 Mb/s Width : 3 840 pixels Height : 2 160 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 23.976 (24000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 (Type 2) Bit depth : 10 bits Bits/(Pixel*Frame) : 0.112 Stream size : 95.3 MiB (57%) Default : Yes Forced : No Color range : Limited Color primaries : BT.2020 Transfer characteristics : PQ Matrix coefficients : BT.2020 non-constant Mastering display color primaries : Display P3 Mastering display luminance : min: 0.0001 cd/m2, max: 1000 cd/m2 Maximum Content Light Level : 233 cd/m2 Maximum Frame-Average Light Level : 63 cd/m2 ------------------------------------- General Unique ID : 205024178831424440420367255297167339904 (0x9A3E3874E1E7288AF3B7307CBC9A3180) Complete name : E:\Alita - Angelo Della Battaglia [2019] [BLURAY FULL 4K]\00688.mkv Format : Matroska Format version : Version 4 File size : 49.0 GiB Duration : 1 h 55 min Overall bit rate mode : Variable Overall bit rate : 60.5 Mb/s Encoded date : UTC 2019-09-10 17:22:40 Writing application : mkvmerge v37.0.0 ('Leave It') 64-bit Writing library : libebml v1.3.9 + libmatroska v1.5.2 Video #1 ID : 1 Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main 10@L5.1@High HDR format : SMPTE ST 2094 App 4, Version 1, HDR10+ Profile A compatible Codec ID : V_MPEGH/ISO/HEVC Duration : 1 h 55 min Bit rate : 42.7 Mb/s Width : 3 840 pixels Height : 2 160 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 23.976 (24000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 (Type 2) Bit depth : 10 bits Bits/(Pixel*Frame) : 0.214 Stream size : 34.5 GiB (70%) Default : Yes Forced : No Color range : Limited Color primaries : BT.2020 Transfer characteristics : PQ Matrix coefficients : BT.2020 non-constant Mastering display color primaries : Display P3 Mastering display luminance : min: 0.0001 cd/m2, max: 1000 cd/m2 Maximum Content Light Level : 737 cd/m2 Maximum Frame-Average Light Level : 130 cd/m2 ------------------------- General Unique ID : 198987914817856560951365290631281396266 (0x95B3ADA9C7B448504B5B8D57DFCA4A2A) Complete name : E:\Alita - Angelo Della Battaglia [2019] [BLURAY FULL 4K]\00674.mkv Format : Matroska Format version : Version 4 File size : 410 MiB Duration : 2 min 1 s Overall bit rate mode : Variable Overall bit rate : 28.3 Mb/s Encoded date : UTC 2019-09-10 18:12:33 Writing application : mkvmerge v37.0.0 ('Leave It') 64-bit Writing library : libebml v1.3.9 + libmatroska v1.5.2 Video #1 ID : 1 Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main 10@L5.1@High HDR format : SMPTE ST 2094 App 4, Version 1, HDR10+ Profile A compatible Codec ID : V_MPEGH/ISO/HEVC Duration : 2 min 1 s Bit rate : 10.2 Mb/s Width : 3 840 pixels Height : 2 160 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 23.976 (24000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 (Type 2) Bit depth : 10 bits Bits/(Pixel*Frame) : 0.051 Stream size : 148 MiB (36%) Default : Yes Forced : No Color range : Limited Color primaries : BT.2020 Transfer characteristics : PQ Matrix coefficients : BT.2020 non-constant Mastering display color primaries : Display P3 Mastering display luminance : min: 0.0001 cd/m2, max: 1000 cd/m2 Maximum Content Light Level : 1000 cd/m2 Maximum Frame-Average Light Level : 18 cd/m2 ----------------------------------- General Unique ID : 122103663906236629347105964736554171473 (0x5BDC4F6D7021D4BDF4CC6DFCF0B37C51) Complete name : E:\Alita - Angelo Della Battaglia [2019] [BLURAY FULL 4K]\00689.mkv Format : Matroska Format version : Version 4 File size : 924 MiB Duration : 3 min 28 s Overall bit rate mode : Variable Overall bit rate : 37.1 Mb/s Encoded date : UTC 2019-09-10 18:13:30 Writing application : mkvmerge v37.0.0 ('Leave It') 64-bit Writing library : libebml v1.3.9 + libmatroska v1.5.2 Video #1 ID : 1 Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main 10@L5.1@High HDR format : SMPTE ST 2094 App 4, Version 1, HDR10+ Profile A compatible Codec ID : V_MPEGH/ISO/HEVC Duration : 3 min 28 s Bit rate : 19.7 Mb/s Width : 3 840 pixels Height : 2 160 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 23.976 (24000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 (Type 2) Bit depth : 10 bits Bits/(Pixel*Frame) : 0.099 Stream size : 489 MiB (53%) Default : Yes Forced : No Color range : Limited Color primaries : BT.2020 Transfer characteristics : PQ Matrix coefficients : BT.2020 non-constant Mastering display color primaries : Display P3 Mastering display luminance : min: 0.0001 cd/m2, max: 1000 cd/m2 Maximum Content Light Level : 505 cd/m2 Maximum Frame-Average Light Level : 13 cd/m2 I'm still muxing it with mkvtoolnix...i will answer soon |
|
10th September 2019, 20:00 | #10 | Link |
Registered User
Join Date: Jan 2010
Location: France
Posts: 851
|
I think the result will be the same, I think it will take the metadata from the first MKV but I'm waiting your result.
If the result is the same, perhaps you could try to open a ticket to mkvtoolnix. |
10th September 2019, 20:05 | #11 | Link |
Registered User
Join Date: Aug 2008
Location: Italy
Posts: 46
|
It take metadata from first mkv file or from first m2ts file.
Here is the mediainfo log: Code:
General Unique ID : 206388322543053743391594044095595016496 (0x9B44F1EF2C7B0BC2FED886B1DBF7F130) Complete name : E:\Alita - Angelo Della Battaglia [2019] [BLURAY FULL 4K]\Alita - Angelo Della Battaglia [2019] [UNTOUCHED FROM MERGED MKV].mkv Format : Matroska Format version : Version 4 File size : 50.5 GiB Duration : 2 h 1 min Overall bit rate mode : Variable Overall bit rate : 59.2 Mb/s Encoded date : UTC 2019-09-10 18:22:43 Writing application : mkvmerge v37.0.0 ('Leave It') 64-bit Writing library : libebml v1.3.9 + libmatroska v1.5.2 Video #1 ID : 1 Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main 10@L5.1@High HDR format : SMPTE ST 2094 App 4, Version 1, HDR10+ Profile A compatible Codec ID : V_MPEGH/ISO/HEVC Duration : 2 h 1 min Bit rate : 41.4 Mb/s Width : 3 840 pixels Height : 2 160 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 23.976 (24000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 (Type 2) Bit depth : 10 bits Bits/(Pixel*Frame) : 0.208 Stream size : 35.2 GiB (70%) Default : Yes Forced : No Color range : Limited Color primaries : BT.2020 Transfer characteristics : PQ Matrix coefficients : BT.2020 non-constant Mastering display color primaries : Display P3 Mastering display luminance : min: 0.0001 cd/m2, max: 1000 cd/m2 Maximum Content Light Level : 233 cd/m2 Maximum Frame-Average Light Level : 63 cd/m2 |
10th September 2019, 20:26 | #12 | Link | |
Registered User
Join Date: Jan 2010
Location: France
Posts: 851
|
Quote:
When the muxer does the job, it could analyze the max values for each M2TS and keep the higher values as default value ?! But the values will be wrong for 3 or all M2TS segments, so is it useful to use that when encoding to x265 ? |
|
11th September 2019, 09:33 | #14 | Link | ||
Registered User
Join Date: Aug 2008
Location: Italy
Posts: 46
|
Quote:
Here is his answer: Quote:
Last edited by cool advertise; 11th September 2019 at 09:35. |
||
11th September 2019, 19:03 | #15 | Link |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,866
|
Yes, since the metadata is contained in every IDR, it can change frequently. I believe the Blu-ray spec doesn't allow for the static metadata to change during the main title, but that's not something that is or could be technically enforced.
How a display deals with unexpectedly changing static metadata is another question entirely. I wouldn't be surprised to see some pathological behavior in some. |
12th September 2019, 10:40 | #17 | Link |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,866
|
The safest thing is to use the highest value of all of them. However, I would expect that the main title would have the same value in all its M2TS files, so this might be a way to discriminate between main title and extras.
|
Tags |
hdr, hdr10, hevc, metadata, x265 |
Thread Tools | Search this Thread |
Display Modes | |
|
|