kaworu / tagutil

scriptable music files tags tool and editor
BSD 2-Clause "Simplified" License
30 stars 2 forks source link

Better handling of Opus tags #55

Open haplo opened 1 month ago

haplo commented 1 month ago

tagutil backend on an Ogg Opus file returns TagLib, and as expected only the basic tags are returned.

opustags uses libogg and can display and manipulate all tags.

I'm not at all aware of the technical details, but would it be a good idea to switch from libvorbis to libogg so Opus file could be better handled or is there something that libvorbis does better?

kaworu commented 3 weeks ago

Hi @haplo and thanks for the report.

To clarify: we're using both libogg and libvorbis. We need libogg to find/replace the vorbis comment packet (and potentially re-write all following packet), libvorbis is used to extract / build tags from / into the comment packet.

I didn't look into details, but I guess to implement opus we would need to use libogg in about the same way as for ogg/vorbis, and then either write our own code to handle the comment packet (like opustags) or use another library like libopusenc (see this example).

Unfortunately I don't have the time to look further into an implementation, but I'll gladly review a PR if someone is willing to pick it up :pray:

haplo commented 3 weeks ago

Thank you for your reply @kaworu.

I cannot commit at this moment to work on this feature, but it's encouraging to know that libogg is already integrated and that the parsing should be similar that to that of ogg/vorbis files.

I will be relying on opustags for the time being, but tagutil is a great one-stop shop and I wish this feature gets implemented at some point.