Unsupported encoding for synced lyrics added with mutagen

Issue description:

Hi there,

First of all thanks for this awesome piece of software!

I use mutagen to write SYLT frames in MP3 files, e.g. with tags.add(SYLT(encoding=Encoding.UTF8, type=1, format=2, text=res)).

UTF8 is coded as 0x03: mutagen/mutagen/id3/_specs.py at main · quodlibet/mutagen · GitHub

The spec confirms that 0x03 holds for UTF-8: id3v2.4.0-structure - ID3.org

$03 UTF-8 [UTF-8] encoded Unicode [UNICODE]. Terminated with $00.

exiftool shows that the first byte of the frame is indeed 0x03:

  | SynLyrics (SubDirectory) -->                                                                                       
  | - Tag 'SYLT' (1089 bytes):                                                                                         
  |     0000: 03 58 58 58 02 01 00 20 50 61 73 20 64 75 20 63 [.XXX... Pas du c]                                       
  |     0010: 6f 75 72 61 67 65 20 63 27 65 73 74 20 64 27 6c [ourage c'est d'l]                                       
  |     0020: 27 69 6e 63 6f 6e 73 63 69 65 6e 74 00 00 00 36 ['inconscient...6]                                       
  |     0030: d6 20 4e 61 75 66 72 61 67 65 20 76 6f 6c 6f 6e [. Naufrage volon]                                       
  |     0040: 74 61 69 72 65 2c 20 6e 6f 69 65 20 6d 65 73 20 [taire, noie mes ]                                       
  |     [snip 1009 bytes]                                                        

Not sure how to interpret the above part saying the encoding must end with 0x00, but the specs for the header of SYLT frames confirms it holds on one byte:

<Header for 'Synchronised lyrics/text', ID: "SYLT">
Text encoding        $xx
Language             $xx xx xx
Time stamp format    $xx
Content type         $xx
Content descriptor   <text string according to encoding> $00 (00)

Other programs such as go-sylt are able to correctly read the lyrics.

The relevant logs on the app are:

2025-11-14 04:36:14.540 Error/MusicPlayer: Error parsing SYLT binary frame
java.lang.IllegalArgumentException: Unsupported text encoding: 3
	at js.n.l0(r8-map-id-962fb70ab25dee31aa1ef7b5088ee9356fda45aec6e9ff453b2a8a1c8b437840:26)
	at hi.a.invoke(r8-map-id-962fb70ab25dee31aa1ef7b5088ee9356fda45aec6e9ff453b2a8a1c8b437840:455)
	at ni.d.n(r8-map-id-962fb70ab25dee31aa1ef7b5088ee9356fda45aec6e9ff453b2a8a1c8b437840:68)
	at p5.o.invoke(r8-map-id-962fb70ab25dee31aa1ef7b5088ee9356fda45aec6e9ff453b2a8a1c8b437840:89)
	at i5.k.run(r8-map-id-962fb70ab25dee31aa1ef7b5088ee9356fda45aec6e9ff453b2a8a1c8b437840:40)
	at i5.o.b(r8-map-id-962fb70ab25dee31aa1ef7b5088ee9356fda45aec6e9ff453b2a8a1c8b437840:72)
	at p5.y.K(r8-map-id-962fb70ab25dee31aa1ef7b5088ee9356fda45aec6e9ff453b2a8a1c8b437840:156)
	at a6.g0.run(r8-map-id-962fb70ab25dee31aa1ef7b5088ee9356fda45aec6e9ff453b2a8a1c8b437840:504)
	at android.os.Handler.handleCallback(Handler.java:942)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:201)
	at android.os.Looper.loop(Looper.java:288)
	at android.os.HandlerThread.run(HandlerThread.java:67)

I uploaded the MP3 and the debug log file with a description set as this issue’s name.

Thanks in advance for your help :smiling_face:

Logs:

Upload description: Unsupported encoding for synced lyrics added with mutagen

Additional information:

 

 

Reproduction steps:

 

 

Media provider:

Subsonic

Screenshots:

     

Yes most people did not use that one so I skipped it by laziness :stuck_out_tongue:

Will add support in next release.

Great news!! Thank you :smiley:

Meanwhile, could you tell me which ones are supported? It’s not a big deal for me to re-encode everything.

0 and 1 are supported.