Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose primaries and trc in video codec VideoCodecParameters #265

Open
23doors opened this issue Dec 18, 2024 · 7 comments
Open

Expose primaries and trc in video codec VideoCodecParameters #265

23doors opened this issue Dec 18, 2024 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@23doors
Copy link

23doors commented Dec 18, 2024

Is your feature request related to a problem? Please describe.
Without primaries and trc in media info, there seems to be no way to figure out if video has HDR or not.

Describe the solution you'd like
MDK already parses primaries and trc from codec, expose it so that mediainfo() can access these as well.

@wang-bin wang-bin added the enhancement New feature or request label Dec 19, 2024
@wang-bin wang-bin self-assigned this Dec 19, 2024
@23doors
Copy link
Author

23doors commented Dec 19, 2024

DV files I guess would need DV profile as well? Or something to differentiate them from SDR files

@23doors
Copy link
Author

23doors commented Dec 20, 2024

Ideally, also expose embeded subtitle track parameters, specifically forced and default

@wang-bin
Copy link
Owner

Ideally, also expose embeded subtitle track parameters, specifically forced and default

what is forced and default?

@23doors
Copy link
Author

23doors commented Dec 21, 2024

Ideally, also expose embeded subtitle track parameters, specifically forced and default

what is forced and default?

Mkv has multiple track flags:
FlagDefault, FlagForced, FlagHearingImpaired, FlagVisualImpaired, FlagTextDescriptions, FlagOriginal, FlagCommentary etc. https://www.matroska.org/technical/elements.html

Not sure about other containers but HLS and DASH also have these, just way less standarized and not so common. But in mkv it is very commonly used.

@23doors
Copy link
Author

23doors commented Dec 26, 2024

I guess adding these to streaminfo metadata like language and title are added would be more than enough. Workaround for getting trc, primaries and dolby profile is to parse logs when opening media, but it's not exactly dependable if there is more than 1 player. And well, mkv track forced, default etc flags are not shown there.

wang-bin added a commit to wang-bin/libmdk-capi that referenced this issue Jan 3, 2025
@wang-bin
Copy link
Owner

wang-bin commented Jan 3, 2025

this build add color space(only a few but almost enough to detect hdr) and dolby vision profile

streaminfo c struct is not able to add new members without abi break, so track flags will not be added soon. metadata is an option

@23doors
Copy link
Author

23doors commented Jan 3, 2025

Thank you, will test soon. Regarding track flags - track title/label and language is already a part metadata so I guess it makes sense to add it there as well. To avoid breaking compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants