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

When writing tags to flac files, picard will sometimes reduce padding size, causing files to be rewritten (slowly!)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Normal Normal
    • None
    • 0.15.1
    • Tags & Metadata
    • None
    • Gentoo Linux x86_64, mutagen 1.20, python 2.7

      I typically see this issue on freshly encoded flac files; the flac encoder includes a 8192-byte padding chunk by default (with the 4-byte header, that's 8196 bytes), and the block layout looks like so:

      METADATA block #2
      type: 4 (VORBIS_COMMENT)
      is last: false
      length: 40
      METADATA block #3
      type: 1 (PADDING)
      is last: true
      length: 8192

      After tagging with picard, the files will usually have between 1-2kb in the VORBIS_COMMENT chunk, and the padding block's length will be reduced to around 1024 bytes. The overall size of the flac file will be reduced correspondingly. When retagging the files with picard later, the file is usually not rewritten, and the padding will grow or shrink slightly to compensate for the tag changes.

      The end result is that a freshly encoded flac file has to be completely rewritten when it is tagged with picard, a very slow operation!

      ianmcorvidae and I looked through the mutagen code, but we couldn't find any place where this could actually happen; the mutagen flac tag writer appears to simply not support reducing the size of a flac file when saving tags. So I don't know how it is happening, but it's easily reproducible by me...

            Unassigned Unassigned
            kepstin Calvin Walton
            Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package