apachisundari / mp4v2

Automatically exported from code.google.com/p/mp4v2
Other
0 stars 0 forks source link

mp4chaps offset with first chapter not starting at time zero #130

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a chapter file where the first chapter doesn't start at time zero
2. add it the to an mp4 file with mp4chaps --import
3. try to play the file (e.g. VLC) or export the chapters (mp4chaps --export)
4. now all chapters have an offset, which is exactly the starting time of the 
first chapter

What is the expected output? What do you see instead?
I would expect, that the chapters are at the correct time - also if the first 
chapter does not start at time zero...

What version of the product are you using? On what operating system?
mp4chaps version: MP4v2 trunk-r479
operating system: ubuntu linux 11.10

Original issue reported on code.google.com by holzma...@gmail.com on 2 Apr 2012 at 6:28

GoogleCodeExporter commented 9 years ago
I have very little experience with chapter files or this aspect of the 
codebase, but if you can supply me with 

A) a chapter file and 
B) an mp4 file

...that reproduce the issue, then I can dig into this for you.  I think I may 
see where the bug lies, although a fix might be rather thorny given:

/** Chapter item.
 *  This item defines various attributes for a chapter.
 *  @ingroup mp4_chapter
 */
typedef struct MP4Chapter_s {
    MP4Duration duration; /**< duration of chapter in milliseconds */
    char title[MP4V2_CHAPTER_TITLE_MAX+1]; /**< title of chapter */
} MP4Chapter_t;

...seems to assume chapters have a "duration" and not a start time, which 
doesn't seem to mesh with some of the descriptions of chapter files I just read 
on google...

Original comment by kid...@gmail.com on 21 May 2012 at 4:55

GoogleCodeExporter commented 9 years ago
Sorry for the late answer, it seems that my gmail forwarding didn't work (is 
fixed now :)

Here are the files:
- chaptest.m4a: mp4 file with chapters
- chaptest.chapters.m4a: the chapter file for mp4chaps

If you try chaptest.m4a e.g. in VLC, you that each chapter has an offset of 
30sec (because the first chapters starts at 30 sec).

For a quick solution, I always add a chapter at time zero now, if the first 
chapter doesn't start at time zero ... but that's of course not so nice ;)

Thanks for your answer!

Original comment by holzma...@gmail.com on 3 Jul 2012 at 8:46

Attachments:

GoogleCodeExporter commented 9 years ago
And here the chapter file

Original comment by holzma...@gmail.com on 3 Jul 2012 at 8:46

Attachments: