[FFmpeg-trac] #6868(ffmpeg:new): HLS segmenter doesn't cut properly with AVC Baseline level 3.0

FFmpeg trac at avcodec.org
Tue Nov 28 05:02:54 EET 2017


#6868: HLS segmenter doesn't cut properly with AVC Baseline level 3.0
------------------------------------+----------------------------------
             Reporter:  beloko      |                    Owner:
                 Type:  defect      |                   Status:  new
             Priority:  normal      |                Component:  ffmpeg
              Version:  git-master  |               Resolution:
             Keywords:  HLS         |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+----------------------------------

Comment (by stevenliu):

 ffprobe -show_packets -of xml C:\Users\Beloko\Desktop\Big_Buck_Bunny1.ts >
 output.xml

 attech the output.xml here.


 Thanks

 Replying to [comment:7 beloko]:
 > Tested with Zeranoe build give the same result.
 >
 >
 > {{{
 > ffmpeg.exe -i
 "http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4"
 -loglevel verbose -threads 0 -c:a libmp3lame -sn -vcodec libx264 -vprofile
 baseline -vlevel 3.0 -force_key_frames "expr:gte(t,n_forced*4)" -r 25 -g
 25 -f hls -hls_time 4 -hls_list_size 99999 -start_number 1
 -hls_segment_type mpegts -t 10
 "C:\Users\Beloko\Desktop\Big_Buck_Bunny.m3u8"
 > ffmpeg version N-89212-ga60b2425c3 Copyright (c) 2000-2017 the FFmpeg
 developers
 >   built with gcc 7.2.0 (GCC)
 >   configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-
 bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
 --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-
 libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy
 --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx
 --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp
 --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid
 --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-
 libmfx
 >   libavutil      56.  2.100 / 56.  2.100
 >   libavcodec     58.  3.105 / 58.  3.105
 >   libavformat    58.  2.102 / 58.  2.102
 >   libavdevice    58.  0.100 / 58.  0.100
 >   libavfilter     7.  2.102 /  7.  2.102
 >   libswscale      5.  0.101 /  5.  0.101
 >   libswresample   3.  0.101 /  3.  0.101
 >   libpostproc    55.  0.100 / 55.  0.100
 > [h264 @ 000001e9c64af7e0] Reinit context to 1920x1088, pix_fmt: yuv420p
 > Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
 'http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4':
 >   Metadata:
 >     major_brand     : isom
 >     minor_version   : 1
 >     compatible_brands: isomavc1
 >     creation_time   : 2013-12-16T17:44:39.000000Z
 >     title           : Big Buck Bunny, Sunflower version
 >     artist          : Blender Foundation 2008, Janus Bager Kristensen
 2013
 >     comment         : Creative Commons Attribution 3.0 -
 http://bbb3d.renderfarming.net
 >     genre           : Animation
 >     composer        : Sacha Goedegebure
 >   Duration: 00:10:34.53, start: 0.000000, bitrate: 3481 kb/s
 >     Stream #0:0(und): Video: h264 (High), 1 reference frame (avc1 /
 0x31637661), yuv420p(left), 1920x1080 (1920x1088) [SAR 1:1 DAR 16:9], 2998
 kb/s, 30 fps, 30 tbr, 30k tbn, 60 tbc (default)
 >     Metadata:
 >       creation_time   : 2013-12-16T17:44:39.000000Z
 >       handler_name    : GPAC ISO Video Handler
 >     Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo,
 s16p, 160 kb/s (default)
 >     Metadata:
 >       creation_time   : 2013-12-16T17:44:42.000000Z
 >       handler_name    : GPAC ISO Audio Handler
 >     Stream #0:2(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz,
 5.1(side), fltp, 320 kb/s (default)
 >     Metadata:
 >       creation_time   : 2013-12-16T17:44:42.000000Z
 >       handler_name    : GPAC ISO Audio Handler
 >     Side data:
 >       audio service type: main
 > Stream mapping:
 >   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
 >   Stream #0:2 -> #0:1 (ac3 (native) -> mp3 (libmp3lame))
 > Press [q] to stop, [?] for help
 > [h264 @ 000001e9c649a180] Reinit context to 1920x1088, pix_fmt: yuv420p
 > [graph 0 input from stream 0:0 @ 000001e9c701eec0] w:1920 h:1080
 pixfmt:yuv420p tb:1/30000 fr:30/1 sar:1/1 sws_param:flags=2
 > [libx264 @ 000001e9c6c20940] using SAR=1/1
 > [libx264 @ 000001e9c6c20940] frame MB size (120x68) > level limit (1620)
 > [libx264 @ 000001e9c6c20940] DPB size (1 frames, 8160 mbs) > level limit
 (0 frames, 8100 mbs)
 > [libx264 @ 000001e9c6c20940] MB rate (204000) > level limit (40500)
 > [libx264 @ 000001e9c6c20940] using cpu capabilities: MMX2 SSE2Fast SSSE3
 SSE4.2 AVX FMA3 BMI2 AVX2
 > [libx264 @ 000001e9c6c20940] profile Constrained Baseline, level 3.0
 > [libx264 @ 000001e9c6c20940] 264 - core 152 r2851 ba24899 - H.264/MPEG-4
 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html -
 options: cabac=0 ref=1 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7
 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1
 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12
 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0
 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=25
 keyint_min=2 scenecut=40 intra_refresh=0 rc_lookahead=25 rc=crf mbtree=1
 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
 > *** 2 dup!
 > Past duration 0.666664 too large
 > Past duration 0.833321 too large
 > Past duration 0.999992 too large
 > [graph_1_in_0_2 @ 000001e9ca3d8080] tb:1/48000 samplefmt:fltp
 samplerate:48000 chlayout:0x60f
 > [format_out_0_1 @ 000001e9ca3d8560] auto-inserting filter
 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter
 'format_out_0_1'
 > [auto_resampler_0 @ 000001e9ca3d8220] ch:6 chl:5.1(side) fmt:fltp
 r:48000Hz -> ch:2 chl:stereo fmt:fltp r:48000Hz
 > [hls @ 000001e9c652c220] Opening
 'C:\Users\Beloko\Desktop\Big_Buck_Bunny1.ts' for writing
 > [mpegts @ 000001e9c6f1fb40] muxrate VBR, pcr every 2 pkts, sdt every
 2147483647, pat/pmt every 2147483647 pkts
 > Output #0, hls, to 'C:\Users\Beloko\Desktop\Big_Buck_Bunny.m3u8':
 >   Metadata:
 >     major_brand     : isom
 >     minor_version   : 1
 >     compatible_brands: isomavc1
 >     composer        : Sacha Goedegebure
 >     title           : Big Buck Bunny, Sunflower version
 >     artist          : Blender Foundation 2008, Janus Bager Kristensen
 2013
 >     comment         : Creative Commons Attribution 3.0 -
 http://bbb3d.renderfarming.net
 >     genre           : Animation
 >     encoder         : Lavf58.2.102
 >     Stream #0:0(und): Video: h264 (libx264), 1 reference frame,
 yuv420p(progressive, left), 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps,
 90k tbn, 25 tbc (default)
 >     Metadata:
 >       creation_time   : 2013-12-16T17:44:39.000000Z
 >       handler_name    : GPAC ISO Video Handler
 >       encoder         : Lavc58.3.105 libx264
 >     Side data:
 >       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
 >     Stream #0:1(und): Audio: mp3 (libmp3lame), 48000 Hz, stereo, fltp,
 delay 1105 (default)
 >     Metadata:
 >       creation_time   : 2013-12-16T17:44:42.000000Z
 >       handler_name    : GPAC ISO Audio Handler
 >       encoder         : Lavc58.3.105 libmp3lame
 >     Side data:
 >       audio service type: main
 > *** dropping frame 13 from stream 0 at ts 11
 > *** dropping frame 18 from stream 0 at ts 16
 > *** dropping frame 23 from stream 0 at ts 21
 > *** dropping frame 28 from stream 0 at ts 26
 > *** dropping frame 33 from stream 0 at ts 31
 > *** dropping frame 38 from stream 0 at ts 36
 > *** dropping frame 43 from stream 0 at ts 41
 > *** dropping frame 48 from stream 0 at ts 46
 > *** dropping frame 53 from stream 0 at ts 51
 > *** dropping frame 58 from stream 0 at ts 5600:01.94 bitrate=N/A dup=2
 drop=9 speed=3.89x
 > *** dropping frame 63 from stream 0 at ts 61
 > *** dropping frame 68 from stream 0 at ts 66
 > *** dropping frame 73 from stream 0 at ts 71
 > *** dropping frame 78 from stream 0 at ts 76
 > *** dropping frame 83 from stream 0 at ts 81
 > *** dropping frame 88 from stream 0 at ts 86
 > *** dropping frame 93 from stream 0 at ts 91
 > *** dropping frame 98 from stream 0 at ts 96
 > *** dropping frame 103 from stream 0 at ts 101:03.76 bitrate=N/A dup=2
 drop=18 speed=3.76x
 > *** dropping frame 108 from stream 0 at ts 106
 > *** dropping frame 113 from stream 0 at ts 111:04.24 bitrate=N/A dup=2
 drop=20 speed=2.79x
 > *** dropping frame 118 from stream 0 at ts 116
 > *** dropping frame 123 from stream 0 at ts 121
 > *** dropping frame 128 from stream 0 at ts 126
 > *** dropping frame 133 from stream 0 at ts 131
 > *** dropping frame 138 from stream 0 at ts 136
 > [hls @ 000001e9c652c220] Opening
 'C:\Users\Beloko\Desktop\Big_Buck_Bunny2.ts' for writing
 > [hls @ 000001e9c652c220] Opening
 'C:\Users\Beloko\Desktop\Big_Buck_Bunny.m3u8.tmp' for writing
 > [hls muxer @ 000001e9c6f2f4e0] EXT-X-MEDIA-SEQUENCE:1
 > *** dropping frame 143 from stream 0 at ts 141:05.20 bitrate=N/A dup=2
 drop=26 speed= 2.5x
 > *** dropping frame 148 from stream 0 at ts 146
 > *** dropping frame 153 from stream 0 at ts 151
 > *** dropping frame 158 from stream 0 at ts 156:06.16 bitrate=N/A dup=2
 drop=29 speed=2.37x
 > *** dropping frame 163 from stream 0 at ts 161
 > *** dropping frame 168 from stream 0 at ts 166
 > *** dropping frame 173 from stream 0 at ts 171:06.64 bitrate=N/A dup=2
 drop=32 speed= 2.1x
 > *** dropping frame 178 from stream 0 at ts 176
 > *** dropping frame 183 from stream 0 at ts 181:07.12 bitrate=N/A dup=2
 drop=34 speed= 1.9x
 > *** dropping frame 188 from stream 0 at ts 186
 > *** dropping frame 193 from stream 0 at ts 191:07.12 bitrate=N/A dup=2
 drop=36 speed=1.67x
 > *** dropping frame 198 from stream 0 at ts 196:07.60 bitrate=N/A dup=2
 drop=37 speed=1.59x
 > *** dropping frame 203 from stream 0 at ts 201:08.08 bitrate=N/A dup=2
 drop=38 speed=1.53x
 > *** dropping frame 208 from stream 0 at ts 206:08.08 bitrate=N/A dup=2
 drop=39 speed=1.39x
 > *** dropping frame 213 from stream 0 at ts 211:08.08 bitrate=N/A dup=2
 drop=40 speed=1.26x
 > *** dropping frame 218 from stream 0 at ts 216
 > *** dropping frame 223 from stream 0 at ts 221:08.56 bitrate=N/A dup=2
 drop=42 speed=1.23x
 > *** dropping frame 228 from stream 0 at ts 226
 > *** dropping frame 233 from stream 0 at ts 231:09.04 bitrate=N/A dup=2
 drop=44 speed= 1.2x
 > *** dropping frame 238 from stream 0 at ts 236
 > [hls @ 000001e9c652c220] Opening
 'C:\Users\Beloko\Desktop\Big_Buck_Bunny3.ts' for writing
 > [hls @ 000001e9c652c220] Opening
 'C:\Users\Beloko\Desktop\Big_Buck_Bunny.m3u8.tmp' for writing
 > [hls muxer @ 000001e9c6f2f4e0] EXT-X-MEDIA-SEQUENCE:1
 > *** dropping frame 243 from stream 0 at ts 241:09.52 bitrate=N/A dup=2
 drop=46 speed=1.16x
 > *** dropping frame 248 from stream 0 at ts 246
 > No more output streams to write to, finishing.:09.55 bitrate=N/A dup=2
 drop=48 speed=1.08x
 > [hls @ 000001e9c652c220] Opening
 'C:\Users\Beloko\Desktop\Big_Buck_Bunny.m3u8.tmp' for writing
 > [hls muxer @ 000001e9c6f2f4e0] EXT-X-MEDIA-SEQUENCE:1
 > frame=  250 fps= 27 q=-1.0 Lsize=N/A time=00:00:10.00 bitrate=N/A dup=2
 drop=48 speed=1.08x
 > video:4054kB audio:157kB subtitle:0kB other streams:0kB global
 headers:0kB muxing overhead: unknown
 > Input file #0
 (http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4):
 >   Input stream #0:0 (video): 307 packets read (3019729 bytes); 298
 frames decoded;
 >   Input stream #0:1 (audio): 21 packets read (10080 bytes);
 >   Input stream #0:2 (audio): 316 packets read (404480 bytes); 316 frames
 decoded (485376 samples);
 >   Total: 644 packets (3434289 bytes) demuxed
 > Output file #0 (C:\Users\Beloko\Desktop\Big_Buck_Bunny.m3u8):
 >   Output stream #0:0 (video): 250 frames encoded; 250 packets muxed
 (4151260 bytes);
 >   Output stream #0:1 (audio): 417 frames encoded (480000 samples); 418
 packets muxed (160512 bytes);
 >   Total: 668 packets (4311772 bytes) muxed
 > [libx264 @ 000001e9c6c20940] frame I:13    Avg QP:11.25  size: 65305
 > [libx264 @ 000001e9c6c20940] frame P:237   Avg QP:17.86  size: 13931
 > [libx264 @ 000001e9c6c20940] mb I  I16..4: 86.5%  0.0% 13.5%
 > [libx264 @ 000001e9c6c20940] mb P  I16..4: 14.9%  0.0%  0.7%  P16..4:
 13.4%  2.7%  1.1%  0.0%  0.0%    skip:67.3%
 > [libx264 @ 000001e9c6c20940] coded y,uvDC,uvAC intra: 5.1% 21.0% 6.9%
 inter: 4.7% 9.2% 1.8%
 > [libx264 @ 000001e9c6c20940] i16 v,h,dc,p: 78% 14%  5%  3%
 > [libx264 @ 000001e9c6c20940] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 16% 28%
 5%  6%  4%  6%  3%  5%
 > [libx264 @ 000001e9c6c20940] i8c dc,h,v,p: 75% 13% 10%  1%
 > [libx264 @ 000001e9c6c20940] kb/s:3320.51
 >
 > C:\Users\Beloko\Desktop\FFMPEG>type
 "C:\Users\Beloko\Desktop\Big_Buck_Bunny.m3u8"
 > #EXTM3U
 > #EXT-X-VERSION:3
 > #EXT-X-TARGETDURATION:5
 > #EXT-X-MEDIA-SEQUENCE:1
 > #EXTINF:4.023022,
 > Big_Buck_Bunny1.ts
 > #EXTINF:4.000000,
 > Big_Buck_Bunny2.ts
 > #EXTINF:2.000000,
 > Big_Buck_Bunny3.ts
 > #EXT-X-ENDLIST
 >
 > C:\Users\Beloko\Desktop\FFMPEG>ffprobe
 "C:\Users\Beloko\Desktop\Big_Buck_Bunny1.ts"
 > ffprobe version N-88980-g5f1bb25-Reino Copyright (c) 2007-2017 the
 FFmpeg developers
 >   built with gcc 7.1.0 (GCC)
 >   configuration: --arch=x86 --target-os=mingw32 --cross-
 prefix=/home/beloko/FFMpeg_Builder/sandbox/cross_compilers/mingw-w64-i686/bin/i686-w64-mingw32-
 --pkg-config=pkg-config --pkg-config-flags=--static --extra-version=Reino
 --enable-gray --enable-version3 --disable-debug --disable-doc --disable-
 htmlpages --disable-manpages --disable-podpages --disable-txtpages
 --disable-w32threads --enable-fontconfig --enable-gmp --enable-gnutls
 --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca
 --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme
 --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
 --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb
 --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-
 libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-
 libtwolame --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
 --enable-libwebp --enable-libzimg --enable-libzvbi --extra-
 cflags=-DLIBTWOLAME_STATIC --extra-cflags=-DMODPLUG_STATIC --extra-
 cflags=-DCACA_STATIC --enable-gpl --enable-avisynth --enable-frei0r
 --enable-filter=frei0r --enable-librubberband --enable-libvidstab
 --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid
 --enable-libmfx --enable-avresample --extra-cflags='-mtune=generic'
 --extra-cflags=-O3 --enable-static --disable-shared
 --prefix=/home/beloko/FFMpeg_Builder/sandbox/cross_compilers/mingw-w64-i686/i686-w64-mingw32
 --enable-nonfree --enable-decklink --enable-libfdk-aac
 >   libavutil      56.  0.100 / 56.  0.100
 >   libavcodec     58.  3.100 / 58.  3.100
 >   libavformat    58.  2.100 / 58.  2.100
 >   libavdevice    58.  0.100 / 58.  0.100
 >   libavfilter     7.  0.101 /  7.  0.101
 >   libavresample   4.  0.  0 /  4.  0.  0
 >   libswscale      5.  0.101 /  5.  0.101
 >   libswresample   3.  0.101 /  3.  0.101
 >   libpostproc    55.  0.100 / 55.  0.100
 > Input #0, mpegts, from 'C:\Users\Beloko\Desktop\Big_Buck_Bunny1.ts':
 >   Duration: 00:00:04.02, start: 1.400000, bitrate: 1112 kb/s
 >   Program 1
 >     Metadata:
 >       service_name    : Big Buck Bunny, Sunflower version
 >       service_provider: FFmpeg
 >     Stream #0:0[0x100]: Video: h264 (Constrained Baseline)
 ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR
 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
 >     Stream #0:1[0x101](und): Audio: mp3 ([3][0][0][0] / 0x0003), 48000
 Hz, stereo, s16p, 128 kb/s
 > }}}

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


More information about the FFmpeg-trac mailing list