pdeljanov / Symphonia

Pure Rust multimedia format demuxing, tag reading, and audio decoding library
Mozilla Public License 2.0
2.28k stars 133 forks source link

read_id3v2 cannot read chapter markers from file #16

Open rtyler opened 3 years ago

rtyler commented 3 years ago

I could have missed where this data might show up, but taking some sample podcasts from Mac Power Users. (e.g. https://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/secure/relaympu/mpu554.mp3)

Dumping out tags from the Metadata gives me this

k: TALB, v: Mac Power Users
k: TPE1, v: Mac Power Users
k: TIT2, v: 554: Read-it-later Services
k: COMM!eng, v: Read-it-later services can be a great way to save and enjoy an article later, away from the noise of social media or an overflowing RSS client. This week, David and Stephen talk about some of the popular choices, and how to keep them from becoming just another thing to check. T
hen, a recap of Apple’s recent media event.
k: USLT!eng, v: Read-it-later services can be a great way to save and enjoy an article later, away from the noise of social media or an overflowing RSS client. This week, David and Stephen talk about some of the popular choices, and how to keep them from becoming just another thing to check. T
hen, a recap of Apple’s recent media event.
k: TLEN, v: 5997000
k: TYER, v: 2020
k: TENC, v: Forecast

Whereas ffprobe on the same file will output:

Input #0, mp3, from 'mpu554.mp3':
  Metadata:
    album           : Mac Power Users
    artist          : Mac Power Users
    title           : 554: Read-it-later Services
    comment         : Read-it-later services can be a great way to save and enjoy an article later, away from the noise of social media or an overflowing RSS client. This week, David and Stephen talk about some of the popular choices, and how to keep them from becoming just an
    lyrics-eng      : Read-it-later services can be a great way to save and enjoy an article later, away from the noise of social media or an overflowing RSS client. This week, David and Stephen talk about some of the popular choices, and how to keep them from becoming just an
    TLEN            : 5997000
    encoded_by      : Forecast
    date            : 2020
  Duration: 01:39:57.11, start: 0.000000, bitrate: 128 kb/s
    Chapter #0:0: start 0.000000, end 466.287000
    Metadata:
      title           : MPU 554
    Chapter #0:1: start 466.287000, end 964.340000
    Metadata:
      title           : Read-it-Later Services?
    Chapter #0:2: start 964.340000, end 1597.615000
    Metadata:
      title           : Safari Reading List
    Chapter #0:3: start 1597.615000, end 3042.409000
    Metadata:
      title           : Third-Party Services
    Chapter #0:4: start 3042.409000, end 3345.281000
    Metadata:
      title           : What We’re Using
    Chapter #0:5: start 3345.281000, end 4158.417000
    Metadata:
      title           : David’s Research Workflow
    Chapter #0:6: start 4158.417000, end 5997.000000
    Metadata:
      title           : Apple’s September
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 128 kb/s
    Stream #0:1: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 1400x1400, 90k tbr, 90k tbn, 90k tbc (attached pic)
    Metadata:
      comment         : Cover (front)
pdeljanov commented 3 years ago

Hey @rtyler,

You're not mistaken. Chapters are an extension to the original ID3v2 standards, and they haven't been implemented yet.

This is something we'll want to support, but it may take some time since I'm currently focused on implementing M4A/MP4 support.

SeanOMik commented 2 years ago

Was this ever implemented?

pdeljanov commented 2 years ago

Hi @SeanOMik, sorry, this hasn't been fixed yet. It's a bit tedious to fix so it's been low priority. I'll probably loop back around to it after v0.5 is published.