Original sampling size in bits ?

Feature requests for VLC.
EricLux
Blank Cone
Blank Cone
Posts: 16
Joined: 24 May 2008 17:15

Original sampling size in bits ?

Postby EricLux » 24 May 2020 12:28

Hello,

At the end of 2018, a VLC developer decided to change the function that displays the resolution in bits of the media being played under "Tools>Codec Information>Bitrate:". Since that moment, we have info about the computer output resolution (which is always the same and usually 32bits) but most of all, and that is really annoying, we have strictly no more indication about the original encoding resolution of the played media.

I have a collection of more than 200.000 music titles encoded in 16, 24 and 32 bits and since 2018, I have no more easy way to figure out the original media resolution of the title I listen to (version 3 and above display 32bits for all of them!).

Would it please be possible to add an option with "Original sampling rate (KHz)" and "Original sampling size (bits)" somewhere under an info line of the VLC "Tools" menu ?

Thanks in advance for your feedback.

Kind regards,

Eric
Luxembourg

Lotesdelere
Cone Master
Cone Master
Posts: 10005
Joined: 08 Sep 2006 04:39
Location: Europe

Re: Original sampling size in bits ?

Postby Lotesdelere » 25 May 2020 11:42

+1
Obviously, this change is so useless for the end user that I still wonder why it has been made.

EricLux
Blank Cone
Blank Cone
Posts: 16
Joined: 24 May 2008 17:15

Re: Original sampling size in bits ?

Postby EricLux » 25 May 2020 13:50

Thanks for supporting this request. If anyone else agrees with this, please let it know too.

The strange and inconsitent thing with this unfortunate update is also that it only affects half the info because the sampling rate under "Tools>Codec Information>Sample rate:" is still the sampling rate of the original media while, at the very end, the audio stream is almost always upsampled to 192KHz/32Bits (or higher) before being passed to the decoder engine/chip. To be consistent, if any logic needs to be found (?!), the "Sample rate" could or should have been changed to the upsampled sampling rate passed to the output/decoder engine. But again, this does not say anything anymore about the original quality and definition of the media and I personnaly do not find this very useful (but that is just a matter of personal interest).

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

Re: Original sampling size in bits ?

Postby Rémi Denis-Courmont » 25 May 2020 16:43

If it is really literally "encoded in 16, 24 and 32 bits" samples, you will see it in the input codec informations. What VLC shows as "output" is what comes from the decoder, usually single precision float.

The format that actually goes to the DAC is a matter between your audio drivers and hardware, unknown to VLC. Likewise, what happens within the decoder is unknown to VLC, and a fortiori what happened within the encoder when the file was made.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

EricLux
Blank Cone
Blank Cone
Posts: 16
Joined: 24 May 2008 17:15

Re: Original sampling size in bits ?

Postby EricLux » 25 May 2020 19:50

Hello Rémi,
Thank you for feedback and for these interesting clarifications. When you state that "...you will see it in the input codec informations", I guess we agree that you speak from a developer perspective ? A standard user does not really "see" it anywhere or does he ? Did we miss a place where the input depth in bits is displayed and where it can be seen by the user ?
Thanks again for your assistance with this.

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

Re: Original sampling size in bits ?

Postby Rémi Denis-Courmont » 25 May 2020 21:06

I mean the codec infos. If I play an 8-bits sample, it says "PCM U8" as codec and 8 as bits per sample.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

EricLux
Blank Cone
Blank Cone
Posts: 16
Joined: 24 May 2008 17:15

Re: Original sampling size in bits ?

Postby EricLux » 26 May 2020 08:08

OK. I understand. As far as I am concerned I play mostly flac files so it always says "FLAC (Free Lossless Audio Codec) flac". For the few times that I play mp3 files it says "MPEG Audio Layer 1/2 (mpga)" so nothing to guess about the resolution of the source media. m4a and alac decoding do not mention the input bits size neither :(. In all VLC version 2.x, the information was displayed under "Tools>Codec Information>Bitrate:" so if you still have access to these sources then you have it too :).

