[FFmpeg-trac] #4020(avformat:open): ffmpeg segment create wrong duration outputs

FFmpeg trac at avcodec.org
Fri Oct 24 02:32:00 CEST 2014


#4020: ffmpeg segment create wrong duration outputs
------------------------------------+------------------------------------
             Reporter:  qianliang   |                    Owner:
                 Type:  defect      |                   Status:  open
             Priority:  important   |                Component:  avformat
              Version:  git-master  |               Resolution:
             Keywords:  regression  |               Blocked By:
             Blocking:              |  Reproduced by developer:  1
Analyzed by developer:  0           |
------------------------------------+------------------------------------

Comment (by scaryguy):

 I confirm this bug.


 {{{
 ffmpeg -i istikbal_reklam.mp4 -bsf:v h264_mp4toannexb -c copy
 -segment_list istikbal.m3u8 -segment_time 10 -f segment istikbal%d.ts
 ffmpeg version 2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
   built on Oct 19 2014 18:31:37 with Apple LLVM version 6.0
 (clang-600.0.51) (based on LLVM 3.5svn)
   configuration: --prefix=/usr/local/Cellar/ffmpeg/2.4.2 --enable-shared
 --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree
 --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang
 --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-
 libmp3lame --enable-libxvid
   libavutil      54.  7.100 / 54.  7.100
   libavcodec     56.  1.100 / 56.  1.100
   libavformat    56.  4.101 / 56.  4.101
   libavdevice    56.  0.100 / 56.  0.100
   libavfilter     5.  1.100 /  5.  1.100
   libavresample   2.  1.  0 /  2.  1.  0
   libswscale      3.  0.100 /  3.  0.100
   libswresample   1.  1.100 /  1.  1.100
   libpostproc    53.  0.100 / 53.  0.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'istikbal_reklam.mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     encoder         : Lavf55.48.100
   Duration: 00:00:43.46, start: 0.021333, bitrate: 1490 kb/s
     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
 1280x720 [SAR 1:1 DAR 16:9], 1402 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc
 (default)
     Metadata:
       handler_name    : VideoHandler
     Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono,
 fltp, 82 kb/s (default)
     Metadata:
       handler_name    : SoundHandler
 [mpegts @ 0x7fca1983ce00] Using AVStream.codec.time_base as a timebase
 hint to the muxer is deprecated. Set AVStream.time_base instead.
     Last message repeated 1 times
 [adts @ 0x7fca1983f800] Using AVStream.codec.time_base as a timebase hint
 to the muxer is deprecated. Set AVStream.time_base instead.
 Output #0, segment, to 'istikbal%d.ts':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     encoder         : Lavf56.4.101
     Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p, 1280x720
 [SAR 1:1 DAR 16:9], q=2-31, 1402 kb/s, 25 fps, 25 tbn, 25 tbc (default)
     Metadata:
       handler_name    : VideoHandler
     Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, 82
 kb/s (default)
     Metadata:
       handler_name    : SoundHandler
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
   Stream #0:1 -> #0:1 (copy)
 Press [q] to stop, [?] for help
 [mpegts @ 0x7fca1a000000] Using AVStream.codec.time_base as a timebase
 hint to the muxer is deprecated. Set AVStream.time_base instead.
     Last message repeated 1 times
 [adts @ 0x7fca1a00aa00] Using AVStream.codec.time_base as a timebase hint
 to the muxer is deprecated. Set AVStream.time_base instead.
 [mpegts @ 0x7fca1a000000] Using AVStream.codec.time_base as a timebase
 hint to the muxer is deprecated. Set AVStream.time_base instead.
     Last message repeated 1 times
 [adts @ 0x7fca1a031800] Using AVStream.codec.time_base as a timebase hint
 to the muxer is deprecated. Set AVStream.time_base instead.
 [mpegts @ 0x7fca1b000000] Using AVStream.codec.time_base as a timebase
 hint to the muxer is deprecated. Set AVStream.time_base instead.
     Last message repeated 1 times
 [adts @ 0x7fca1b00aa00] Using AVStream.codec.time_base as a timebase hint
 to the muxer is deprecated. Set AVStream.time_base instead.
 frame= 1086 fps=0.0 q=-1.0 Lsize=N/A time=00:00:43.47 bitrate=N/A
 video:7437kB audio:438kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown
 }}}

 This command produces this M3U8 file which is not supposed to do:

 {{{
 #EXTM3U
 #EXT-X-VERSION:3
 #EXT-X-MEDIA-SEQUENCE:0
 #EXT-X-ALLOW-CACHE:YES
 #EXT-X-TARGETDURATION:13
 #EXTINF:10.200000,
 istikbal0.ts
 #EXTINF:9.800000,
 istikbal1.ts
 #EXTINF:11.080000,
 istikbal2.ts
 #EXTINF:12.440000,
 istikbal3.ts
 #EXT-X-ENDLIST
 }}}

 HTTP Live Streaming Specification states that TARGETDURATION is REQUIRED
 to be set correctly and all segments should follow it.

 I mean, this bug is critical, I think.

 Thank you

--
Ticket URL: <https://trac.ffmpeg.org/ticket/4020#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list