Skip to content

Writing chapter mark images produces ID3 issues #121

@spiderpug

Description

@spiderpug

I'm trying to use the Gem to write chapter marks to MP3. These chapter marks may also contain images.

I created a simple repository to demonstrate what I'm doing:

https://github.com/spiderpug/taglib-chapter-mark-images-minimal

Expectation

ffprobe output.mp3 should show the chapter marks.

Actual

ffprobe does not detect any chapter marks.

I was able to nail it down to the usage of chapter_frame.add_embedded_frame. If any of those frames (TIT2, APIC) contains more than ~120 bytes of data, the written tag size is incorrect.

To reproduce how it should look like in ffprobe, replace data['image_data'] = File.read('chap.jpg')
with data['image_data'] = 'abcd'. Then the chapter marks can be read correctly.

Do I have the wrong logic to begin with?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions