#7169: First chapter of MP4 is always 0
----------------------------------+----------------------------------
             Reporter:  jonata    |                     Type:  defect
               Status:  new       |                 Priority:  normal
            Component:  ffmpeg    |                  Version:  3.4
             Keywords:  chapters  |               Blocked By:
             Blocking:            |  Reproduced by developer:  0
Analyzed by developer:  0         |
----------------------------------+----------------------------------
 Summary of the bug: MP4 files produced on ffmpeg with chapter marks being
 applied using ffmetadata always have the first chapter at 0.0

 How to reproduce:

 Test movie file:
 https://archive.org/download/mov-bbb/mov_bbb.mp4

 Chapters information (chapters.txt):
 {{{
 ;FFMETADATA1

 [CHAPTER]
 START=2153000000
 END=3100000000
 title=First chapter should start at 2 sec

 [CHAPTER]
 START=3100000000
 END=5550000000
 title=Second chapter

 [CHAPTER]
 START=5550000000
 END=8653600000
 title=Final chapter
 }}}


 Applying chapters
 {{{
 ffmpeg -i mov_bbb.mp4 -i chapters.txt -map_chapters 1 -c:a copy -c:v copy
 mov_bbb_with_chapters.mp4
 }}}

 or even specifying Apple text
 {{{
 ffmpeg -i mov_bbb.mp4 -i chapters.txt -map_chapters 1 -c:a copy -c:v copy
 -c:s mov_text mov_bbb_with_chapters.mp4
 }}}

 returns this output, confirming it is understanding the first chapter as
 2sec:
 {{{
 ...
 Chapter #0:0: start 2.153000, end 3.100000
     Metadata:
       title           : First chapter should start at 2 sec
 ...
 }}}

 but running ffprobe -show_chapters:
 {{{
 ffprobe -show_chapters mov_bbb_with_chapters.mp4
 }}}

 confirms that in some way ffmpeg is setting the first chapter as 0.0:
 {{{
 ...
 Chapter #0:0: start 0.000000, end 3.100000
     Metadata:
       title           : First chapter should start at 2 sec
 ...
 [CHAPTER]
 id=0
 time_base=1/1000
 start=0
 start_time=0.000000
 end=3100
 end_time=3.100000
 TAG:title=First chapter should start at 2 sec
 [/CHAPTER]
 ...
 }}}

 VLC reads the correct information (it shows the first chapter correctly).
 Other players like MPV, MPC, QT, reads it as 0.0.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7169>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-trac

Reply via email to