Closed acupofjose closed 7 months ago
Hello Joseph,
First of all, thanks for your question~
Contrary to other tagging formats where the sequence of information is specified, the MP4 container is very versatile and allows for an important freedom of implementation.
As a consequence, in an MP4 container, the atoms containing audio metadata are not necessarily at the beginning of the file; they may also be located at the end of the file.
This article has an interesting take on that issue : https://sanjeev-pandey.medium.com/understanding-the-mpeg-4-moov-atom-pseudo-streaming-in-mp4-93935e1b9e9a
Last but not least, when your audio file has chapters, their metadata (e.g. title and picture) might be located all over the file, and not necessarily at one single location (see https://github.com/Zeugma440/atldotnet/wiki/Focus-on-Chapter-metadata#quicktime-qt-chapters)
=> What you're trying to do might work with some MP4/M4A files, but might fail with others, depending on how their internal structure is organized.
@Zeugma440 that's helpful, thank you! I'll keep investigating. Many thanks for this library!
The problem
I am wanting to parse metadata from remote
m4b
file without having to download the entire file. From my research it looks like the file identification is at the beginning of the file, while the embedded chapters are either at the beginning or end of the file.My solution is to use a loop that takes a progressively larger window size of byte ranges from the beginning and end of the file and attempt to have ATL parse it. But as of now, it is failing unless I download the entire file.
Is there a way to parse metadata from a partial file? I'm assuming a lot of ignorance on my part here.
Environment
Code To Reproduce Issue [ Good To Have ]
The basic approach:
Output