Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-2750

Failure saving MP3 files with invalid LINK frame

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 2.9.1
    • Tags & Metadata
    • None

      If a MP3 files contains a LINK frame that does not follow the ID3 spec for Linked information and saving ID3 v2.3 is enabled in settings, then a mutagen exception is raised when saving the file in Picard.

      This affects for example the files at https://archive.org/details/yallcomesoundrec00page , which store a null byte followed by a URL in the `LINK` frame, instead of the expected frame ID followed by URL and extra data. The same issue might be present with other MP3 files from archive.org.

      The issue only happens when mutagen downgrades the ID3 format to v2.3.

       

      D: 14:10:11,995 formats/id3.save:374: Saving file ‘D:\BlueTooth module\yallcomesoundrec00page\10_Let_me_call_you_sweetheart.mp3’
      E: 14:10:11,996 ui/item.error_append:108: <MP3File ‘08_Mississippi_mud.mp3’>: Invalid frame ID
      D: 14:10:11,996 file.update:734: Updating file <MP3File ‘08_Mississippi_mud.mp3’>
      E: 14:10:11,997 ui/item.error_append:108: <MP3File '09_South_of_the_border__down_Mexico_way.mp3’>: Invalid frame ID
      D: 14:10:11,997 file.update:734: Updating file <MP3File ‘09_South_of_the_border__down_Mexico_way_.mp3’>
      E: 14:10:11,999 util/thread.run:69: Traceback (most recent call last):
      File “util\thread.py”, line 66, in run
      File “file.py”, line 393, in _save_and_rename
      File “formats\id3.py”, line 551, in _save
      File “formats\id3.py”, line 657, in _save_tags
      File “mutagen_util.py”, line 184, in wrapper
      File “mutagen_util.py”, line 155, in wrapper
      File “mutagen\id3_file.py”, line 260, in save
      File “mutagen\id3_file.py”, line 194, in _prepare_data
      File “mutagen\id3_tags.py”, line 188, in _write
      File “mutagen\id3_tags.py”, line 189, in 
      File “mutagen\id3_tags.py”, line 505, in save_frame
      File “mutagen\id3_frames.py”, line 203, in _writeData
      File “mutagen\id3_frames.py”, line 141, in _get_v23_frame
      File “mutagen\id3_frames.py”, line 65, in init
      File “mutagen\id3_frames.py”, line 76, in setattr
      File “mutagen\id3_specs.py”, line 403, in validate
      ValueError: Invalid frame ID

      Workarounds to avoid the error are:

      • Set ID3 format to v2.4 in options
      • Enable "Clear existing tags" (as this will remove the unsupported LINK frames)

      The problem clearly lies with the files having an invalid format. But if that is a common issue it probably is possible to implement a mitigation. E.g. remove invalid LINK frames on saving, or even detect the case of the LINK frames containing just a URL and automatically convert this to a WXXX frame.

       

      See also the discussion in the forums where this issue got raised.

            Unassigned Unassigned
            outsidecontext Philipp Wolfer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Version Package