EricLux
Blank Cone
Blank Cone
Posts: 16
Joined: 24 May 2008 17:15

Re: Original sampling size in bits ?

Postby EricLux » 29 May 2020 10:44

Dear Rémi. Do you think there is any chance that you or another developper will be willing and capable to help to get back the source sample size display functionality in VLC ?
Thanks for your help.
Eric

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

Re: Original sampling size in bits ?

Postby Rémi Denis-Courmont » 29 May 2020 17:59

VLC 4 already informs the "Bits per sample" out of the demuxer and the "Decoded bits per sample" out of the decoder. I don't understand what else it could do.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

EricLux
Blank Cone
Blank Cone
Posts: 16
Joined: 24 May 2008 17:15

Re: Original sampling size in bits ?

Postby EricLux » 31 May 2020 10:19

Hello Rémi,
That sounds great. I didn't know about the dev version 4 already containing the upgrade. That is great and I will try it. Did you put it in ?
Anyway, thanks a lot for taking the time to share you knowledge with us :).
Eric

EricLux
Blank Cone
Blank Cone
Posts: 16
Joined: 24 May 2008 17:15

Re: Original sampling size in bits ?

Postby EricLux » 31 May 2020 10:32

I just checked version 4 DEV... The info displayed under "Tools>Codec>Decoded format:" for a simple mp3 file is still showing "32 bits float LE (f32l)" whis is not the original sample of size an mp3 which are usually 24bits.
Same thing for standard 16bits CD musics or for my high resolution 24bits flac files that all display the same "Decoded bits per sample: 32bits" info. Again, 32bits is not the original resolution of these flac files. When you buy or rip high resolution music or master records, you get files encoded in 24bits resolution. Not in 32bits.

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

Re: Original sampling size in bits ?

Postby Rémi Denis-Courmont » 31 May 2020 10:46

Decoded bits per sample are the number of bits per sample in the decoder output. We are not going to make VLC lie to make you happy.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

EricLux
Blank Cone
Blank Cone
Posts: 16
Joined: 24 May 2008 17:15

Re: Original sampling size in bits ?

Postby EricLux » 31 May 2020 12:28

Hello Rémi,
I fully understand that response and that point of view and I am surely not going to ask VLC to lie about anything but please understand that when you download a file in CD format, you buy music encoded in 16Bits 44.1KHz. When you buy HD music on Qobuz, Linn Music, HDmusic, allflac.com, bandcamp, sometimes also called master records, you NEVER EVER buy a music encoded in 32bits ! You always get music encoded in 24bits with a sample rate at 44.1KHz, 48KHz, 88.2KHz, 96KHz or 192KHz. So please, let's not get into a discussion "I am right and you are wrong". This is not my point. In fact, I am even totally sure that you are right about your 32bits output but this is not an info that is really usefull for the one that buys HD music and who just wants to know if he is listeneing to one of his normal title or one of his HD title. If you display 32bits for all the music originally encoded in 16 and 24 bits for all the above listed combinations then you just do not get my point.
Is there any way we can reconcile our points of view and agree to show the 2 informations: your 32bits output of the decoder and the 16 or the 24bits original sampling size of the media being played ? It used to be displayed like this (16 or 24bits) in all VLC version 2.x.
If you further need to be convinced you can make a teamviewer on my machine and I will show a 200.000 titles collection of music with 16bits CDs and many other HD 24bits titles. There is not a single title originally encoded in 32bits.
Thanks.

EricLux
Blank Cone
Blank Cone
Posts: 16
Joined: 24 May 2008 17:15

Re: Original sampling size in bits ?

Postby EricLux » 31 May 2020 12:32

Here is the only definition of high resolution audio that speaks to a maybe naive but hardcore audiophile and music enthousiast like me.

https://en.wikipedia.org/wiki/High-resolution_audio

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

Re: Original sampling size in bits ?

Postby Rémi Denis-Courmont » 31 May 2020 13:48

If you play an Audio CD, VLC will show 16-bits PCM audio codec.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Lotesdelere
Cone Master
Cone Master
Posts: 10005
Joined: 08 Sep 2006 04:39
Location: Europe

