Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Rockbox ignores ogg comment fields?
« previous next »
  • Print
Pages: [1]

Author Topic: Rockbox ignores ogg comment fields?  (Read 93 times)

Offline bbail

  • Member
  • *
  • Posts: 8
Rockbox ignores ogg comment fields?
« on: February 15, 2021, 04:12:09 PM »
I was trying to tag some music files so that I could display source information on tracks. I figured I could enter characters into the disk tag field in the meta data, however, Easytag constrained the characters to numbers and - and / and interpreted the - and / differently between ogg and mp3 and saved them to file differently.
Rockbox also interpreted the characters in %ik differently depending on whether it was from ogg or mp3 files. %ss(0,1,%ik) produced different results.
According to the ogg vorbis docs, I see no reason why any field couldn't accept ascii characters from 0x20 to 0x7D except '='.

I gave up on using the disk tag and tried the comment tag. I can read the comment tags in mp3 using %iC and get substrings by using %ss(0,2,%iC), but the comment field is completely ignored in ogg files.
Easytag saves comments in an ogg tag field named DESCRIPTION.
Is Rockbox expecting a different tag name? Otherwise, why does Rockbox ignore ogg comment fields?
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8984
Re: Rockbox ignores ogg comment fields?
« Reply #1 on: February 15, 2021, 04:27:28 PM »
Vorbis comments are commonly labeled as "COMMENT":  http://age.hobba.nl/audio/mirroredpages/ogg-tagging.html

This what rockbox expects:  https://git.rockbox.org/cgit/rockbox.git/tree/lib/rbcodec/metadata/metadata_common.c#n313

Internally the database stores track/disk numbers as integers. 
Logged

Offline bbail

  • Member
  • *
  • Posts: 8
Re: Rockbox ignores ogg comment fields?
« Reply #2 on: February 17, 2021, 01:44:57 AM »
id3 tags include a media tag TMED which would be appropriate, but is unsupported in Rockbox.
Same with TXXX, user text frame.
A vorbis comment tag field could also be added, MEDIA=, but again unsupported.

In metadata_common.c I found these lines:

    else if (strcasecmp(name, "comment") == 0)
    {
        p = &(id3->comment);
    }

I believe I could add the following lines in order to have Rockbox parse the ogg vorbis comment field labeled DECSCRIPTION by Easytag and have access to it using %iC:

    else if (strcasecmp(name, "description") == 0)
    {
        p = &(id3->comment);
    }


I decided to take another look at the disc field.
Using Easytag to change the field in both mp3 and ogg files, I was able to enter various letter and number and other characters into the field. I was confused by the fact that Easytag doesn't display the tag correctly, but the characters are indeed in the field.

Rockbox doesn't allow # and % to be tested in the field, but does allow them in the field.
Otherwise, ! $ & work to be tested and letters, of course.
So I was finally able to output what I wanted using the following line.   Output depends on whether the disk field is empty, has a number, or starts with L.

%ac%?in<TK %in  %?if(%ss(0,1,%ik), =, L)<LP %ss(1,-,%ik)|%?ik<CD %ik>>|%?ig<%ig|%d(1)>>%ar%fb kb/s

So all is good and I don't need to use the comment field.

Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Rockbox ignores ogg comment fields?
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.113 seconds with 21 queries.