#7021: ffmpeg with -hls_flags single_file return incorrect byterange in playlist -------------------------------------+------------------------------------- Reporter: loki5100 | Owner: Type: defect | Status: new Priority: normal | Component: Version: git-master | undetermined Keywords: hls | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+-------------------------------------
Comment (by loki5100): sure find below the command line with the complete, uncut console output {{{ C:\Temp\ffmpeg>ffmpeg.exe ^ More? -i "http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4" ^ More? -loglevel verbose ^ More? -c:a aac ^ More? -b:a 128k ^ More? -c:v hevc ^ More? -b:v 4977k -maxrate 4977k -bufsize 7466k ^ More? -x265-params "keyint=60:min-keyint=60:open-gop=0:scenecut=0" ^ More? -r 483570000/16117951 ^ More? -t 30 ^ More? -sn ^ More? -movflags faststart ^ More? -preset ultrafast ^ More? -pix_fmt yuv420p ^ More? -hls_time 4 ^ More? -hls_segment_type fmp4 ^ More? -hls_list_size 0 ^ More? -hls_flags single_file ^ More? -hls_fmp4_init_filename C:\temp\ffmpeg\bbb_init.mp4 ^ More? C:\temp\ffmpeg\bbb.m3u8 ffmpeg version N-90056-gdc77e64f2d Copyright (c) 2000-2018 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-libblur ay --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable- libshine --enab le-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --en able-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable- libmysofa --enabl e-libspeex --enable-libxvid --enable-libmfx --enable-amf --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable- avisynth libavutil 56. 7.101 / 56. 7.101 libavcodec 58. 11.101 / 58. 11.101 libavformat 58. 9.100 / 58. 9.100 libavdevice 58. 1.100 / 58. 1.100 libavfilter 7. 12.100 / 7. 12.100 libswscale 5. 0.101 / 5. 0.101 libswresample 3. 0.101 / 3. 0.101 libpostproc 55. 0.100 / 55. 0.100 [h264 @ 0000002849eb0d40] 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 Matched encoder 'libx265' for codec 'hevc'. Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> hevc (libx265)) Stream #0:2 -> #0:1 (ac3 (native) -> aac (native)) Press [q] to stop, [?] for help [h264 @ 0000002849e9ae80] Reinit context to 1920x1088, pix_fmt: yuv420p [graph 0 input from stream 0:0 @ 000000284c65ee80] w:1920 h:1080 pixfmt:yuv420p tb:1/30000 fr:30/1 sar:1/1 sws_param:flags=2 x265 [info]: HEVC encoder version 2.6+37-1949157705ce x265 [info]: build info [Windows][GCC 7.2.0][64 bit] 8bit+10bit x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 x265 [info]: Main profile, Level-4 (Main tier) x265 [info]: Thread pool created using 8 threads x265 [info]: Slices : 1 x265 [info]: frame threads / pool features : 3 / wpp(34 rows) x265 [info]: Coding QT: max CU size, min CU size : 32 / 16 x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra x265 [info]: ME / range / subpel / merge : dia / 57 / 0 / 2 x265 [info]: Keyframe min / max / scenecut / bias: 60 / 60 / 0 / 5.00 x265 [info]: Lookahead / bframes / badapt : 5 / 3 / 0 x265 [info]: b-pyramid / weightp / weightb : 1 / 0 / 0 x265 [info]: References / ref-limit cu / depth : 1 / off / off x265 [info]: AQ: mode / str / qg-size / cu-tree : 1 / 0.0 / 32 / 1 x265 [info]: Rate Control / qCompress : ABR-4977 kbps / 0.60 x265 [info]: tools: rd=2 psy-rd=2.00 early-skip rskip tmvp fast-intra x265 [info]: tools: strong-intra-smoothing lslices=6 deblock *** 2 dup! [graph_1_in_0_2 @ 000000284a64e880] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x60f [aac @ 000000284a93ddc0] Using a PCE to encode channel layout [hls @ 000000284a8e2040] Opening 'C:\temp\ffmpeg\bbb_init.mp4' for writing Output #0, hls, to 'C:\temp\ffmpeg\bbb.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.9.100 Stream #0:0(und): Video: hevc (libx265), 1 reference frame, yuv420p(progressive, left), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 4977 kb/s, 30 fps, 998795.00 t bn, 30 tbc (default) Metadata: creation_time : 2013-12-16T17:44:39.000000Z handler_name : GPAC ISO Video Handler encoder : Lavc58.11.101 libx265 Stream #0:1(und): Audio: aac (LC), 48000 Hz, 5.1(side), fltp, delay 1024, 128 kb/s (default) Metadata: creation_time : 2013-12-16T17:44:42.000000Z handler_name : GPAC ISO Audio Handler encoder : Lavc58.11.101 aac Side data: audio service type: main [hls @ 000000284a8e2040] Opening 'C:\temp\ffmpeg\bbb.m4s' for writing2 drop=0 speed=2.06x [hls @ 000000284a8e2040] Opening 'C:\temp\ffmpeg\bbb.m3u8.tmp' for writing EXT-X-MEDIA-SEQUENCE:0 [hls @ 000000284a8e2040] Opening 'C:\temp\ffmpeg\bbb.m4s' for writing2 drop=0 speed=1.72x [hls @ 000000284a8e2040] Opening 'C:\temp\ffmpeg\bbb.m3u8.tmp' for writing EXT-X-MEDIA-SEQUENCE:0 [hls @ 000000284a8e2040] Opening 'C:\temp\ffmpeg\bbb.m4s' for writing2 drop=0 speed=1.64x [hls @ 000000284a8e2040] Opening 'C:\temp\ffmpeg\bbb.m3u8.tmp' for writing EXT-X-MEDIA-SEQUENCE:0 [hls @ 000000284a8e2040] Opening 'C:\temp\ffmpeg\bbb.m4s' for writing2 drop=0 speed=1.65x [hls @ 000000284a8e2040] Opening 'C:\temp\ffmpeg\bbb.m3u8.tmp' for writing EXT-X-MEDIA-SEQUENCE:0 [hls @ 000000284a8e2040] Opening 'C:\temp\ffmpeg\bbb.m4s' for writing2 drop=0 speed=1.65x [hls @ 000000284a8e2040] Opening 'C:\temp\ffmpeg\bbb.m3u8.tmp' for writing EXT-X-MEDIA-SEQUENCE:0 [hls @ 000000284a8e2040] Opening 'C:\temp\ffmpeg\bbb.m4s' for writing2 drop=0 speed=1.71x [hls @ 000000284a8e2040] Opening 'C:\temp\ffmpeg\bbb.m3u8.tmp' for writing EXT-X-MEDIA-SEQUENCE:0 No more output streams to write to, finishing.:29.73 bitrate=N/A dup=2 drop=0 speed=1.71x [hls @ 000000284a8e2040] Opening 'C:\temp\ffmpeg\bbb.m4s' for writing [hls @ 000000284a8e2040] Opening 'C:\temp\ffmpeg\bbb.m3u8.tmp' for writing EXT-X-MEDIA-SEQUENCE:0 [hls @ 000000284a8e2040] Opening 'C:\temp\ffmpeg\bbb.m4s' for writing [hls @ 000000284a8e2040] Opening 'C:\temp\ffmpeg\bbb.m3u8.tmp' for writing EXT-X-MEDIA-SEQUENCE:0 frame= 901 fps= 51 q=-0.0 Lsize=N/A time=00:00:30.01 bitrate=N/A dup=2 drop=0 speed=1.68x video:23439kB audio:470kB subtitle:0kB other streams:0kB global headers:2kB muxing overhead: unknown Input file #0 (http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4): Input stream #0:0 (video): 910 packets read (11573775 bytes); 901 frames decoded; Input stream #0:1 (audio): 21 packets read (10080 bytes); Input stream #0:2 (audio): 946 packets read (1210880 bytes); 946 frames decoded (1453056 samples); Total: 1877 packets (12794735 bytes) demuxed Output file #0 (C:\temp\ffmpeg\bbb.m3u8): Output stream #0:0 (video): 901 frames encoded; 901 packets muxed (24001991 bytes); Output stream #0:1 (audio): 1407 frames encoded (1440000 samples); 1408 packets muxed (481577 bytes); Total: 2309 packets (24483568 bytes) muxed x265 [info]: frame I: 16, Avg QP:19.38 kb/s: 54461.61 x265 [info]: frame P: 227, Avg QP:20.80 kb/s: 15128.22 x265 [info]: frame B: 658, Avg QP:23.70 kb/s: 2210.48 x265 [info]: consecutive B-frames: 7.4% 0.8% 5.3% 86.4% encoded 901 frames in 17.87s (50.43 fps), 6392.88 kb/s, Avg QP:22.90 [aac @ 000000284a93ddc0] Qavg: 134.647 }}} and the content of bbb.m3u8: {{{ #EXTM3U #EXT-X-VERSION:7 #EXT-X-TARGETDURATION:6 #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-MAP:URI="C:\temp\ffmpeg\bbb.m4s",BYTERANGE="3666@0" #EXTINF:5.999610, #EXT-X-BYTERANGE:3666@0 bbb.m4s #EXTINF:3.999740, #EXT-X-BYTERANGE:7948714@3666 bbb.m4s #EXTINF:3.999740, #EXT-X-BYTERANGE:-2932786@7952380 bbb.m4s #EXTINF:3.999740, #EXT-X-BYTERANGE:-1690139@5019594 bbb.m4s #EXTINF:3.999740, #EXT-X-BYTERANGE:-1355411@3329455 bbb.m4s #EXTINF:3.999740, #EXT-X-BYTERANGE:-1147050@1974044 bbb.m4s #EXTINF:3.999740, #EXT-X-BYTERANGE:1131975@826994 bbb.m4s #EXTINF:0.033331, #EXT-X-BYTERANGE:-1958593@1958969 bbb.m4s #EXT-X-ENDLIST }}} also the bbb.mp4 is broken and can't play (file attached) -- Ticket URL: <https://trac.ffmpeg.org/ticket/7021#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker _______________________________________________ FFmpeg-trac mailing list FFmpeg-trac@avcodec.org http://ffmpeg.org/mailman/listinfo/ffmpeg-trac