[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:52:12 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 j_karthic):
It has not been pushed to the main git repo yet, waiting for your
response.
Are you sure you applied the patch correctly. I would use the below
command in the latest master to apply it
{{{curl https://patchwork.ffmpeg.org/patch/6395/mbox/ | git am}}}
For me it is producing exact 4.00000 as duration
{{{
akamai at akamai-1x2-X4-16G:~/karthick/ffmpeg$ ffmpeg -i
"http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4"
-loglevel verbose -threads 0 -c:a aac -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 /tmp/Big_Buck_Bunny.m3u8
ffmpeg version N-89279-gd120698 Copyright (c) 2000-2017 the FFmpeg
developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
configuration: --enable-gpl --enable-libx264 --prefix=/usr --enable-
decklink --enable-libfreetype --disable-vaapi --disable-vdpau --enable-
nonfree
libavutil 56. 3.100 / 56. 3.100
libavcodec 58. 6.101 / 58. 6.101
libavformat 58. 2.102 / 58. 2.102
libavdevice 58. 0.100 / 58. 0.100
libavfilter 7. 5.100 / 7. 5.100
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
[h264 @ 0x35d7d80] 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 (native))
Press [q] to stop, [?] for help
[h264 @ 0x35fe520] Reinit context to 1920x1088, pix_fmt: yuv420p
[graph 0 input from stream 0:0 @ 0x36b1680] w:1920 h:1080 pixfmt:yuv420p
tb:1/30000 fr:30/1 sar:1/1 sws_param:flags=2
[libx264 @ 0x3601400] using SAR=1/1
[libx264 @ 0x3601400] frame MB size (120x68) > level limit (1620)
[libx264 @ 0x3601400] DPB size (1 frames, 8160 mbs) > level limit (0
frames, 8100 mbs)
[libx264 @ 0x3601400] MB rate (204000) > level limit (40500)
[libx264 @ 0x3601400] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
AVX
[libx264 @ 0x3601400] profile Constrained Baseline, level 3.0
[libx264 @ 0x3601400] 264 - core 142 r2389 956c8d8 - H.264/MPEG-4 AVC
codec - Copyleft 2003-2014 - 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 @ 0x36c1880] tb:1/48000 samplefmt:fltp samplerate:48000
chlayout:0x60f
[aac @ 0x3603aa0] Using a PCE to encode channel layout
[hls @ 0x3604500] Opening '/tmp/Big_Buck_Bunny1.ts' for writing
[mpegts @ 0x36be920] muxrate VBR, pcr every 2 pkts, sdt every 2147483647,
pat/pmt every 2147483647 pkts
Output #0, hls, to '/tmp/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.6.101 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1(und): Audio: aac (LC), 48000 Hz, 5.1(side), fltp, delay
1024, 394 kb/s (default)
Metadata:
creation_time : 2013-12-16T17:44:42.000000Z
handler_name : GPAC ISO Audio Handler
encoder : Lavc58.6.101 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 4100:01.42 bitrate=N/A dup=2
drop=6 speed=2.85x
*** 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 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 7600:02.85 bitrate=N/A dup=2
drop=13 speed=2.85x
*** 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:04.52 bitrate=N/A dup=2
drop=21 speed= 3x
*** 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 @ 0x3604500] Opening '/tmp/Big_Buck_Bunny2.ts' for writing
[hls @ 0x3604500] Opening '/tmp/Big_Buck_Bunny.m3u8.tmp' for writing
[hls muxer @ 0x35ff940] EXT-X-MEDIA-SEQUENCE:1
*** dropping frame 143 from stream 0 at ts 141:05.73 bitrate=N/A dup=2
drop=26 speed=2.86x
*** 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
*** 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.69 bitrate=N/A dup=2
drop=32 speed=2.67x
*** 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
*** 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:08.14 bitrate=N/A dup=2
drop=38 speed= 2.7x
*** dropping frame 208 from stream 0 at ts 206
*** dropping frame 213 from stream 0 at ts 211
*** dropping frame 218 from stream 0 at ts 216
*** dropping frame 223 from stream 0 at ts 221
*** dropping frame 228 from stream 0 at ts 226:09.10 bitrate=N/A dup=2
drop=43 speed=2.56x
*** dropping frame 233 from stream 0 at ts 231
*** dropping frame 238 from stream 0 at ts 236
[hls @ 0x3604500] Opening '/tmp/Big_Buck_Bunny3.ts' for writing
[hls @ 0x3604500] Opening '/tmp/Big_Buck_Bunny.m3u8.tmp' for writing
[hls muxer @ 0x35ff940] EXT-X-MEDIA-SEQUENCE:1
*** 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.
[hls @ 0x3604500] Opening '/tmp/Big_Buck_Bunny.m3u8.tmp' for writing
[hls muxer @ 0x35ff940] EXT-X-MEDIA-SEQUENCE:1
frame= 250 fps= 55 q=-1.0 Lsize=N/A time=00:00:10.00 bitrate=N/A dup=2
drop=48 speed= 2.2x
video:3986kB audio:481kB 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 (/tmp/Big_Buck_Bunny.m3u8):
Output stream #0:0 (video): 250 frames encoded; 250 packets muxed
(4081615 bytes);
Output stream #0:1 (audio): 469 frames encoded (480000 samples); 470
packets muxed (492502 bytes);
Total: 720 packets (4574117 bytes) muxed
[libx264 @ 0x3601400] frame I:13 Avg QP:11.26 size: 65124
[libx264 @ 0x3601400] frame P:237 Avg QP:17.77 size: 13647
[libx264 @ 0x3601400] mb I I16..4: 86.4% 0.0% 13.6%
[libx264 @ 0x3601400] mb P I16..4: 14.8% 0.0% 0.7% P16..4: 13.3% 2.6%
1.1% 0.0% 0.0% skip:67.4%
[libx264 @ 0x3601400] coded y,uvDC,uvAC intra: 5.1% 21.0% 6.9% inter: 4.5%
9.0% 1.7%
[libx264 @ 0x3601400] i16 v,h,dc,p: 78% 14% 5% 3%
[libx264 @ 0x3601400] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 16% 28% 5% 6%
4% 6% 3% 5%
[libx264 @ 0x3601400] i8c dc,h,v,p: 75% 13% 10% 1%
[libx264 @ 0x3601400] kb/s:3264.79
[aac @ 0x3603aa0] Qavg: 207.289
akamai at akamai-1x2-X4-16G:~/karthick/ffmpeg$ cat /tmp/Big_Buck_Bunny.m3u8
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:4
#EXT-X-MEDIA-SEQUENCE:1
#EXTINF:4.000000,
Big_Buck_Bunny1.ts
#EXTINF:4.000000,
Big_Buck_Bunny2.ts
#EXTINF:2.000000,
Big_Buck_Bunny3.ts
#EXT-X-ENDLIST
akamai at akamai-1x2-X4-16G:~/karthick/ffmpeg$ }}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/6868#comment:9>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list