Page 1 of 1
Codec integer lookups
Posted: 23 Jul 2023 18:56
by dls1138
I am using VLCkit to build a video player on macOS. I want to display video and audio codec information. When I scan the media I can see that I have a video codec of 1668703592, and an audio codec of 1630826605.
My question is: where/how can I look up these integers to resolve them to a human-readable codec name?
I don't see a lookup for these of any kind in the source, or am I barking up the wrong tree.
Thanks.
Re: Codec integer lookups
Posted: 24 Jul 2023 15:13
by Rémi Denis-Courmont
You can look them up in the VLC sources. They are not part of the LibVLC stable interface, so they are not and will not be exposed via LibVLC.
Re: Codec integer lookups
Posted: 25 Jul 2023 18:46
by unidan
Hi
My question is: where/how can I look up these integers to resolve them to a human-readable codec name?
Those numbers are usually fourcc, so they are integer representation of a 4-character text. You can get each character by masking, shifting and reading the first byte. They might be "usual" but they is no "standard" representation guaranteed so you can only use that for displaying.
Re: Codec integer lookups
Posted: 27 Jul 2023 18:18
by dls1138
Thanks, everyone. I will go take a look.
Re: Codec integer lookups
Posted: 27 Jul 2023 20:17
by dls1138
It worked. I have exactly what I need. Thanks again Rémi and unidan for all the help.
Re: Codec integer lookups
Posted: 31 Jul 2023 21:26
by wbtcpip
i use libvlc_media_get_codec_description for this and works well
Re: Codec integer lookups
Posted: 01 Aug 2023 05:17
by Rémi Denis-Courmont
That's okay for displaying to the user but you can't rely on that to identify a specific codec in code.