Re: Original sampling size in bits ?

Postby Lotesdelere » 31 May 2020 14:20

the 16 or the 24bits original sampling size of the media being played ? It used to be displayed like this (16 or 24bits) in all VLC version 2.x.

Yes, exactly, it was there, it has been removed and I still wonder why this has been done.

And this info is still present in the log:

Code: Select all

flac debug: channels:2 samplerate:48000 bitspersamples:24

Not to mention the tab is named Codec and the option Codec Information, not Output Information.

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

Re: Original sampling size in bits ?

Postby Rémi Denis-Courmont » 31 May 2020 14:38

To state that, I guess you don't know what codec even means? Coder/decoder... is a process of converting between encoded and decoded forms.

VLC 4 shows the decoder input bits samping (if informed, usually not) and decoder output bits sampling (also if informed, usually so). There's is obviously no such thing as a "codec bits sampling". You're making no sense.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Lotesdelere
Cone Master
Cone Master
Posts: 10005
Joined: 08 Sep 2006 04:39
Location: Europe

Re: Original sampling size in bits ?

Postby Lotesdelere » 31 May 2020 14:58

We are talking about the file information, nothing else, and you know it. The coding part, the coded file, which does matter for the user.
This information was there in VLC v2.x, it has been removed and replaced with the output information in VLC v3.x so the question remains: why ? Why has this been done ?
Because someone has done this on purpose, so what is this purpose ?

And we are talking about VLC 3.x because this is what most people are using: the latest release as of today.

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

Re: Original sampling size in bits ?

Postby Rémi Denis-Courmont » 31 May 2020 15:57

We are talking about the file information, nothing else, and you know it.
First, we are talking about audiophile "features". In the broader open-source multimedia community, audiophile has become, for good reasons, a synonym with deluded idiot. At this point, they're pretty much become the community butt-monkeys. And I don't state this as my personal value judgement, but as an observation on many community members. Now, you can imagine how little developers care about those so-called "features", and how pissing them like now, is only making their opinion even more disfavourable.

And second, the fact of the matter is that the codec panel is supposed to show info about tracks, not files. And that's what it does. VLC 4.0 shows:
  • the decoded sample size, if it exists: usually 32 bits as most decoders output single precision floating point.
  • the original sample size, also if it exists: usually absent, as most audio codecs are not sample-based. Alternatively it will show in its stead any value informed by the demuxer.
However it turns out that demuxers typically don't, and mostly can't, inform this either.

What the original sample depth of the original PCM media was, VLC does not know and does not care.
The coding part, the coded file, which does matter for the user.
First, it does not matter. In particular, it won't affect the rendering quality. And anyway VLC 4.x does report that, even though it hardly makes sense. It's not what audiophiles want: they want the original bit depth of the media before it was encoded. That is very rarely available, or even defined.
This information was there in VLC v2.x, it has been removed and replaced with the output information in VLC v3.x so the question remains: why ? Why has this been done ?
Because someone has done this on purpose, so what is this purpose ?
VLC is open-source. You can browse the history and find out. I have more interesting things to do with my time.
And we are talking about VLC 3.x because this is what most people are using: the latest release as of today.
The "latest release" is what it is. Nobody can go back in time to change it. This forum section, literally the feature request section, is about future versions. Whether you like it or not.

You don't get to override VLC development processes, and even less the law of physics.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Lotesdelere
Cone Master
Cone Master
Posts: 10005
Joined: 08 Sep 2006 04:39
Location: Europe

Re: Original sampling size in bits ?

Postby Lotesdelere » 01 Jun 2020 09:21

So, you don't know the reason why this change has been done between VLC 2.x and VLC 3.x ?

EricLux
Blank Cone
Blank Cone
Posts: 16
Joined: 24 May 2008 17:15

Re: Original sampling size in bits ?

Postby EricLux » 01 Jun 2020 11:56

Hello Rémy,

