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

FFmpeg trac at avcodec.org
Mon Nov 27 00:07:08 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 beloko):

 Now tested with the famous and common Big Buck Bunny movie.
 Same issue.

 {{{
 C:\Users\Beloko\Desktop\FFMPEG>ffmpeg.exe -i
 "http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4"
 -loglevel verbose -threads 0 -c:a libfdk_aac -sn -vcodec libx264 -vprofile
 baseline -vlevel 3.0 -force_key_frames "expr:gte(t,n_forced*4)" -r 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-89257-g2779d33-Reino Copyright (c) 2000-2017 the FFmpeg
 developers
   built with gcc 7.1.0 (GCC)
   configuration: --arch=x86_64 --target-os=mingw32 --cross-
 prefix=/home/beloko/FFMpeg_Builder/sandbox/cross_compilers/mingw-w64-x86_64/bin/x86_64-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-x86_64/x86_64-w64-mingw32
 --enable-nonfree --enable-decklink --enable-libfdk-aac
   libavutil      56.  3.100 / 56.  3.100
   libavcodec     58.  3.105 / 58.  3.105
   libavformat    58.  2.102 / 58.  2.102
   libavdevice    58.  0.100 / 58.  0.100
   libavfilter     7.  5.100 /  7.  5.100
   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
 [h264 @ 000001c41bfe0000] 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) -> aac (libfdk_aac))
 Press [q] to stop, [?] for help
 [h264 @ 000001c41bfca920] Reinit context to 1920x1088, pix_fmt: yuv420p
 [graph 0 input from stream 0:0 @ 000001c41d65eea0] w:1920 h:1080
 pixfmt:yuv420p tb:1/30000 fr:30/1 sar:1/1 sws_param:flags=2
 [libx264 @ 000001c41cb59500] using SAR=1/1
 [libx264 @ 000001c41cb59500] frame MB size (120x68) > level limit (1620)
 [libx264 @ 000001c41cb59500] DPB size (1 frames, 8160 mbs) > level limit
 (0 frames, 8100 mbs)
 [libx264 @ 000001c41cb59500] MB rate (204000) > level limit (40500)
 [libx264 @ 000001c41cb59500] using cpu capabilities: MMX2 SSE2Fast SSSE3
 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
 [libx264 @ 000001c41cb59500] profile Constrained Baseline, level 3.0
 [libx264 @ 000001c41cb59500] 264 - core 148 r2795M aaa9aa8 - 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=250
 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 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 @ 000001c41cb585c0] tb:1/48000 samplefmt:fltp
 samplerate:48000 chlayout:0x60f
 [format_out_0_1 @ 000001c41cb5b180] auto-inserting filter
 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter
 'format_out_0_1'
 [auto_resampler_0 @ 000001c42474b320] ch:6 chl:5.1(side) fmt:fltp
 r:48000Hz -> ch:6 chl:5.1 fmt:s16 r:48000Hz
 [hls @ 000001c41c8504e0] Opening
 'C:\Users\Beloko\Desktop\Big_Buck_Bunny1.ts' for writing
 [mpegts @ 000001c424809d00] 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: aac (libfdk_aac), 48000 Hz, 5.1, s16, delay
 2048, 488 kb/s (default)
     Metadata:
       creation_time   : 2013-12-16T17:44:42.000000Z
       handler_name    : GPAC ISO Audio Handler
       encoder         : Lavc58.3.105 libfdk_aac
     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 56
 *** dropping frame 63 from stream 0 at ts 6100:02.38 bitrate=N/A dup=2
 drop=10 speed=4.64x
 *** 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
 *** dropping frame 108 from stream 0 at ts 106
 *** dropping frame 113 from stream 0 at ts 111
 *** dropping frame 118 from stream 0 at ts 116
 *** dropping frame 123 from stream 0 at ts 121:04.77 bitrate=N/A dup=2
 drop=22 speed=4.71x
 *** 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
 *** dropping frame 143 from stream 0 at ts 141
 *** dropping frame 148 from stream 0 at ts 146
 *** dropping frame 153 from stream 0 at ts 151
 [hls @ 000001c41c8504e0] Opening
 'C:\Users\Beloko\Desktop\Big_Buck_Bunny2.ts' for writing
 [hls @ 000001c41c8504e0] Opening
 'C:\Users\Beloko\Desktop\Big_Buck_Bunny.m3u8.tmp' for writing
 [hls muxer @ 000001c41cb58720] EXT-X-MEDIA-SEQUENCE:1
 *** dropping frame 158 from stream 0 at ts 156
 *** dropping frame 163 from stream 0 at ts 161
 *** dropping frame 168 from stream 0 at ts 166:06.63 bitrate=N/A dup=2
 drop=31 speed=4.38x
 *** dropping frame 173 from stream 0 at ts 171
 *** dropping frame 178 from stream 0 at ts 176
 *** dropping frame 183 from stream 0 at ts 181
 *** dropping frame 188 from stream 0 at ts 186:07.18 bitrate=N/A dup=2
 drop=35 speed=3.56x
 *** dropping frame 193 from stream 0 at ts 191
 *** dropping frame 198 from stream 0 at ts 196
 *** dropping frame 203 from stream 0 at ts 201:07.72 bitrate=N/A dup=2
 drop=38 speed=3.05x
 *** dropping frame 208 from stream 0 at ts 206
 *** dropping frame 213 from stream 0 at ts 211:08.14 bitrate=N/A dup=2
 drop=40 speed=2.68x
 *** dropping frame 218 from stream 0 at ts 216
 *** dropping frame 223 from stream 0 at ts 221:08.61 bitrate=N/A dup=2
 drop=42 speed=2.42x
 *** dropping frame 228 from stream 0 at ts 226
 *** dropping frame 233 from stream 0 at ts 231
 *** dropping frame 238 from stream 0 at ts 236:09.13 bitrate=N/A dup=2
 drop=45 speed=2.25x
 *** dropping frame 243 from stream 0 at ts 241
 *** dropping frame 248 from stream 0 at ts 246
 No more output streams to write to, finishing.:09.62 bitrate=N/A dup=2
 drop=48 speed= 2.1x
 [hls @ 000001c41c8504e0] Opening
 'C:\Users\Beloko\Desktop\Big_Buck_Bunny3.ts' for writing
 [hls @ 000001c41c8504e0] Opening
 'C:\Users\Beloko\Desktop\Big_Buck_Bunny.m3u8.tmp' for writing
 [hls muxer @ 000001c41cb58720] EXT-X-MEDIA-SEQUENCE:1
 [hls @ 000001c41c8504e0] Opening
 'C:\Users\Beloko\Desktop\Big_Buck_Bunny.m3u8.tmp' for writing
 [hls muxer @ 000001c41cb58720] EXT-X-MEDIA-SEQUENCE:1
 frame=  250 fps= 49 q=-1.0 Lsize=N/A time=00:00:10.00 bitrate=N/A dup=2
 drop=48 speed=1.94x
 video:3605kB audio:599kB 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
 (3692000 bytes);
   Output stream #0:1 (audio): 469 frames encoded (480000 samples); 471
 packets muxed (613842 bytes);
   Total: 721 packets (4305842 bytes) muxed
 [libx264 @ 000001c41cb59500] frame I:6     Avg QP: 9.61  size: 38284
 [libx264 @ 000001c41cb59500] frame P:244   Avg QP:17.75  size: 14187
 [libx264 @ 000001c41cb59500] mb I  I16..4: 93.2%  0.0%  6.8%
 [libx264 @ 000001c41cb59500] mb P  I16..4: 14.7%  0.0%  0.7%  P16..4:
 13.5%  2.7%  1.1%  0.0%  0.0%    skip:67.3%
 [libx264 @ 000001c41cb59500] coded y,uvDC,uvAC intra: 3.5% 18.9% 4.6%
 inter: 4.8% 9.4% 1.9%
 [libx264 @ 000001c41cb59500] i16 v,h,dc,p: 79% 14%  5%  3%
 [libx264 @ 000001c41cb59500] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 14% 30%
 4%  5%  4%  5%  3%  5%
 [libx264 @ 000001c41cb59500] i8c dc,h,v,p: 76% 13% 10%  1%
 [libx264 @ 000001c41cb59500] kb/s:2953.10

 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.042667,
 Big_Buck_Bunny1.ts
 #EXTINF:4.000000,
 Big_Buck_Bunny2.ts
 #EXTINF:2.000000,
 Big_Buck_Bunny3.ts
 #EXT-X-ENDLIST
 }}}

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


More information about the FFmpeg-trac mailing list