Codec integer lookups

This forum is about all development around libVLC.
dls1138
New Cone
New Cone
Posts: 3
Joined: 23 Jul 2023 18:49

Codec integer lookups

Postby dls1138 » 23 Jul 2023 18:56

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.

Rémi Denis-Courmont
Developer
Developer
Posts: 15287
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Codec integer lookups

Postby Rémi Denis-Courmont » 24 Jul 2023 15:13

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.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

unidan
Developer
Developer
Posts: 1493
Joined: 25 Mar 2018 01:00

Re: Codec integer lookups

Postby unidan » 25 Jul 2023 18:46

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.

dls1138
New Cone
New Cone
Posts: 3
Joined: 23 Jul 2023 18:49

Re: Codec integer lookups

Postby dls1138 » 27 Jul 2023 18:18

Thanks, everyone. I will go take a look.

dls1138
New Cone
New Cone
Posts: 3
Joined: 23 Jul 2023 18:49

Re: Codec integer lookups

Postby dls1138 » 27 Jul 2023 20:17

It worked. I have exactly what I need. Thanks again Rémi and unidan for all the help.

wbtcpip
Blank Cone
Blank Cone
Posts: 14
Joined: 13 May 2021 16:21

Re: Codec integer lookups

Postby wbtcpip » 31 Jul 2023 21:26

i use libvlc_media_get_codec_description for this and works well

Rémi Denis-Courmont
Developer
Developer
Posts: 15287
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Codec integer lookups

Postby Rémi Denis-Courmont » 01 Aug 2023 05:17

That's okay for displaying to the user but you can't rely on that to identify a specific codec in code.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 25 guests