JamesHeinrich / getID3

http://www.getid3.org/
Other
1.13k stars 245 forks source link

raw tags for mp4 audio read as 0 second #371

Open lachlan-00 opened 2 years ago

lachlan-00 commented 2 years ago

Just referencing an open issue we have. https://github.com/ampache/ampache/issues/3196#issuecomment-1068679902

I'm not sure about the specifics of mp4 audio but the playtime_seconds is being read as 0 in the raw tags

I do still have the reference file if you want to check it out.

JamesHeinrich commented 2 years ago

I would need to see a sample file, please.

JamesHeinrich commented 2 years ago

I took a look at your sample file and it seemed to work as expected, playtime_seconds shows 15.34

lachlan-00 commented 2 years ago

okay let me dig further then.

lachlan-00 commented 2 years ago

Using demo.basic.php and putting the file in the same folder i still get 0 for playtime_seconds. Is there a non-default setting that's needed to return the time?

I also see that quicktime files are only returning the second value in arrays. I can't seem to track down where this is being overwritten in module.audio-video.quicktime.php

edit

i've run with pph 7.4, 8.0 and 8.1 as well just to see if there's anything not being read

JamesHeinrich commented 2 years ago

I took a look at your sample file and it seemed to work as expected, playtime_seconds shows 15.34

I think I was sloppy and looked at the wrong sample file :( I concur that it's returning a playtime of zero. I will investigate further.

JamesHeinrich commented 2 years ago

Your sample file is a "fragmented MP4" (more useful for streaming) where data is stored in many small independent segments rather than one large segment. I haven't been able to find useful documentation as to the exact structure of some of the crucial structures, notably tfhd // Track Fragment HeaDer box mfhd // Movie Fragment HeaDer box mvex // MoVie EXtends box If someone can find some appropriate documentation showing the byte structure of these and related please let me know.

lachlan-00 commented 2 years ago

Thank you for taking the time to look again.

I'll see if I can find out more about them and report anything back here.