Bitconversion Question #1315
-
Hello, my mpd.log, running mpd on FreeBSD, I see following entries I would like to understand: Oct 27 14:41 : decoder: audio_format=44100:24:2, seekable=true Now I am wondering, what does f= stand for and why are we apparently converting a 24 Bit file first to 16Bit to then again convert it to 32BBit? Now latter one is required by the DAC and configured by me therefore, but why this step in the middle? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
MPD/src/filter/plugins/NormalizeFilterPlugin.cxx Lines 66 to 69 in 72ba98c It is true that this is an unnecessary loss of quality, and the plugin could as well be implemented for 24 bit, but nobody has done it. This plugin is mostly unchanged (minus code refactoring) since before I joined the MPD project (i.e. 2008), and at the time, MPD did not support more than 16 bit. |
Beta Was this translation helpful? Give feedback.
-
Thanks very much for your fast reply. I am not in front of the system right but I do know, I do have normalisation enabled. f for filter makes of course absolute sense. I will disable it for verification later on and report back. Meanwhile, the loss in quality is not an issue for me, as not audible for my ears, I have just been curious what is going on. And it's filter processing. An ordinary audio chain in the end, it just did not think about this Thanks again. |
Beta Was this translation helpful? Give feedback.
-
Thanks again. Indeed, the whole hifi business seems to be a rewarding object of study for the power of [auto]suggestion. So I've removed the normalisation, I still have a filterpart in the chain, but it does not do anything any more, so no more conversion. Your guess was spot on. Interestingly enough however, the input file is always being treated as 24 Bit wide, even though this time I've explicitly used one 16Bit and one 32Bit mp3: 16Bit mp3: A 32Bit mp3: But maybe this is due to the use of the libmad decoder, as with ogg I do get less output - and not even a hint of a filter chain: Oct 28 22:50 : playlist: play 40:"testfiles/compressed/f32le_192.ogg" Oct 28 22:50 : playlist: queue song 41:"testfiles/compressed/s16le_192.ogg" This is still a rather minimal mpd install even without ffmpeg, hence I cannot even play .wav files, but that is ok for now. And again, this does in no way hamper my enjoyment with using mpd, just trying to gain some understanding. And I will revert to normalisation. |
Beta Was this translation helpful? Give feedback.
-
Indeed, I replaced mad with mpg123 and the output now is 16BIt. Probably because that is, what mpg123 put out. And I fell for the logging. The convert line, like f.e.: output: converting in=192000:f:2 -> f=192000:f:2 -> out=192000:32:2 only seems to appear in the log, if a file has a different sampling rate and/or format then the previous one. Or maybe after the device (soundcard) had been closed. I did not notice this before. So as you've mentioned, also ogg or flac display the filter, meeting above conditions. long form (with convert): Short form (without convert) Thanks again for your time and support. Helped a great deal in understanding. Stay safe |
Beta Was this translation helpful? Give feedback.
f=
is the format required by the filter. To know which one, I'd need to see your configuration and know your MPD version, but if I had to guess, I'd say you have enabled volume normalization. That plugin is only implemented for 16 bit, and this is the part of the source code which enforces it:MPD/src/filter/plugins/NormalizeFilterPlugin.cxx
Lines 66 to 69 in 72ba98c
It is true that this is an unnecessary loss of quality, and the plugin could as well be implemented for 24 bit, but nobody has done it. This plugin is mostly unchanged (minus code refactoring) s…