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

FFmpeg trac at avcodec.org
Sun Nov 26 01:08:45 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):

 {{{
 MacBook:xxx StevenLiu$ ./ffmpeg -hide_banner -i
 ~/Movies/objectC/facebook.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 output_test_keyframe.m3u8
 [h264 @ 0x7fd0fe07ca00] Reinit context to 640x480, pix_fmt: yuv420p
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
 '/Users/StevenLiu/Movies/objectC/facebook.mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     encoder         : Lavf55.22.102
     description     : This File is Created by Easy RealMedia Tools@!
   Duration: 02:00:27.85, start: 0.000000, bitrate: 893 kb/s
     Stream #0:0(und): Video: h264 (High), 1 reference frame (avc1 /
 0x31637661), yuv420p(left), 640x480, 797 kb/s, 25 fps, 25 tbr, 12800 tbn,
 50 tbc (default)
     Metadata:
       handler_name    : VideoHandler
     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz,
 stereo, fltp, 87 kb/s (default)
     Metadata:
       handler_name    : SoundHandler
 Stream mapping:
   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
   Stream #0:1 -> #0:1 (aac (native) -> aac (libfdk_aac))
 Press [q] to stop, [?] for help
 [h264 @ 0x7fd0fd80e200] Reinit context to 640x480, pix_fmt: yuv420p
 [graph_1_in_0_1 @ 0x7fd0fd51a2a0] tb:1/44100 samplefmt:fltp
 samplerate:44100 chlayout:0x3
 [format_out_0_1 @ 0x7fd0fd51a760] auto-inserting filter 'auto_resampler_0'
 between the filter 'Parsed_anull_0' and the filter 'format_out_0_1'
 [auto_resampler_0 @ 0x7fd0fd401e20] ch:2 chl:stereo fmt:fltp r:44100Hz ->
 ch:2 chl:stereo fmt:s16 r:44100Hz
 [graph 0 input from stream 0:0 @ 0x7fd0fd4054a0] w:640 h:480
 pixfmt:yuv420p tb:1/12800 fr:25/1 sar:0/1 sws_param:flags=2
 [libx264 @ 0x7fd0fd801400] using cpu capabilities: MMX2 SSE2Fast SSSE3
 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
 [libx264 @ 0x7fd0fd801400] profile Constrained Baseline, level 3.0
 [libx264 @ 0x7fd0fd801400] 264 - core 133 r2334M a3ac64b - H.264/MPEG-4
 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html -
 options: cabac=0 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7
 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1
 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6
 lookahead_threads=1 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
 [hls @ 0x7fd0fe804e00] Opening 'output_test_keyframe1.ts' for writing
 [mpegts @ 0x7fd0fe4ea400] muxrate VBR, pcr every 2 pkts, sdt every
 2147483647, pat/pmt every 2147483647 pkts
 Output #0, hls, to 'output_test_keyframe.m3u8':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     description     : This File is Created by Easy RealMedia Tools@!
     encoder         : Lavf58.2.102
     Stream #0:0(und): Video: h264 (libx264), 1 reference frame,
 yuv420p(left), 640x480, q=-1--1, 25 fps, 90k tbn, 25 tbc (default)
     Metadata:
       handler_name    : VideoHandler
       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), 44100 Hz, stereo, s16,
 delay 2048, 128 kb/s (default)
     Metadata:
       handler_name    : SoundHandler
       encoder         : Lavc58.3.105 libfdk_aac
 [hls @ 0x7fd0fe804e00] Opening 'output_test_keyframe2.ts' for writingd=
 8.2x
 [hls @ 0x7fd0fe804e00] Opening 'output_test_keyframe.m3u8.tmp' for writing
 [hls muxer @ 0x7fd0fe805400] EXT-X-MEDIA-SEQUENCE:1
 [hls @ 0x7fd0fe804e00] Opening 'output_test_keyframe3.ts' for
 writingd=5.59x
 [hls @ 0x7fd0fe804e00] Opening 'output_test_keyframe.m3u8.tmp' for writing
 [hls muxer @ 0x7fd0fe805400] EXT-X-MEDIA-SEQUENCE:1
 No more output streams to write to, finishing.
 [hls @ 0x7fd0fe804e00] Opening 'output_test_keyframe.m3u8.tmp' for writing
 [hls muxer @ 0x7fd0fe805400] EXT-X-MEDIA-SEQUENCE:1
 frame=  250 fps=116 q=-1.0 Lsize=N/A time=00:00:10.00 bitrate=N/A
 speed=4.66x
 video:588kB audio:157kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown
 Input file #0 (/Users/StevenLiu/Movies/objectC/facebook.mp4):
   Input stream #0:0 (video): 257 packets read (1119394 bytes); 252 frames
 decoded;
   Input stream #0:1 (audio): 437 packets read (112371 bytes); 436 frames
 decoded (446464 samples);
   Total: 694 packets (1231765 bytes) demuxed
 Output file #0 (output_test_keyframe.m3u8):
   Output stream #0:0 (video): 250 frames encoded; 250 packets muxed
 (601881 bytes);
   Output stream #0:1 (audio): 429 frames encoded (439296 samples); 431
 packets muxed (160853 bytes);
   Total: 681 packets (762734 bytes) muxed
 [libx264 @ 0x7fd0fd801400] frame I:3     Avg QP:17.89  size: 21921
 [libx264 @ 0x7fd0fd801400] frame P:247   Avg QP:20.39  size:  2168
 [libx264 @ 0x7fd0fd801400] mb I  I16..4: 60.7%  0.0% 39.3%
 [libx264 @ 0x7fd0fd801400] mb P  I16..4:  5.2%  0.0%  0.4%  P16..4: 27.2%
 7.5%  1.6%  0.0%  0.0%    skip:58.0%
 [libx264 @ 0x7fd0fd801400] coded y,uvDC,uvAC intra: 11.4% 49.0% 7.4%
 inter: 6.1% 17.3% 0.2%
 [libx264 @ 0x7fd0fd801400] i16 v,h,dc,p: 39% 18%  5% 38%
 [libx264 @ 0x7fd0fd801400] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 25% 19%  5%
 6%  5%  5%  5%  4%
 [libx264 @ 0x7fd0fd801400] i8c dc,h,v,p: 64% 21% 12%  3%
 [libx264 @ 0x7fd0fd801400] ref P L0: 83.0% 11.4%  5.6%
 [libx264 @ 0x7fd0fd801400] kb/s:481.00
 MacBook:xxx StevenLiu$
 MacBook:xxx StevenLiu$ cat output_test_keyframe.m3u8
 #EXTM3U
 #EXT-X-VERSION:3
 #EXT-X-TARGETDURATION:4
 #EXT-X-MEDIA-SEQUENCE:1
 #EXTINF:4.000000,
 output_test_keyframe1.ts
 #EXTINF:4.000000,
 output_test_keyframe2.ts
 #EXTINF:2.000000,
 output_test_keyframe3.ts
 #EXT-X-ENDLIST
 MacBook:xxx StevenLiu$
 }}}


 Try to use the git-master version please.

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


More information about the FFmpeg-trac mailing list