Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Suggestion for upcoming HDCD filter #635
Actually just a suggestion for your HDCD filter code under construction for mpd v0.22. I read in another closed issue here that the FFmpeg HDCD filter is NOT guaranteed to not do anything when non-HDCD 16/44.1 PCM data are input to it - really bad. Your HDCD filter is already written so as to just call the null filter when the data is not 16/44.1, great.
I would like to suggest a mechanism for the mpd HDCD filter that could be similar to what Christopher Snowhill (aka Chris Moeller aka kode54) built into his HDCD DSP for foobar2000. He completely bars the HDCD DSP from being instantiated when a metadata tag ”HDCD“ is set to ”no“.
So, if mpd would be able to read a tag ”HDCD“ from the metadata of a given track after checking for 16/44.1, then your mpd HDCD filter could call the FFmpeg HDCD filter only if this tag is ”yes“, and just call the null filter if such ”HDCD“ tag is not present or is ”no“.
In this way
Thank you for considering this suggestion.
No, I do not know precisely what FFmpeg‘s HDCD filter does in case of non-HDCD 16/44.1 PCM data. Just took your comment #513 (comment) as indicating ”no guarantee for leaving non-HDCD intact“. I took a look at the FFmpeg af_hdcd code, but oh boy...
Such metadata tag would help mpd to not bother with non-HDCD tracks at all when the mpd HDCD filter is enabled.
The hassle for you would be to make mpd aware of an ”HDCD“ tag.
As a user, one could add such a tag to the entire music library quite easily and outside of any player. Could e.g. be using FFmpeg in a shell script.
Plus, there must have been a reason for kode54 to quite recently put this ”barring HDCD DSP by such a tag“ into his HDCD foobar2000 component. His HDCD code ended up in the FFmpeg HDCD filter (aka Chris Moeller) and was enhanced there by others (Burt P.).