As M4A audio files can have either ALAC or AAC audio codec streams, it would be extremely useful if pacpl could choose a decoder for M4A files only after analyzing the audio streams they contain: if the codec is ALAC, the default decoder can be ffmpeg or alac-decoder, but if it's AAC then the decoder would could be faad. Currently, pacpl decides the decoder based only on the extension (M4A), choosing faad as the default, so it fails to automatically decode M4A files with ALAC audio codec — of course, it can decode ALAC-based M4A files with command-line option --decoder ffmpeg
, but it would be useful if pacpl could decide that automatically, without manual intervention.
To accomodate this feature request, I modified pacpl so that it chooses the decoder/encoder based on the codec of the audio file. For m4a files, it gets the codec by calling
Audio::Scan->scan_info(<file>)->{info}->{tracks}[0]->{encoding}
, and for the other audio files, it treats the extension as the codec. To that end, I removed the m4a entry from%run
, and added entries for mp4a and alac, which are the codecs that Audio::Scan reports for m4a files with AAC codec and m4a with ALAC codec, respectively.So, effectively, only the handling of m4a files has been changed.
I've attached a patch.
How would you like a job?
On Mon, Mar 26, 2018, 3:12 PM "Paulo Marcel Coelho Aragão" marcelpaulo@users.sourceforge.net wrote:
Related
Feature Requests:
#5Patch implemented. Lets try to get on the same page conserning the app version number =)