MediaArea / MediaInfo

Convenient unified display of the most relevant technical and tag data for video and audio files.
https://MediaArea.net/MediaInfo
BSD 2-Clause "Simplified" License
1.39k stars 160 forks source link

[Feature Request] Reporting MEL or FEL for Dolby Vision Layers #721

Open v-tron opened 1 year ago

v-tron commented 1 year ago

When ripping a BluRay with MakeMKV the tool correctly reports the enhancement layer level (MEL or FEL). When checking the resulting MKV file afterwards with MediaInfo the tool reports the Dolby Vision Level as BL+EL+RPU regardless of Enhacement Layer. There is (to my knowledge, there seems to be no extensive Documentation for MediaInfo) no way to check for MEL or FEL with the current version of MediaInfo. Would be a good addition to the tool. Feel free to correct me and close the issue if I'm wrong.

JeromeMartinez commented 1 year ago

We report what the Dolby Vision metadata says. In short we report EL if el_present_flag is set to 1. Is it the case on files without EL? Please share a MEL file and a FEL (no need to share a lot of content, 1 second is enough), link to my email if it can not be publicly shared, so we can debate about the issue based on concrete content.

v-tron commented 1 year ago

According to Dolby Vision Profiles and Levels Documentation Version 1.3.3:

grafik

Not sure how MakeMKV does it. I'm gonna try and cut some 1 second files for you to look at.

Tourosi commented 1 year ago

Any update for this feature request? I really want it!

JeromeMartinez commented 1 year ago

Waiting for files before I check more the specs.

Tourosi commented 1 year ago

Here are DV profile 7 mkv samples.

MEL : https://mega.nz/file/DGJU1BzL#4jtSK9Kvx2N6WuNdnQXyOi4NFEqLIymLrmSK5R8WilY FEL : https://mega.nz/folder/FSog3BhS#UzG3Mrrs_vuT1Qy-lZIhhg/file/Qe4FkAKK

Both makemkv and dovi_tool(https://github.com/quietvoid/dovi_tool) report MEL/FEL correctly.

JeromeMartinez commented 1 year ago

Thank you. I don't see an easy way to catch the difference without parsing the RPU, I have to implement the RPU parsing, it may take some time (not a priority of our sponsors so done on our free time).

PS: I also need at some point to merge the 2 video streams when present.

v-tron commented 1 year ago

Sorry for going AFK, thanks @Tourosi for providing the samples!

jessielw commented 3 months ago

IDK if it helps but makemkv can report them correctly/quickly as well. I took a small snippet from their files that reports it easily.

Check EL Layer.zip

Lang45 commented 2 months ago

I saw a saying. Looking at the bitrate for EL layer to identify MEL vs FEL

" MEL where the EL layer is a HEVC of padded 0 data - normally around 2000 kbps HEVC (frames+RPU metadata) stream, also play fine no issues on any so far.

MEL where the EL layer is a HEVC with “no” data - normally around 50-100 kbps HEVC (frames+RPU metadata) stream, always has issues at same points, some right from the opening titles.

(Note: the MEL with “no” data also play fine when switching down from lossless to Convert to MEL, P8)

Dune is an example of the last type a “no” data MEL - HEVC EL layer, basically just the RPU metadata in SEI of the HEVC stream. For this title I see the same issues at the same point as seen by others.

Looking at the bitrate for EL layer is typically enough to identify MEL vs FEL, the “no” data MEL in particular.

For those who want to identify definitively what the EL layer is, (presuming you have a mkv with the video in a single HEVC Container track) do the following:

Extract the HEVC Container Track from the mkv - using ffmpeg or mkvextract

Demux the Enhancement Layer (EL) from the HEVC Container Track - using dovi_tool

Make a new mkv from the extracted EL and play.

You will see a consistent unchanging green screen played in VLC, Infuse, IINA etc. for the “no” data MEL and I also see the same unchanging green screen for the 0 padded MEL (though others have said they see a grey screen for these), for an FEL title I get light grey/grey with some changing patterns and mild magenta/green - with more detail the higher the bitrate of the FEL (this is the extra “2 bits” of information DV will reuse to reconstruct the final output close to the original 12bit master)

Thinking out aloud and depending how far down the chain the player is processing the layers - one theoretical solution to the playback issue maybe to pad the “no” data MEL in real-time to act like a 0 padded MEL.

"

Original link:https://discourse.coreelec.org/t/dolby-vision-for-minix-u22x-j-max-and-ugoos-am6/24273/192 (These are user “cpm” post, which can be found by searching "cpm" in the forum.)

“ ”Taking UHD BluRay again as the example to put this in context: the HDR10 video track (often referred to as the Base Layer or BL) is composed (combined) with the 2nd additional Dolby Vision video track (often referred to as the Enhancement Layer or EL) on the device/box to produce the final output video.

There are two different types of EL found on Dolby Vision disc:

FEL - Full Enhancement Layer MEL - Minimum Enhancement Layer

FEL contain the additional video data that when combined with the BL gets very close to the original mastering material used to create the disc.

MEL actually contains no useful additional video data.

So what’s the point of MEL? - a reasonable question.

Both EL layer types FEL and MEL also carry HDR Metadata - simply put, data which states how the frame/scene should be considered for HDR - that is the dynamic HDR metadata of Dolby Vision. This Metadata is often referred to as the RPU (Reference Picture Unit).

So Dolby Vision BluRay can be:

BL + FEL (with RPU) BL + MEL (with RPU)

It is reasonable to state BL + FEL (with RPU) leads to the best quality.