I am sorry that this discussion is taking an aggressive turn because I really enjoy and value your input. Now if you or others want to consider audiophiles as a butt-monkey, I find this a bit mean but I will survive it :). BTW, I am also sure that you would find it quite enjoyable and enlightening to listen to my butt-monkey sound setup (but this I will not discuss here unless friendly monkeys want to open a separate special thread on this subject).

Regarding the additional info that you share, I would also like to underline that I am again 100% in line with you. The output format of your codec routine is 32bits. There is no discussion about this.

But again, did you read my previous message? The music industry does not produce nor sell any music in 32bits format. The formats being sold are 16, 20 or 24 bits. Do we and do you agree on that or do I have to spend more time trying to “prove” this to you?

If we agree on the above, and I hope that we do because everything goes from there (?), when VLC gives me that 32 bits information, for me it is as if I have 2 pictures that I want to print, one taken in 8bits colour depth (256 colour palette) and another one taken in 16bits (65.536 colour palette) and you would always answer me that the picture has been upgraded to a 4.294.967.296‬ colour palette (32bits) because 32bits is the colour depth that is further used and supported by my printer. OK, that could have some (limited) interest but even with that upscaling to 32bits, the photo taken with 256 colours will just never look and come out as good as the one taken with 65.536 shades… The same goes with music files.

Regarding audio CD, you are right, the name of the codec used contains the number 16 in it but once you extract a track to wav, the codec used does not mention any original bit depth anymore... and you're just left with the constant 32bits output information.

So again, all we would love to see back in VLC is an additional line with the original resolution of the media being played – like the original number of colours available on my original colour palette in the above pictures example.

Again, and I can’t insist more on this, this is not in contradiction with the 32bits output info. This would just be an additional info and all the monkeys can remain friends :D .

Thanks for your help.

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

Re: Original sampling size in bits ?

Postby Rémi Denis-Courmont » 01 Jun 2020 17:17

But again, did you read my previous message? The music industry does not produce nor sell any music in 32bits format. The formats being sold are 16, 20 or 24 bits. Do we and do you agree on that or do I have to spend more time trying to “prove” this to you?
If we're talking about music in uncompressed audio formats such as Audio CD, yes.
But a lot of music is sold in compressed formats such as MP3, AAC or FLAC these days.
If we agree on the above, and I hope that we do because everything goes from there (?), when VLC gives me that 32 bits information, for me it is as if I have 2 pictures that I want to print, one taken in 8bits colour depth (256 colour palette) and another one taken in 16bits (65.536 colour palette) and you would always answer me that the picture has been upgraded to a 4.294.967.296‬ colour palette (32bits) because 32bits is the colour depth that is further used and supported by my printer. OK, that could have some (limited) interest but even with that upscaling to 32bits, the photo taken with 256 colours will just never look and come out as good as the one taken with 65.536 shades… The same goes with music files.
That analogy fails miserably because video is mostly 8-bit. Until the recent (and still very limited) advent of 10-bit or 12-bit, it was pretty much only 8-bit. And VLC does not print that info explicitly anyway; at best, you can guess it from the codec-dependent profile value.
Regarding audio CD, you are right, the name of the codec used contains the number 16 in it but once you extract a track to wav, the codec used does not mention any original bit depth anymore... and you're just left with the constant 32bits output information.
No. WAV files show the bit depth in the codec name just as Audio CD's do. And I just (re)tested it. On VLC 3.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

EricLux
Blank Cone
Blank Cone
Posts: 16
Joined: 24 May 2008 17:15

Re: Original sampling size in bits ?

Postby EricLux » 01 Jun 2020 19:31

I am glad that we agree that the music industry does not sell 32bits music.

When you then state:
But a lot of music is sold in compressed formats such as MP3, AAC or FLAC these days.
...it is true but sounds as if you are trying to imply that these formats are not in 16, 20 or 24 bits when uncompressed (?). You probably know this but when flac or alac are uncompressed you also have music in 16, 20 or 24 bits. You don't need VLC to make this point. Any other good music player program like foobar2000, dbPowerampor, winamp and more will confirm this too. Again, none of these lossless compressed format get converted in 32bits when they are uncompressed and when you simply look at what you have before trying to process anything. Same if you convert them to wav files. You get files in 16, 20 or 24 bits but no 32bits...

