Re: Error in streamed MPEG4 handling - Movie.pm or Audio::Scan error ?
bpa <bpa.adovhb-NUepA2SMhDQqspMVqqL2D+4xXEVPTSb/[email protected]>
| Newsgroups | gmane.music.equipment.slimdevices.devel |
|---|---|
| Organization | Logitech Squeezebox Forums |
| Message-ID | <[email protected]> |
Quick status on the problem.
I was trying find out where Audio::Scan gets its value for audio_offset
(i.e how does Audio::Scan know to skip the extra zeroes in the mdat)
Looking at the MPEG4-Spec for mdat - the 2nd para in 8.1.1.1 for mdat
Code:
--------------------
There may be any number of these boxes in the file (including zero, if all the media data is in other files).
The metadata refers to media data by its absolute offset within the file (see subclause 8.7.5, the Chunk
Offset Box); so Media Data Box headers and free space may easily be skipped, and files without any box
structure may also be referenced and used.
--------------------
The following comes from the description for "stco" in clause 8.7.5
Code:
--------------------
The chunk offset table gives the index of each chunk into the containing file. There are two variants,
permitting the use of 32‐bit or 64‐bit offsets. The latter is useful when managing very large
presentations. At most one of these variants will occur in any single instance of a sample table.
Offsets are file offsets, not the offset into any box within the file (e.g. Media Data Box). This permits
referring to media data in files without any box structure. It does also mean that care must be taken
when constructing a self‐contained ISO file with its metadata (Movie Box) at the front, as the size of the
Movie Box will affect the chunk offsets to the media data.
--------------------
As I read it, the audio_offset from Audio::Scan is the value of the
first entry in the chunk offset table.
I'm currently trying to do a quick fix in Movie.pm to test this out.
------------------------------------------------------------------------
bpa's Profile: http://forums.slimdevices.com/member.php?userid=1806
View this thread: http://forums.slimdevices.com/showthread.php?t=115678