MediaInfoLib icon indicating copy to clipboard operation
MediaInfoLib copied to clipboard

Feature Request: Dolby Vision Content Mapping Version (CMV) Detection

Open infomaniac777 opened this issue 2 months ago • 5 comments

Problem: MediaInfo currently reports Dolby Vision metadata (profile, level, layers) but not the Content Mapping Version (CMV), which identifies the mapping standard (v4.0 or v2.9).

Proposed Solution:

  • Extract CMV from Dolby Vision streams using external tools (dovi_tool + ffmpeg)
  • Add a new field Video_HDR_Format_CMV to expose the raw CMV value
  • Display CMV in the HDR format line when known (CM v4.0 or CM v2.9) for clarity
  • Use optimized single-frame extraction to minimize performance impact

Implementation Approach:

  • Use dovi_tool to extract RPU data and ffmpeg for efficient frame extraction
  • Only activate when MEDIAINFO_ADVANCED is enabled and external tools are available
  • Gracefully degrade if tools are missing (no error, simply no CMV data)

Is this feature direction acceptable? If so, I can prepare a PR with the implementation. If you suggest a different approach, I can adjust.

infomaniac777 avatar Nov 06 '25 03:11 infomaniac777

Just need to modify https://github.com/MediaArea/MediaInfoLib/pull/2392. No external tools needed.

cjee21 avatar Nov 06 '25 07:11 cjee21

Use dovi_tool to extract RPU data and ffmpeg for efficient frame extraction

FFmpeg plugin is for when we need to decode content (we don't want to implement a full decoder in MediaInfo), and if I understand well the need, here it is bitstream parsing (no need to decode) so it should be directly in MediaInfo. https://github.com/MediaArea/MediaInfoLib/pull/2392 is pending my review (sorry @cjee21 for the delay) and it seems to be enough for peeking the CMV value, doesn't it? Do you know where in the bitstream is the value you are wanting to peek?

JeromeMartinez avatar Nov 06 '25 07:11 JeromeMartinez

Do you know where in the bitstream is the value you are wanting to peek?

Value is not directly in bitstream. I have already added comments for CMv in the PR. Just need to modify to add a field for it in the struct.

cjee21 avatar Nov 06 '25 07:11 cjee21

I have already added comments for CMv in the PR.

Thank you, I'll check that.

JeromeMartinez avatar Nov 06 '25 07:11 JeromeMartinez

#2392 seems to be a better implementation to solve this problem. So I'll pause any implementation for this at my end. Assuming @cjee21 intends to complete the CMV part as well. Thanks !

infomaniac777 avatar Nov 06 '25 12:11 infomaniac777