enzo1982 / freac

The fre:ac audio converter project
https://www.freac.org/
GNU General Public License v2.0
1.37k stars 70 forks source link

Tags lost during FLAC-->Opus conversion #295

Open TimK65 opened 2 years ago

TimK65 commented 2 years ago

Hello,

I'm using fre:ac 1.1.6 under Linux Mint 20.3.

I use the "popularimeter" tag to rate tracks so I can automatically build playlists of my favorite songs. However, I'm finding that fre:ac is not propagating this tag from FLAC files to Opus files on conversion. I have looked through the interface, but I don't see a way to tell fre:ac to propagate that tag, or anything else that might be helpful.

I'm reporting this as a bug because it has worked in the past. I've used earlier versions of fre:ac to convert from FLAC to Opus and the popularimeter tag has survived the conversion.

Best regards, Tim Kynerd

enzo1982 commented 2 years ago

Hi,

fre:ac never supported the popularimeter/rating tag for Vorbis Comment tags (which are used for both, FLAC and Opus). However, I'm willing to add support for it.

The tag name in Vorbis Comment is usually RATING, though, not POPULARIMETER. The RATING tag is specified as a number between 0 and 100 that is often mapped to a 1 to 5 star rating. I could not find any specification for a POPULARIMETER tag for Vorbis Comment.

However, some applications might call it "popularimeter" in their interfaces, but actually use RATING as the tag name. Is that the case with your files? Or do you actually use POPULARIMETER as the tag name and if so, what is the value range?

I'll probably also add support for verbatim copy of unknown Vorbis Comment tags soon, so even if you're using a custom scheme with POPULARIMETER as the tag, that would work with that option. The regular RATING tag will be supported sooner, though.

TimK65 commented 2 years ago

Hi Robert!

Thank you for getting back to me. I apologize in advance for my rather long response.

It's very possible that I used another conversion program for this, but fre:ac is my favorite, so I figured it was what I had used. Having reinstalled Linux, I didn't initially find fre:ac, so I installed soundConverter (Gnome) and soundKonverter (KDE, of course) and tried them, but each of them choked on a different subset of my files (for different reasons, that is), and neither of them propagated POPULARIMETER, either.

The only audio file tag editor I have found that supports any kind of tag for rating is Puddletag, and it supports POPULARIMETER but nothing called RATING. I haven't found another tag editor for Linux that supports either.

POPULARIMETER has the following format: :xxx:x The first field, xxx, is a three-digit number in the range 0 to 255; this is the actual rating. The second field, which I've shown as x, is a play count. Obviously it can go higher than 9. I just elected to show it with a single digit. I don't use the play count for anything.

I'm certainly not married to POPULARIMETER, but I need a tag that's supported by a tag editor I can reliably use in Linux. (As you may know, audio file tag editors are notorious for sometimes writing things you didn't intend, and even occasionally corrupting files.) I wouldn't mind converting to a different tag and a different editor, and even doing minor rewrites to my Python scripts to handle the different tag, as long as I knew everything would work reliably.

Best regards, Tim Kynerd

TimK65 commented 2 years ago

By the way, I discovered that the opusenc utility preserves all metadata when converting directly from FLAC to OPUS, so I ended up "rolling my own" by writing a couple of bash scripts to iterate over my music and do the conversion. So this issue is resolved from my point of view, in the sense that I no longer need help.

dbolton commented 1 year ago

I just wanted to add that no meta data is saved when ripping to or converting to Opus format. Track title, album, artist, etc. are all absent in the final opus files.

Retengart commented 4 months ago

@enzo1982 is it possible to save lyrics from flac when converting to opus? For example, opus-tools can handle this, but why fre:ac can't...