About the codec for wav files. There is indeed a number in the codec name label that indicates the music resolution. My mistake. I work with flac files because they take less space and nothing indicates the number of bits used in their codec names (maybe you could change that so that the codec names for flac would always state 16, 20 or 24 according to the original media bit depths?).

A bit further you almost hurt my feelings with your quick judgement about my analogy but you've obviously been too quick:
That analogy fails miserably because video is mostly 8-bit. Until the recent (and still very limited) advent of 10-bit or 12-bit, it was pretty much only 8-bit. And VLC does not print that info explicitly anyway; at best, you can guess it from the codec-dependent profile value.
Can you please read my illustration again because I wasn't talking anywhere about video! I was talking about printing pictures with original image formats in 256 or 65.000+ colours... So luckily, maybe this wasn't so "miserable" after all ? You tell me after you've read it again ?

You sound as if you are really willing to prove that what we are (butt-monkeys) asking a feature that makes no sense at all (while it does make plenty of sense) and that it is even not possible to do this. So if you just do not want to support this then fine. It is very sad but as far as feasibility is concerned, it is very possible. It was always possible and in the VLC code until version 2.2.8. So I can understand that it is not always possible for every audio format (again this is true) but please do not state that it is not possible because this would be just wrong. If this is what you think then please act like a scientist and go have a quick look at the related portion of code of every version until version 2.2.8 and you will see that it was possible for many audio formats and working perfectly.

Merci pour ton aide grand maître :P

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

Re: Original sampling size in bits ?

Postby Rémi Denis-Courmont » 01 Jun 2020 20:15

But a lot of music is sold in compressed formats such as MP3, AAC or FLAC these days.
...it is true but sounds as if you are trying to imply that these formats are not in 16, 20 or 24 bits when uncompressed (?).
When uncompressed, they are whatever the decoder implementation makes them. Most open-source audio decoders included in VLC output single precision floating point, meaning 24-bit precision (mantissa) out of 32 bits per sample.

Of course, some audio formats have an internal bit precision, which is something else. Lossless formats have to have a precision to preserve; otherwise they wouldn't be lossless. For instance, FLAC supports from 4 to 32 bits, but that's an internal detail of the decoder. VLC allows the demuxer to provide that value info. If provided, it will be shown in the codec infos.

But there are no reasons to force it or to go out of our way to enable it, and even less to spend hours finding out why it allegedly disappeared in VLC 3. The perceptual sensitivity of the human ear is lower than 16 bits anyway, so making a distinction between 16, 20 or 24 is audiophile BS. If you could hear the difference, you wouldn't need the player to tell you about it.

If you care so much, it's open-source so you can fix it yourself.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

EricLux
Blank Cone
Blank Cone
Posts: 16
Joined: 24 May 2008 17:15

Re: Original sampling size in bits ?

Postby EricLux » 01 Jun 2020 21:45

...why it allegedly disappeared in VLC 3.
"allegedly" Really? You don't believe us? I could post print screens if you want... but you obviously don't care because your own science has spoken when you take the shortcut to state that difference between 16, 20 and 24bits is just audiophile BS. Problem solved :) ! Bravo. Thanks doctor. That really helps us all out except that it does not reconcile at all with your "client" feature request.

Anyway, if another developper reads this with a more open mind and does not agree with the BS statement, I would be happy to make a generous donation (I already made many of them in the past) to VLC to get this back to work (because I am not a VLC developper and because this is not the "If you want it, program it yourself section").

At the end, it is probably just about getting back to the piece of code of version 2.2.8 or below to see how the feature WAS implemented (not allegedly) and copy/paste that working code to a new butt-monkey line in the "Tools>Media information" menu (not in the "Codec information" section of course).

If any other VLC users are following this, I would also love to know if you all find that this feature request is just BS or if it does make some sense to you ?

Thanks guys.

Thanks Rémi for your time.


Return to “VLC media player Feature Requests”

Who is online

Users browsing this forum: No registered users and 31 guests