metabrainz / picard-plugins

Picard plugins: use 1.0 branch for Picard < 2.0 (python 2/Qt4) and 2.0 branch for Picard >= 2.0 (python 3/Qt5)
https://picard.musicbrainz.org/plugins/
145 stars 94 forks source link

Added losslessfuncs plugin #375

Closed phw closed 6 months ago

phw commented 6 months ago

This adds two helper functions $is_lossless() and $is_lossy() to help tagging files depending on whether they are in a lossy or lossless format.

The detection is not actually based on the audio codec but uses formats and some heuristics. While not perfect and does the right thing in the majority of cases and it is an essential part of my file naming script for years. The limitation would be a reason for me not to include it in Picard itself, but as a plugin I think it is fine.

The plugin is already in active use by others as well, see the discussions in the forums:

https://community.metabrainz.org/t/categorizing-lossless-music/258530/ https://community.metabrainz.org/t/is-lossless-plugin-no-longer-working-with-m4a/469429