#6888 closed defect (fixed)
HLS segmenter doesn't cut .m4s files at its expected duration
Reported by: | beloko | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | git-master | Keywords: | HLS |
Cc: | beloko@gmail.com | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Hello,
I'm attempting to create an HLS stream with fragmented MP4 files instead of usual MPEG2-TS files. Because the next step for Ultra HD broadcasting will require the HEVC video codec. And Apple won't support MPEG2-TS to broadcast HEVC contents.
Now, I see FFMPEG embeds some new parameters to create fMP4 streams inside its HLS segmenter : -hls_segment_type and -hls_fmp4_init_filename. So I decided to climb on the bandwagon.
I'm able to create an HLS stream with fragmented MP4. Share this stream throught my local web server. And succesfully watch its video content from an iPhone or any video player having fMP4 supports. macOS Safari (High Sierra) and Windows Edge (Fall Creators) browsers are also ready.
Here is my FFMPEG command line :
ffmpeg.exe -i "http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4" -loglevel verbose -threads 0 -an -sn -vcodec libx264 -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 fmp4 -hls_fmp4_init_filename "C:\inetpub\wwwroot\fmp4_x264\init.mp4" -t 30 "C:\inetpub\wwwroot\fmp4_x264\big_bunny.m3u8"
I set the -hls_time to segment every 4 seconds and the -force_key_frames to create an IFrame every 4 seconds. Unfortunately the Apple Mediastreamvalidator tool find errors about segment length.
Belokos-Mac:~ beloko$ mediastreamvalidator http://192.168.1.3/fmp4_x264/big_bunny.m3u8 mediastreamvalidator: Version 1.2(170822) [/fmp4_x264/big_bunny.m3u8] Started root playlist download [/fmp4_x264/big_bunny.m3u8] Started media playlist download [/fmp4_x264/big_bunny.m3u8] All media files delivered and have end tag, stopping -------------------------------------------------------------------------------- http://192.168.1.3/fmp4_x264/big_bunny.m3u8 -------------------------------------------------------------------------------- Processed 8 out of 8 segments Average segment duration: 3.250000 Total segment bitrates (all discontinuities): average: 3915.87 kb/s, max: 6866.19 kb/s Discontinuity: sequence: 0, parsed segment count: 8 of 8, duration: 26.000 sec, average: 3915.87 kb/s, max: 6866.19 kb/s Track ID: 1 Video Codec: avc1 Video profile: High Video level: 4.0 Video resolution: 1920x1080 Video average IDR interval: 3.500000, Standard deviation: 1.152215 Video frame rate: 25.000 -------------------------------------------------------------------------------- MUST fix issues -------------------------------------------------------------------------------- Error: Playlist vs segment duration mismatch --> Detail: Segment duration 8.0000, Playlist duration: 4.0000 --> Source: http://192.168.1.3/fmp4_x264/big_bunny.m3u8 - big_bunny1.m4s
Here is the .m3u8 content :
#EXTM3U #EXT-X-VERSION:7 #EXT-X-TARGETDURATION:4 #EXT-X-MEDIA-SEQUENCE:1 #EXT-X-MAP:URI="C:\inetpub\wwwroot\fmp4_x264\init.mp4" #EXTINF:4.000000, big_bunny1.m4s #EXTINF:4.000000, big_bunny2.m4s #EXTINF:4.000000, big_bunny3.m4s #EXTINF:4.000000, big_bunny4.m4s #EXTINF:4.000000, big_bunny5.m4s #EXTINF:3.520000, big_bunny6.m4s #EXTINF:0.480000, big_bunny7.m4s #EXTINF:2.000000, big_bunny8.m4s #EXT-X-ENDLIST
And here is the duration I get for each .m4s segmented file using FFProbe :
. big_bunny1.m4s = 00:00:08.00
. big_bunny2.m4s = 00:00:04.00
. big_bunny3.m4s = 00:00:04.00
. big_bunny4.m4s = 00:00:04.00
. big_bunny5.m4s = 00:00:04.00
. big_bunny6.m4s = 00:00:03.52
. big_bunny7.m4s = 00:00:00.44
. big_bunny8.m4s = 00:00:02.00
Finally I can fix the duration length for segments big_bunny6.m4s and big_bunny7.m4s.
Here is the command line updated :
ffmpeg.exe -i "http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4" -loglevel verbose -threads 0 -an -sn -vcodec libx264 -force_key_frames "expr:gte(t,n_forced*4)" -sc_threshold 0 -r 25 -f hls -hls_time 4 -hls_list_size 99999 -start_number 1 -hls_segment_type fmp4 -hls_fmp4_init_filename "C:\inetpub\wwwroot\fmp4_x264\init.mp4" -t 30 "C:\inetpub\wwwroot\fmp4_x264\big_bunny.m3u8"
I use the -sc_threshold parameter to disable the scene cuts detection. Then FFMPEG isn't granted to intelligently insert some IFrames to optimize video quality. And the HLS segmenter can't cut at a wrong IFrames before expected segment duration.
Here is the .m3u8 content :
#EXTM3U #EXT-X-VERSION:7 #EXT-X-TARGETDURATION:4 #EXT-X-MEDIA-SEQUENCE:1 #EXT-X-MAP:URI="init.mp4" #EXTINF:4.000000, big_bunny1.m4s #EXTINF:4.000000, big_bunny2.m4s #EXTINF:4.000000, big_bunny3.m4s #EXTINF:4.000000, big_bunny4.m4s #EXTINF:4.000000, big_bunny5.m4s #EXTINF:4.000000, big_bunny6.m4s #EXTINF:2.000000, big_bunny7.m4s #EXT-X-ENDLIST
Everything looks fine. Each segments holds 4 seconds. But the sum of all segments duration should be 30 seconds because I used -t 30 parameters. Here I calculate (6 x 4) + (1 x 2) = 26 seconds. 4 seconds are missing.
So here is what I can inspect about each segment with FFProbe :
. big_bunny1.m4s = 00:00:08.00
. big_bunny2.m4s = 00:00:04.00
. big_bunny3.m4s = 00:00:04.00
. big_bunny4.m4s = 00:00:04.00
. big_bunny5.m4s = 00:00:04.00
. big_bunny6.m4s = 00:00:04.00
. big_bunny7.m4s = 00:00:02.00
Now (1 x 8) + (5 x 4) + (1 x 2) = 30 seconds.
Seems the first .m4s segment file isn't properly cut at the expected duration by the HLS segmenter.
PS/ to probe .m4s files I have to concatenate the init.mp4 file with each .m4s file to create a clean video file. Because .mp4 contains video headers and .m4s contains the video stream.
Here is the command line to concatenate properly and inspect the first segment :
ffmpeg.exe -i "concat:C:\inetpub\wwwroot\fmp4_x264\init.mp4|C:\inetpub\wwwroot\fmp4_x264\big_bunny1.m4s" -codec copy C:\inetpub\wwwroot\fmp4_x264\concated1.mp4 ffprobe C:\inetpub\wwwroot\fmp4_x264\concated1.mp4
Attachments (5)
Change History (22)
comment:1 by , 7 years ago
comment:3 by , 7 years ago
I would like to be able to upload all my files, but attachments can't exceed the 2.5Mo size limit on the tracker.
Error: Upload failed
Maximum attachment size: 2621440 bytes
So I'm just able to upload :
. big_buck_bunny.m3u8 as HLS playlist file
. init.mp4 as MP4 header
. big_bunny1.m4s as 1st segment of the video stream
However you can reproduce the issue easily on any computer :
. build an FFMPEG from its GIT-Master repository
. and copy paste my FFMPEG command line
. execute the command line
. and wait for less than 1 minute to create the HLS output stream
Here is my command line :
ffmpeg_x64.exe -i "http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4" -loglevel verbose -threads 0 -an -sn -vcodec libx264 -force_key_frames "expr:gte(t,n_forced*4)" -sc_threshold 0 -r 25 -f hls -hls_time 4 -hls_list_size 99999 -start_number 1 -hls_segment_type fmp4 -hls_fmp4_init_filename "C:\inetpub\wwwroot\fmp4_x264\init.mp4" -t 30 "C:\inetpub\wwwroot\fmp4_x264\big_bunny.m3u8"
As you see I used the common video file "Big buck bunny" as video source (available here : http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4). FFMPEG can download it from the command line throught the HTTP protocole. So you don't need to download it on your hard drive to create HLS files.
And of course you'll need to replace my output folder (C:\inetpub\wwwroot\fmp4_x264\) by your prefered output folder. For the init.mp4 file and the big_bunny.m3u8 file. This 2 files may be in the same folder.
comment:4 by , 7 years ago
Cc: | added |
---|---|
Component: | undetermined → ffmpeg |
comment:5 by , 7 years ago
Component: | ffmpeg → avformat |
---|
comment:6 by , 7 years ago
sorry, sir, can you provide the log of segmentation? cause the length of every m4s file is pretty OK on my Ubuntu 15.10 with the lastest version ffmpeg.
Here is my command
ffmpeg -i source.mp4 -an -sn -vcodec libx264 -force_key_frames "expr:gte(t,n_forced*4)" -sc_threshold 0 -r 25 -f hls -hls_time 4 -hls_list_size 99999 -start_number 1 -hls_segment_type fmp4 -hls_fmp4_init_filename init.mp4 -t 30 -threads 0 big_bunny.m3u8
Then I get 8 m4s files. The first 7 is 4 seconds long and the last one is 2 seconds long.
But what is pretty interesting is that my m3u8 file is pretty weird.
#EXTM3U #EXT-X-VERSION:7 #EXT-X-TARGETDURATION:4 #EXT-X-MEDIA-SEQUENCE:1 #EXT-X-MAP:URI="init.mp4" #EXTINF:4.000000, big_bunny2.m4s #EXTINF:4.000000, big_bunny3.m4s #EXTINF:4.000000, big_bunny4.m4s #EXTINF:4.000000, big_bunny5.m4s #EXTINF:4.000000, big_bunny6.m4s #EXTINF:4.000000, big_bunny7.m4s #EXTINF:2.000000, big_bunny8.m4s #EXT-X-ENDLIST
It misses the first m4s file. I am still working on that bug. But I need to first figure out why your ffmpeg provide different results from me.
comment:7 by , 7 years ago
No problem :)
I just synchronised my local built repository with the latest GIT-Master repository.
And here is the verbose log of my FFMPEG command line with this fresh version :
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 -an -sn -vcodec libx264 -force_key_frames "expr:gte(t,n_forced*4)" -sc_threshold 0 -r 25 -f hls -hls_time 4 -hls_list_size 99999 -start_number 1 -hls_segment_type fmp4 -hls_fmp4_init_filename "C:\inetpub\wwwroot\fmp4_x264\init.mp4" -t 30 "C:\inetpub\wwwroot\fmp4_x264\big_bunny.m3u8" ffmpeg version N-89404-gdc7d5f9-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. 5.100 / 56. 5.100 libavcodec 58. 6.103 / 58. 6.103 libavformat 58. 2.103 / 58. 2.103 libavdevice 58. 0.100 / 58. 0.100 libavfilter 7. 7.100 / 7. 7.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 @ 000001cf0ea60240] 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)) Press [q] to stop, [?] for help [h264 @ 000001cf0ea4ab00] Reinit context to 1920x1088, pix_fmt: yuv420p [graph 0 input from stream 0:0 @ 000001cf10a1eb60] w:1920 h:1080 pixfmt:yuv420p tb:1/30000 fr:30/1 sar:1/1 sws_param:flags=2 [libx264 @ 000001cf10d10fa0] using SAR=1/1 [libx264 @ 000001cf10d10fa0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2 [libx264 @ 000001cf10d10fa0] profile High, level 4.0 [libx264 @ 000001cf10d10fa0] 264 - core 148 r2795M aaa9aa8 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 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=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=0 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 @ 000001cf10d092a0] Opening 'C:\inetpub\wwwroot\fmp4_x264\init.mp4' for writing Output #0, hls, to 'C:\inetpub\wwwroot\fmp4_x264\big_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.103 Stream #0:0(und): Video: h264 (libx264), 1 reference frame, yuv420p(left), 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default) Metadata: creation_time : 2013-12-16T17:44:39.000000Z handler_name : GPAC ISO Video Handler encoder : Lavc58.6.103 libx264 Side data: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1 *** 2 dup! Past duration 0.666664 too large Past duration 0.833321 too large Past duration 0.999992 too large *** 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 61 *** dropping frame 68 from stream 0 at ts 66 *** dropping frame 73 from stream 0 at ts 7100:00.56 bitrate=N/A dup=2 drop=12 speed=1.12x *** 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 *** dropping frame 128 from stream 0 at ts 126 *** dropping frame 133 from stream 0 at ts 131:02.96 bitrate=N/A dup=2 drop=24 speed=2.91x *** 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 @ 000001cf10d092a0] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny1.m4s' for writing [hls @ 000001cf10d092a0] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny.m3u8.tmp' for writing 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 *** dropping frame 173 from stream 0 at ts 171:04.44 bitrate=N/A dup=2 drop=32 speed=2.75x *** 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:05.32 bitrate=N/A dup=2 drop=36 speed= 2.5x *** dropping frame 198 from stream 0 at ts 196 *** dropping frame 203 from stream 0 at ts 201 *** dropping frame 208 from stream 0 at ts 206:05.84 bitrate=N/A dup=2 drop=39 speed=2.12x *** dropping frame 213 from stream 0 at ts 211 *** dropping frame 218 from stream 0 at ts 216:06.36 bitrate=N/A dup=2 drop=41 speed=1.93x *** dropping frame 223 from stream 0 at ts 221 *** dropping frame 228 from stream 0 at ts 226 *** dropping frame 233 from stream 0 at ts 231:06.96 bitrate=N/A dup=2 drop=44 speed=1.81x *** dropping frame 238 from stream 0 at ts 236 *** dropping frame 243 from stream 0 at ts 241 *** dropping frame 248 from stream 0 at ts 246:07.48 bitrate=N/A dup=2 drop=47 speed=1.71x *** dropping frame 253 from stream 0 at ts 251 [hls @ 000001cf10d092a0] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny2.m4s' for writing [hls @ 000001cf10d092a0] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny.m3u8.tmp' for writing EXT-X-MEDIA-SEQUENCE:1 *** dropping frame 258 from stream 0 at ts 256 *** dropping frame 263 from stream 0 at ts 261:08.16 bitrate=N/A dup=2 drop=50 speed=1.65x *** dropping frame 268 from stream 0 at ts 266 *** dropping frame 273 from stream 0 at ts 271 *** dropping frame 278 from stream 0 at ts 276:08.72 bitrate=N/A dup=2 drop=53 speed=1.59x *** dropping frame 283 from stream 0 at ts 281 *** dropping frame 288 from stream 0 at ts 286 *** dropping frame 293 from stream 0 at ts 291:09.36 bitrate=N/A dup=2 drop=56 speed=1.56x *** dropping frame 298 from stream 0 at ts 296 *** dropping frame 303 from stream 0 at ts 301 *** dropping frame 308 from stream 0 at ts 306 *** dropping frame 313 from stream 0 at ts 311:10.04 bitrate=N/A dup=2 drop=60 speed=1.54x *** dropping frame 318 from stream 0 at ts 316 *** dropping frame 323 from stream 0 at ts 321:10.56 bitrate=N/A dup=2 drop=62 speed= 1.5x *** dropping frame 328 from stream 0 at ts 326 *** dropping frame 333 from stream 0 at ts 331 *** dropping frame 338 from stream 0 at ts 336:11.08 bitrate=N/A dup=2 drop=65 speed=1.45x *** dropping frame 343 from stream 0 at ts 341 *** dropping frame 348 from stream 0 at ts 346 *** dropping frame 353 from stream 0 at ts 351 [hls @ 000001cf10d092a0] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny3.m4s' for writing [hls @ 000001cf10d092a0] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny.m3u8.tmp' for writing EXT-X-MEDIA-SEQUENCE:1 *** dropping frame 358 from stream 0 at ts 356 *** dropping frame 363 from stream 0 at ts 361 *** dropping frame 368 from stream 0 at ts 366 *** dropping frame 373 from stream 0 at ts 371:12.48 bitrate=N/A dup=2 drop=72 speed=1.44x *** dropping frame 378 from stream 0 at ts 376 *** dropping frame 383 from stream 0 at ts 381 *** dropping frame 388 from stream 0 at ts 386 *** dropping frame 393 from stream 0 at ts 391:13.36 bitrate=N/A dup=2 drop=76 speed=1.45x *** dropping frame 398 from stream 0 at ts 396 *** dropping frame 403 from stream 0 at ts 401:13.76 bitrate=N/A dup=2 drop=78 speed=1.39x *** dropping frame 408 from stream 0 at ts 406 *** dropping frame 413 from stream 0 at ts 411 *** dropping frame 418 from stream 0 at ts 416 *** dropping frame 423 from stream 0 at ts 421:14.56 bitrate=N/A dup=2 drop=82 speed= 1.4x *** dropping frame 428 from stream 0 at ts 426 *** dropping frame 433 from stream 0 at ts 431 *** dropping frame 438 from stream 0 at ts 436 *** dropping frame 443 from stream 0 at ts 441 *** dropping frame 448 from stream 0 at ts 446:15.56 bitrate=N/A dup=2 drop=87 speed=1.42x *** dropping frame 453 from stream 0 at ts 451 [hls @ 000001cf10d092a0] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny4.m4s' for writing [hls @ 000001cf10d092a0] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny.m3u8.tmp' for writing EXT-X-MEDIA-SEQUENCE:1 *** dropping frame 458 from stream 0 at ts 456 *** dropping frame 463 from stream 0 at ts 461 *** dropping frame 468 from stream 0 at ts 466:16.32 bitrate=N/A dup=2 drop=91 speed=1.41x *** dropping frame 473 from stream 0 at ts 471 *** dropping frame 478 from stream 0 at ts 476 *** dropping frame 483 from stream 0 at ts 481 *** dropping frame 488 from stream 0 at ts 486 *** dropping frame 493 from stream 0 at ts 491:17.28 bitrate=N/A dup=2 drop=96 speed=1.41x *** dropping frame 498 from stream 0 at ts 496 *** dropping frame 503 from stream 0 at ts 501 *** dropping frame 508 from stream 0 at ts 506 *** dropping frame 513 from stream 0 at ts 511 *** dropping frame 518 from stream 0 at ts 516:18.24 bitrate=N/A dup=2 drop=101 speed=1.41x *** dropping frame 523 from stream 0 at ts 521 *** dropping frame 528 from stream 0 at ts 526 *** dropping frame 533 from stream 0 at ts 531 *** dropping frame 538 from stream 0 at ts 536:19.16 bitrate=N/A dup=2 drop=105 speed=1.41x *** dropping frame 543 from stream 0 at ts 541 *** dropping frame 548 from stream 0 at ts 546 *** dropping frame 553 from stream 0 at ts 551 [hls @ 000001cf10d092a0] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny5.m4s' for writing [hls @ 000001cf10d092a0] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny.m3u8.tmp' for writing EXT-X-MEDIA-SEQUENCE:1 *** dropping frame 558 from stream 0 at ts 556 *** dropping frame 563 from stream 0 at ts 561:20.16 bitrate=N/A dup=2 drop=110 speed=1.42x *** dropping frame 568 from stream 0 at ts 566 *** dropping frame 573 from stream 0 at ts 571 *** dropping frame 578 from stream 0 at ts 576 *** dropping frame 583 from stream 0 at ts 581 *** dropping frame 588 from stream 0 at ts 586 *** dropping frame 593 from stream 0 at ts 591 *** dropping frame 598 from stream 0 at ts 596 *** dropping frame 603 from stream 0 at ts 601:21.72 bitrate=N/A dup=2 drop=118 speed=1.47x *** dropping frame 608 from stream 0 at ts 606 *** dropping frame 613 from stream 0 at ts 611 *** dropping frame 618 from stream 0 at ts 616 *** dropping frame 623 from stream 0 at ts 621 *** dropping frame 628 from stream 0 at ts 626 *** dropping frame 633 from stream 0 at ts 631:22.88 bitrate=N/A dup=2 drop=124 speed= 1.5x *** dropping frame 638 from stream 0 at ts 636 *** dropping frame 643 from stream 0 at ts 641 *** dropping frame 648 from stream 0 at ts 646 *** dropping frame 653 from stream 0 at ts 651 [hls @ 000001cf10d092a0] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny6.m4s' for writing [hls @ 000001cf10d092a0] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny.m3u8.tmp' for writing EXT-X-MEDIA-SEQUENCE:1 *** dropping frame 658 from stream 0 at ts 656:23.96 bitrate=N/A dup=2 drop=129 speed= 1.5x *** dropping frame 663 from stream 0 at ts 661 *** dropping frame 668 from stream 0 at ts 666 *** dropping frame 673 from stream 0 at ts 671 *** dropping frame 678 from stream 0 at ts 676 *** dropping frame 683 from stream 0 at ts 681:24.92 bitrate=N/A dup=2 drop=134 speed=1.45x *** dropping frame 688 from stream 0 at ts 686 *** dropping frame 693 from stream 0 at ts 691 *** dropping frame 698 from stream 0 at ts 696:25.48 bitrate=N/A dup=2 drop=137 speed=1.44x *** dropping frame 703 from stream 0 at ts 701 *** dropping frame 708 from stream 0 at ts 706 *** dropping frame 713 from stream 0 at ts 711 *** dropping frame 718 from stream 0 at ts 716:26.24 bitrate=N/A dup=2 drop=141 speed=1.43x *** dropping frame 723 from stream 0 at ts 721 *** dropping frame 728 from stream 0 at ts 726 *** dropping frame 733 from stream 0 at ts 731:26.92 bitrate=N/A dup=2 drop=144 speed=1.43x *** dropping frame 738 from stream 0 at ts 736 *** dropping frame 743 from stream 0 at ts 741 *** dropping frame 748 from stream 0 at ts 746 No more output streams to write to, finishing.:27.64 bitrate=N/A dup=2 drop=148 speed=1.43x [hls @ 000001cf10d092a0] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny7.m4s' for writing [hls @ 000001cf10d092a0] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny.m3u8.tmp' for writing EXT-X-MEDIA-SEQUENCE:1 [hls @ 000001cf10d092a0] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny.m3u8.tmp' for writing EXT-X-MEDIA-SEQUENCE:1 frame= 750 fps= 36 q=-1.0 Lsize=N/A time=00:00:29.88 bitrate=N/A dup=2 drop=148 speed=1.45x video:12174kB audio:0kB 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): 907 packets read (11565677 bytes); 898 frames decoded; Input stream #0:1 (audio): 21 packets read (10080 bytes); Input stream #0:2 (audio): 1 packets read (1280 bytes); Total: 929 packets (11577037 bytes) demuxed Output file #0 (C:\inetpub\wwwroot\fmp4_x264\big_bunny.m3u8): Output stream #0:0 (video): 750 frames encoded; 750 packets muxed (12466439 bytes); Total: 750 packets (12466439 bytes) muxed [libx264 @ 000001cf10d10fa0] frame I:8 Avg QP:14.94 size:240506 [libx264 @ 000001cf10d10fa0] frame P:222 Avg QP:19.99 size: 37867 [libx264 @ 000001cf10d10fa0] frame B:520 Avg QP:24.33 size: 4106 [libx264 @ 000001cf10d10fa0] consecutive B-frames: 3.6% 8.5% 10.0% 77.9% [libx264 @ 000001cf10d10fa0] mb I I16..4: 33.7% 45.8% 20.5% [libx264 @ 000001cf10d10fa0] mb P I16..4: 3.1% 7.9% 0.9% P16..4: 23.0% 8.3% 6.6% 0.0% 0.0% skip:50.2% [libx264 @ 000001cf10d10fa0] mb B I16..4: 0.5% 0.4% 0.0% B16..8: 23.8% 1.4% 0.4% direct: 1.4% skip:72.1% L0:45.5% L1:49.5% BI: 5.1% [libx264 @ 000001cf10d10fa0] 8x8 transform intra:59.2% inter:63.1% [libx264 @ 000001cf10d10fa0] coded y,uvDC,uvAC intra: 30.3% 42.8% 23.4% inter: 5.7% 7.4% 1.7% [libx264 @ 000001cf10d10fa0] i16 v,h,dc,p: 66% 19% 6% 9% [libx264 @ 000001cf10d10fa0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 14% 32% 3% 4% 4% 5% 4% 4% [libx264 @ 000001cf10d10fa0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 15% 12% 7% 9% 9% 9% 8% 9% [libx264 @ 000001cf10d10fa0] i8c dc,h,v,p: 63% 19% 13% 6% [libx264 @ 000001cf10d10fa0] Weighted P-Frames: Y:8.6% UV:8.1% [libx264 @ 000001cf10d10fa0] ref P L0: 66.4% 12.6% 13.8% 7.2% 0.0% [libx264 @ 000001cf10d10fa0] ref B L0: 86.9% 10.8% 2.2% [libx264 @ 000001cf10d10fa0] ref B L1: 95.2% 4.8% [libx264 @ 000001cf10d10fa0] kb/s:3324.20
The .m3u8 playlist content is :
C:\Users\Beloko\Desktop\FFMPEG>type C:\inetpub\wwwroot\fmp4_x264\big_bunny.m3u8 #EXTM3U #EXT-X-VERSION:7 #EXT-X-TARGETDURATION:4 #EXT-X-MEDIA-SEQUENCE:1 #EXT-X-MAP:URI="init.mp4" #EXTINF:4.000000, big_bunny1.m4s #EXTINF:4.000000, big_bunny2.m4s #EXTINF:4.000000, big_bunny3.m4s #EXTINF:4.000000, big_bunny4.m4s #EXTINF:4.000000, big_bunny5.m4s #EXTINF:4.000000, big_bunny6.m4s #EXTINF:2.000000, big_bunny7.m4s #EXT-X-ENDLIST
The full duration for the sum of the seven .m4s files is : 4 + 4 + 4 + 4 + 4 + 4 + 2 = 26 seconds.
It misses 4 seconds to get 30 seconds as expected by the -t 30 parameter.
Then to be able to probe each .m4s file we have to glue the init.mp4 (video header) with each .m4s (video data stream). Like this :
C:\Users\Beloko\Desktop\FFMPEG>ffmpeg.exe -i "concat:C:\inetpub\wwwroot\fmp4_x264\init.mp4|C:\inetpub\wwwroot\fmp4_x264\big_bunny1.m4s" -codec copy C:\inetpub\wwwroot\fmp4_x264\concated1.mp4 ffmpeg version N-89404-gdc7d5f9-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. 5.100 / 56. 5.100 libavcodec 58. 6.103 / 58. 6.103 libavformat 58. 2.103 / 58. 2.103 libavdevice 58. 0.100 / 58. 0.100 libavfilter 7. 7.100 / 7. 7.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 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'concat:C:\inetpub\wwwroot\fmp4_x264\init.mp4|C:\inetpub\wwwroot\fmp4_x264\big_bunny1.m4s': Metadata: major_brand : iso5 minor_version : 512 compatible_brands: iso6mp41 title : Big Buck Bunny, Sunflower version artist : Blender Foundation 2008, Janus Bager Kristensen 2013 composer : Sacha Goedegebure encoder : Lavf58.2.103 comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net genre : Animation Duration: 00:00:08.08, start: 0.160000, bitrate: 1092 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 1089 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler Output #0, mp4, to 'C:\inetpub\wwwroot\fmp4_x264\concated1.mp4': Metadata: major_brand : iso5 minor_version : 512 compatible_brands: iso6mp41 title : Big Buck Bunny, Sunflower version artist : Blender Foundation 2008, Janus Bager Kristensen 2013 composer : Sacha Goedegebure genre : Animation comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net encoder : Lavf58.2.103 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 1089 kb/s, 25 fps, 25 tbr, 12800 tbn, 12800 tbc (default) Metadata: handler_name : VideoHandler Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help frame= 200 fps=0.0 q=-1.0 Lsize= 1078kB time=00:00:07.88 bitrate=1120.5kbits/s speed=3.97e+003x video:1074kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.317772% C:\Users\Beloko\Desktop\FFMPEG>ffmpeg.exe -i "concat:C:\inetpub\wwwroot\fmp4_x264\init.mp4|C:\inetpub\wwwroot\fmp4_x264\big_bunny2.m4s" -codec copy C:\inetpub\wwwroot\fmp4_x264\concated2.mp4 ffmpeg version N-89404-gdc7d5f9-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. 5.100 / 56. 5.100 libavcodec 58. 6.103 / 58. 6.103 libavformat 58. 2.103 / 58. 2.103 libavdevice 58. 0.100 / 58. 0.100 libavfilter 7. 7.100 / 7. 7.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 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'concat:C:\inetpub\wwwroot\fmp4_x264\init.mp4|C:\inetpub\wwwroot\fmp4_x264\big_bunny2.m4s': Metadata: major_brand : iso5 minor_version : 512 compatible_brands: iso6mp41 title : Big Buck Bunny, Sunflower version artist : Blender Foundation 2008, Janus Bager Kristensen 2013 composer : Sacha Goedegebure encoder : Lavf58.2.103 comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net genre : Animation Duration: 00:00:12.08, start: 8.160000, bitrate: 1717 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 1716 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler Output #0, mp4, to 'C:\inetpub\wwwroot\fmp4_x264\concated2.mp4': Metadata: major_brand : iso5 minor_version : 512 compatible_brands: iso6mp41 title : Big Buck Bunny, Sunflower version artist : Blender Foundation 2008, Janus Bager Kristensen 2013 composer : Sacha Goedegebure genre : Animation comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net encoder : Lavf58.2.103 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 1716 kb/s, 25 fps, 25 tbr, 12800 tbn, 12800 tbc (default) Metadata: handler_name : VideoHandler Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help frame= 100 fps=0.0 q=-1.0 Lsize= 2533kB time=00:00:03.88 bitrate=5348.4kbits/s speed= 318x video:2531kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.088590% C:\Users\Beloko\Desktop\FFMPEG>ffmpeg.exe -i "concat:C:\inetpub\wwwroot\fmp4_x264\init.mp4|C:\inetpub\wwwroot\fmp4_x264\big_bunny3.m4s" -codec copy C:\inetpub\wwwroot\fmp4_x264\concated3.mp4 ffmpeg version N-89404-gdc7d5f9-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. 5.100 / 56. 5.100 libavcodec 58. 6.103 / 58. 6.103 libavformat 58. 2.103 / 58. 2.103 libavdevice 58. 0.100 / 58. 0.100 libavfilter 7. 7.100 / 7. 7.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 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'concat:C:\inetpub\wwwroot\fmp4_x264\init.mp4|C:\inetpub\wwwroot\fmp4_x264\big_bunny3.m4s': Metadata: major_brand : iso5 minor_version : 512 compatible_brands: iso6mp41 title : Big Buck Bunny, Sunflower version artist : Blender Foundation 2008, Janus Bager Kristensen 2013 composer : Sacha Goedegebure encoder : Lavf58.2.103 comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net genre : Animation Duration: 00:00:16.08, start: 12.160000, bitrate: 1333 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 1332 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler Output #0, mp4, to 'C:\inetpub\wwwroot\fmp4_x264\concated3.mp4': Metadata: major_brand : iso5 minor_version : 512 compatible_brands: iso6mp41 title : Big Buck Bunny, Sunflower version artist : Blender Foundation 2008, Janus Bager Kristensen 2013 composer : Sacha Goedegebure genre : Animation comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net encoder : Lavf58.2.103 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 1332 kb/s, 25 fps, 25 tbr, 12800 tbn, 12800 tbc (default) Metadata: handler_name : VideoHandler Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help frame= 100 fps=0.0 q=-1.0 Lsize= 2617kB time=00:00:03.88 bitrate=5525.7kbits/s speed= 561x video:2615kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.088286% C:\Users\Beloko\Desktop\FFMPEG>ffmpeg.exe -i "concat:C:\inetpub\wwwroot\fmp4_x264\init.mp4|C:\inetpub\wwwroot\fmp4_x264\big_bunny4.m4s" -codec copy C:\inetpub\wwwroot\fmp4_x264\concated4.mp4 ffmpeg version N-89404-gdc7d5f9-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. 5.100 / 56. 5.100 libavcodec 58. 6.103 / 58. 6.103 libavformat 58. 2.103 / 58. 2.103 libavdevice 58. 0.100 / 58. 0.100 libavfilter 7. 7.100 / 7. 7.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 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'concat:C:\inetpub\wwwroot\fmp4_x264\init.mp4|C:\inetpub\wwwroot\fmp4_x264\big_bunny4.m4s': Metadata: major_brand : iso5 minor_version : 512 compatible_brands: iso6mp41 title : Big Buck Bunny, Sunflower version artist : Blender Foundation 2008, Janus Bager Kristensen 2013 composer : Sacha Goedegebure encoder : Lavf58.2.103 comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net genre : Animation Duration: 00:00:20.08, start: 16.160000, bitrate: 957 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 956 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler Output #0, mp4, to 'C:\inetpub\wwwroot\fmp4_x264\concated4.mp4': Metadata: major_brand : iso5 minor_version : 512 compatible_brands: iso6mp41 title : Big Buck Bunny, Sunflower version artist : Blender Foundation 2008, Janus Bager Kristensen 2013 composer : Sacha Goedegebure genre : Animation comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net encoder : Lavf58.2.103 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 956 kb/s, 25 fps, 25 tbr, 12800 tbn, 12800 tbc (default) Metadata: handler_name : VideoHandler Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help frame= 100 fps=0.0 q=-1.0 Lsize= 2346kB time=00:00:03.88 bitrate=4954.0kbits/s speed=1.33e+003x video:2344kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.098818% C:\Users\Beloko\Desktop\FFMPEG>ffmpeg.exe -i "concat:C:\inetpub\wwwroot\fmp4_x264\init.mp4|C:\inetpub\wwwroot\fmp4_x264\big_bunny5.m4s" -codec copy C:\inetpub\wwwroot\fmp4_x264\concated5.mp4 ffmpeg version N-89404-gdc7d5f9-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. 5.100 / 56. 5.100 libavcodec 58. 6.103 / 58. 6.103 libavformat 58. 2.103 / 58. 2.103 libavdevice 58. 0.100 / 58. 0.100 libavfilter 7. 7.100 / 7. 7.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 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'concat:C:\inetpub\wwwroot\fmp4_x264\init.mp4|C:\inetpub\wwwroot\fmp4_x264\big_bunny5.m4s': Metadata: major_brand : iso5 minor_version : 512 compatible_brands: iso6mp41 title : Big Buck Bunny, Sunflower version artist : Blender Foundation 2008, Janus Bager Kristensen 2013 composer : Sacha Goedegebure encoder : Lavf58.2.103 comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net genre : Animation Duration: 00:00:24.08, start: 20.160000, bitrate: 362 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 361 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler Output #0, mp4, to 'C:\inetpub\wwwroot\fmp4_x264\concated5.mp4': Metadata: major_brand : iso5 minor_version : 512 compatible_brands: iso6mp41 title : Big Buck Bunny, Sunflower version artist : Blender Foundation 2008, Janus Bager Kristensen 2013 composer : Sacha Goedegebure genre : Animation comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net encoder : Lavf58.2.103 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 361 kb/s, 25 fps, 25 tbr, 12800 tbn, 12800 tbc (default) Metadata: handler_name : VideoHandler Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help frame= 100 fps=0.0 q=-1.0 Lsize= 1066kB time=00:00:03.88 bitrate=2251.2kbits/s speed=1.2e+003x video:1064kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.214036% C:\Users\Beloko\Desktop\FFMPEG>ffmpeg.exe -i "concat:C:\inetpub\wwwroot\fmp4_x264\init.mp4|C:\inetpub\wwwroot\fmp4_x264\big_bunny6.m4s" -codec copy C:\inetpub\wwwroot\fmp4_x264\concated6.mp4 ffmpeg version N-89404-gdc7d5f9-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. 5.100 / 56. 5.100 libavcodec 58. 6.103 / 58. 6.103 libavformat 58. 2.103 / 58. 2.103 libavdevice 58. 0.100 / 58. 0.100 libavfilter 7. 7.100 / 7. 7.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 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'concat:C:\inetpub\wwwroot\fmp4_x264\init.mp4|C:\inetpub\wwwroot\fmp4_x264\big_bunny6.m4s': Metadata: major_brand : iso5 minor_version : 512 compatible_brands: iso6mp41 title : Big Buck Bunny, Sunflower version artist : Blender Foundation 2008, Janus Bager Kristensen 2013 composer : Sacha Goedegebure encoder : Lavf58.2.103 comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net genre : Animation Duration: 00:00:28.08, start: 24.160000, bitrate: 337 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 336 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler Output #0, mp4, to 'C:\inetpub\wwwroot\fmp4_x264\concated6.mp4': Metadata: major_brand : iso5 minor_version : 512 compatible_brands: iso6mp41 title : Big Buck Bunny, Sunflower version artist : Blender Foundation 2008, Janus Bager Kristensen 2013 composer : Sacha Goedegebure genre : Animation comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net encoder : Lavf58.2.103 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 336 kb/s, 25 fps, 25 tbr, 12800 tbn, 12800 tbc (default) Metadata: handler_name : VideoHandler Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help frame= 100 fps=0.0 q=-1.0 Lsize= 1156kB time=00:00:03.88 bitrate=2440.7kbits/s speed= 658x video:1154kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.196028% C:\Users\Beloko\Desktop\FFMPEG>ffmpeg.exe -i "concat:C:\inetpub\wwwroot\fmp4_x264\init.mp4|C:\inetpub\wwwroot\fmp4_x264\big_bunny7.m4s" -codec copy C:\inetpub\wwwroot\fmp4_x264\concated7.mp4 ffmpeg version N-89404-gdc7d5f9-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. 5.100 / 56. 5.100 libavcodec 58. 6.103 / 58. 6.103 libavformat 58. 2.103 / 58. 2.103 libavdevice 58. 0.100 / 58. 0.100 libavfilter 7. 7.100 / 7. 7.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 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'concat:C:\inetpub\wwwroot\fmp4_x264\init.mp4|C:\inetpub\wwwroot\fmp4_x264\big_bunny7.m4s': Metadata: major_brand : iso5 minor_version : 512 compatible_brands: iso6mp41 title : Big Buck Bunny, Sunflower version artist : Blender Foundation 2008, Janus Bager Kristensen 2013 composer : Sacha Goedegebure encoder : Lavf58.2.103 comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net genre : Animation Duration: 00:00:30.08, start: 28.160000, bitrate: 379 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 379 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler Output #0, mp4, to 'C:\inetpub\wwwroot\fmp4_x264\concated7.mp4': Metadata: major_brand : iso5 minor_version : 512 compatible_brands: iso6mp41 title : Big Buck Bunny, Sunflower version artist : Blender Foundation 2008, Janus Bager Kristensen 2013 composer : Sacha Goedegebure genre : Animation comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net encoder : Lavf58.2.103 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 379 kb/s, 25 fps, 25 tbr, 12800 tbn, 12800 tbc (default) Metadata: handler_name : VideoHandler Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help frame= 50 fps=0.0 q=-1.0 Lsize= 1394kB time=00:00:01.88 bitrate=6073.3kbits/s speed= 549x video:1392kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.122901%
I did it for all .m4s files.
So I get 7 result files in my directory :
. concated1.mp4 (as init.mp4 + big_bunny1.m4s)
. concated2.mp4 (as init.mp4 + big_bunny2.m4s)
. concated3.mp4 (as init.mp4 + big_bunny3.m4s)
. concated4.mp4 (as init.mp4 + big_bunny4.m4s)
. concated5.mp4 (as init.mp4 + big_bunny5.m4s)
. concated6.mp4 (as init.mp4 + big_bunny6.m4s)
. concated7.mp4 (as init.mp4 + big_bunny7.m4s)
Now here is the FFPROBE diagnostic for the seven files I just concatened :
C:\Users\Beloko\Desktop\FFMPEG>ffprobe C:\inetpub\wwwroot\fmp4_x264\concated1.mp4 ffprobe version N-89404-gdc7d5f9-Reino Copyright (c) 2007-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. 5.100 / 56. 5.100 libavcodec 58. 6.103 / 58. 6.103 libavformat 58. 2.103 / 58. 2.103 libavdevice 58. 0.100 / 58. 0.100 libavfilter 7. 7.100 / 7. 7.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 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\inetpub\wwwroot\fmp4_x264\concated1.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 title : Big Buck Bunny, Sunflower version artist : Blender Foundation 2008, Janus Bager Kristensen 2013 composer : Sacha Goedegebure encoder : Lavf58.2.103 comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net genre : Animation Duration: 00:00:08.00, start: 0.000000, bitrate: 1103 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 1100 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler C:\Users\Beloko\Desktop\FFMPEG>ffprobe C:\inetpub\wwwroot\fmp4_x264\concated2.mp4 ffprobe version N-89404-gdc7d5f9-Reino Copyright (c) 2007-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. 5.100 / 56. 5.100 libavcodec 58. 6.103 / 58. 6.103 libavformat 58. 2.103 / 58. 2.103 libavdevice 58. 0.100 / 58. 0.100 libavfilter 7. 7.100 / 7. 7.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 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\inetpub\wwwroot\fmp4_x264\concated2.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 title : Big Buck Bunny, Sunflower version artist : Blender Foundation 2008, Janus Bager Kristensen 2013 composer : Sacha Goedegebure encoder : Lavf58.2.103 comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net genre : Animation Duration: 00:00:04.00, start: 0.000000, bitrate: 5188 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 5183 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler C:\Users\Beloko\Desktop\FFMPEG>ffprobe C:\inetpub\wwwroot\fmp4_x264\concated3.mp4 ffprobe version N-89404-gdc7d5f9-Reino Copyright (c) 2007-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. 5.100 / 56. 5.100 libavcodec 58. 6.103 / 58. 6.103 libavformat 58. 2.103 / 58. 2.103 libavdevice 58. 0.100 / 58. 0.100 libavfilter 7. 7.100 / 7. 7.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 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\inetpub\wwwroot\fmp4_x264\concated3.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 title : Big Buck Bunny, Sunflower version artist : Blender Foundation 2008, Janus Bager Kristensen 2013 composer : Sacha Goedegebure encoder : Lavf58.2.103 comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net genre : Animation Duration: 00:00:04.00, start: 0.000000, bitrate: 5360 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 5355 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler C:\Users\Beloko\Desktop\FFMPEG>ffprobe C:\inetpub\wwwroot\fmp4_x264\concated4.mp4 ffprobe version N-89404-gdc7d5f9-Reino Copyright (c) 2007-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. 5.100 / 56. 5.100 libavcodec 58. 6.103 / 58. 6.103 libavformat 58. 2.103 / 58. 2.103 libavdevice 58. 0.100 / 58. 0.100 libavfilter 7. 7.100 / 7. 7.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 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\inetpub\wwwroot\fmp4_x264\concated4.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 title : Big Buck Bunny, Sunflower version artist : Blender Foundation 2008, Janus Bager Kristensen 2013 composer : Sacha Goedegebure encoder : Lavf58.2.103 comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net genre : Animation Duration: 00:00:04.00, start: 0.000000, bitrate: 4805 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 4800 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler C:\Users\Beloko\Desktop\FFMPEG>ffprobe C:\inetpub\wwwroot\fmp4_x264\concated5.mp4 ffprobe version N-89404-gdc7d5f9-Reino Copyright (c) 2007-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. 5.100 / 56. 5.100 libavcodec 58. 6.103 / 58. 6.103 libavformat 58. 2.103 / 58. 2.103 libavdevice 58. 0.100 / 58. 0.100 libavfilter 7. 7.100 / 7. 7.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 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\inetpub\wwwroot\fmp4_x264\concated5.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 title : Big Buck Bunny, Sunflower version artist : Blender Foundation 2008, Janus Bager Kristensen 2013 composer : Sacha Goedegebure encoder : Lavf58.2.103 comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net genre : Animation Duration: 00:00:04.00, start: 0.000000, bitrate: 2183 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 2179 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler C:\Users\Beloko\Desktop\FFMPEG>ffprobe C:\inetpub\wwwroot\fmp4_x264\concated6.mp4 ffprobe version N-89404-gdc7d5f9-Reino Copyright (c) 2007-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. 5.100 / 56. 5.100 libavcodec 58. 6.103 / 58. 6.103 libavformat 58. 2.103 / 58. 2.103 libavdevice 58. 0.100 / 58. 0.100 libavfilter 7. 7.100 / 7. 7.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 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\inetpub\wwwroot\fmp4_x264\concated6.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 title : Big Buck Bunny, Sunflower version artist : Blender Foundation 2008, Janus Bager Kristensen 2013 composer : Sacha Goedegebure encoder : Lavf58.2.103 comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net genre : Animation Duration: 00:00:04.00, start: 0.000000, bitrate: 2367 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 2362 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler C:\Users\Beloko\Desktop\FFMPEG>ffprobe C:\inetpub\wwwroot\fmp4_x264\concated7.mp4 ffprobe version N-89404-gdc7d5f9-Reino Copyright (c) 2007-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. 5.100 / 56. 5.100 libavcodec 58. 6.103 / 58. 6.103 libavformat 58. 2.103 / 58. 2.103 libavdevice 58. 0.100 / 58. 0.100 libavfilter 7. 7.100 / 7. 7.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 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\inetpub\wwwroot\fmp4_x264\concated7.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 title : Big Buck Bunny, Sunflower version artist : Blender Foundation 2008, Janus Bager Kristensen 2013 composer : Sacha Goedegebure encoder : Lavf58.2.103 comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net genre : Animation Duration: 00:00:02.00, start: 0.000000, bitrate: 5709 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 5702 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler
We can see :
. concated1.mp4 duration is 00:00:08.00
. concated2.mp4 duration is 00:00:04.00
. concated3.mp4 duration is 00:00:04.00
. concated4.mp4 duration is 00:00:04.00
. concated5.mp4 duration is 00:00:04.00
. concated6.mp4 duration is 00:00:04.00
. concated7.mp4 duration is 00:00:02.00
The full duration of all segmented files is 30 seconds as expected. But the first segment is 8 seconds instead of 4 seconds as expected by the -hls_time 4 parameter. And as set in the .m3u8 file.
I can provide more data and log files for all your needs.
Just give me the parameter or the command line you're wainting for.
comment:8 by , 7 years ago
I uploaded two new files as attachments :
. debug.txt
. full_trace.zip
Should be more explicit and convenient than verbose loglevel.
I seen the "forced keyframe" at each 4 seconds in the debug.txt.
comment:9 by , 7 years ago
While this bug gets fixed in HLS segmenter, you could DASH segmenter as a workaround. Please note DASH segmenter is also capable of generating HLS playlists. I have tried the following command in latest ffmpeg and it generates the segments correctly.
ffmpeg -i "http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4" -loglevel verbose -threads 0 -an -sn -vcodec libx264 -x264opts scenecut=-1 -force_key_frames "expr:gte(t,n_forced*4)" -r 25 -min_seg_duration 4000000 -window_size 99999 -t 30 -hls_playlist 1 /tmp/big_bunny.mpd
The above command will generate HLS playlist with the name media_0.m3u8, in the same folder as the output mpd file. You can ignore the big_bunny.mpd file that gets created.
akamai@akamai-VirtualBox:~/ffmpeg$ cat /tmp/media_0.m3u8 #EXTM3U #EXT-X-VERSION:6 #EXT-X-TARGETDURATION:4 #EXT-X-MEDIA-SEQUENCE:1 #EXT-X-MAP:URI="init-stream0.m4s" #EXTINF:4.000000, chunk-stream0-00001.m4s #EXTINF:4.000000, chunk-stream0-00002.m4s #EXTINF:4.000000, chunk-stream0-00003.m4s #EXTINF:4.000000, chunk-stream0-00004.m4s #EXTINF:4.000000, chunk-stream0-00005.m4s #EXTINF:4.000000, chunk-stream0-00006.m4s #EXTINF:4.000000, chunk-stream0-00007.m4s #EXTINF:2.000000, chunk-stream0-00008.m4s #EXT-X-ENDLIST
comment:10 by , 7 years ago
Thank you for this workaround.
I confirm that DASH segmenter is more accurate than HLS segmenter for this job. All my .m4s files have the expected 4 seconds duration. I checked each file duration with FFPROBE.
However for now, I'm not able to create a valid HLS streams having video and audio muxed in the same stream. DASH segmenter create two streams. First stream have video only and second stream have audio only. Finally video and audio segments don't have the same durations. Result looks strange.
Here is the command line where I just replace -an by -c:a libfdk_aac :
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 -c:v libx264 -x264opts scenecut=-1 -force_key_frames "expr:gte(t,n_forced*4)" -r 25 -min_seg_duration 4000000 -window_size 99999 -t 30 -hls_playlist 1 "C:\inetpub\wwwroot\fmp4_x264\big_bunny.mpd"
I get three m3u8 files :
. master.m3u8 (supposed to be the main playlist)
#EXTM3U #EXT-X-VERSION:6 #EXT-X-STREAM-INF:BANDWIDTH=488727 media_1.m3u8
. media_0.m3u8 (as video stream playlist)
#EXTM3U #EXT-X-VERSION:6 #EXT-X-TARGETDURATION:4 #EXT-X-MEDIA-SEQUENCE:1 #EXT-X-MAP:URI="init-stream0.m4s" #EXTINF:4.000000, chunk-stream0-00001.m4s #EXTINF:4.000000, chunk-stream0-00002.m4s #EXTINF:4.000000, chunk-stream0-00003.m4s #EXTINF:4.000000, chunk-stream0-00004.m4s #EXTINF:4.000000, chunk-stream0-00005.m4s #EXTINF:4.000000, chunk-stream0-00006.m4s #EXTINF:4.000000, chunk-stream0-00007.m4s #EXTINF:2.000000, chunk-stream0-00008.m4s #EXT-X-ENDLIST
. media_1.m3u8 (as audio stream playlist)
#EXTM3U #EXT-X-VERSION:6 #EXT-X-TARGETDURATION:5 #EXT-X-MEDIA-SEQUENCE:1 #EXT-X-MAP:URI="init-stream1.m4s" #EXTINF:3.925333, chunk-stream1-00001.m4s #EXTINF:4.010667, chunk-stream1-00002.m4s #EXTINF:3.989333, chunk-stream1-00003.m4s #EXTINF:4.010667, chunk-stream1-00004.m4s #EXTINF:3.989333, chunk-stream1-00005.m4s #EXTINF:4.010667, chunk-stream1-00006.m4s #EXTINF:3.989333, chunk-stream1-00007.m4s #EXTINF:2.074667, chunk-stream1-00008.m4s #EXT-X-ENDLIST
To get a valid HLS stream, all audio segments should have a 4 seconds duration as expected. And master.m3u8 content should be something like that :
#EXTM3U #EXT-X-INDEPENDENT-SEGMENTS #EXT-X-VERSION:6 #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="media_1.m3u8",NAME="media_1.m3u8",LANGUAGE="en",URI="media_1.m3u8" #EXT-X-STREAM-INF:BANDWIDTH=488727,AUDIO="media_1.m3u8" media_0.m3u8
comment:11 by , 7 years ago
Thanks for the reply.
Yes, dashenc doesn't support muxed segments. However AV playout could be achieved with separate streams via correct master playlist. Regarding master playlist, we are waiting for this patch http://ffmpeg.org/pipermail/ffmpeg-devel/2017-November/220668.html to be pushed into master, which supports #EXT-X-MEDIA:TYPE=AUDIO tags. Once that gets pushed, we will submit a patch to add that AUDIO tag feature to dashenc as well.
Regarding audio durations problems, I will have a look into that issue. Maybe rounding durations will help mitigate the issue.
I think we are hijacking this thread with conversions on dashenc, when the original issue is on hlsenc. Could you please open a separate ticket for the above dashenc issue, so that it could be discussed and tracked separately.
follow-up: 13 comment:12 by , 7 years ago
However it's an excellent remark.
Since Apple adopts the fMP4 segmentation, I suppose the FFMPEG common goal could be a global segmenter that can create DASH and HLS streams. Because theses two protocols share the same data stream content throught .m4s files.
HLS segmenter already works pretty well with Adaptive Bitrate and multiple audio/subtitle tracks. It supports MPEG-TS container to keep the compatibility with old Apple and Android devices. It can create WebVTT segmented streams. So, perhaps it could be easier to include an .mpd generator in the current HLS encoder to make the main data stream content compliant with DASH protocol too.
comment:13 by , 7 years ago
Replying to beloko:
However it's an excellent remark.
Since Apple adopts the fMP4 segmentation, I suppose the FFMPEG common goal could be a global segmenter that can create DASH and HLS streams. Because theses two protocols share the same data stream content throught .m4s files.
HLS segmenter already works pretty well with Adaptive Bitrate and multiple audio/subtitle tracks. It supports MPEG-TS container to keep the compatibility with old Apple and Android devices. It can create WebVTT segmented streams. So, perhaps it could be easier to include an .mpd generator in the current HLS encoder to make the main data stream content compliant with DASH protocol too.
https://patchwork.ffmpeg.org/patch/6852/
Try this patch please.
comment:14 by , 7 years ago
I updated my local repository and merged your patch manually.
It works great !! Congratulation you are very strong :)
Here is the command line processed :
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 -an -sn -vcodec libx264 -force_key_frames "expr:gte(t,n_forced*4)" -sc_threshold 0 -r 25 -f hls -hls_time 4 -hls_list_size 99999 -start_number 1 -hls_segment_type fmp4 -hls_fmp4_init_filename "C:\inetpub\wwwroot\fmp4_x264\init.mp4" -t 30 "C:\inetpub\wwwroot\fmp4_x264\big_bunny.m3u8" ffmpeg version N-89524-g74f408c-Reino Copyright (c) 2000-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 libavutil 56. 6.100 / 56. 6.100 libavcodec 58. 8.100 / 58. 8.100 libavformat 58. 3.100 / 58. 3.100 libavdevice 58. 0.100 / 58. 0.100 libavfilter 7. 7.100 / 7. 7.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 @ 08d880e0] 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)) Press [q] to stop, [?] for help [h264 @ 0074c5a0] Reinit context to 1920x1088, pix_fmt: yuv420p [graph 0 input from stream 0:0 @ 097bc840] w:1920 h:1080 pixfmt:yuv420p tb:1/30000 fr:30/1 sar:1/1 sws_param:flags=2 [libx264 @ 09bb88a0] using SAR=1/1 [libx264 @ 09bb88a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2 [libx264 @ 09bb88a0] profile High, level 4.0 [libx264 @ 09bb88a0] 264 - core 148 r2795M aaa9aa8 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 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=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=0 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 @ 097be260] Opening 'C:\inetpub\wwwroot\fmp4_x264\init.mp4' for writing Output #0, hls, to 'C:\inetpub\wwwroot\fmp4_x264\big_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.3.100 Stream #0:0(und): Video: h264 (libx264), 1 reference frame, yuv420p(left), 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default) Metadata: creation_time : 2013-12-16T17:44:39.000000Z handler_name : GPAC ISO Video Handler encoder : Lavc58.8.100 libx264 Side data: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1 *** 2 dup! Past duration 0.666664 too large Past duration 0.833321 too large Past duration 0.999992 too large *** 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 360:00.00 bitrate=N/A dup=2 drop=5 speed= 0x *** 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 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:00.80 bitrate=N/A dup=2 drop=13 speed=0.719x *** 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 9600:01.44 bitrate=N/A dup=2 drop=17 speed=0.886x *** 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:02.04 bitrate=N/A dup=2 drop=20 speed=0.94x *** dropping frame 118 from stream 0 at ts 116:02.40 bitrate=N/A dup=2 drop=21 speed=0.891x *** 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 *** dropping frame 143 from stream 0 at ts 141:03.40 bitrate=N/A dup=2 drop=26 speed=1.03x *** dropping frame 148 from stream 0 at ts 146 *** dropping frame 153 from stream 0 at ts 151 [hls @ 097be260] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny1.m4s' for writing [hls @ 097be260] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny.m3u8.tmp' for writing EXT-X-MEDIA-SEQUENCE:1 *** dropping frame 158 from stream 0 at ts 156:03.96 bitrate=N/A dup=2 drop=29 speed=1.04x *** dropping frame 163 from stream 0 at ts 161 *** dropping frame 168 from stream 0 at ts 166:04.36 bitrate=N/A dup=2 drop=31 speed=0.949x *** dropping frame 173 from stream 0 at ts 171 *** dropping frame 178 from stream 0 at ts 176:04.80 bitrate=N/A dup=2 drop=33 speed=0.936x *** dropping frame 183 from stream 0 at ts 181 *** dropping frame 188 from stream 0 at ts 186:05.16 bitrate=N/A dup=2 drop=35 speed=0.894x *** dropping frame 193 from stream 0 at ts 191:05.40 bitrate=N/A dup=2 drop=36 speed=0.855x *** dropping frame 198 from stream 0 at ts 196:05.60 bitrate=N/A dup=2 drop=37 speed=0.817x *** dropping frame 203 from stream 0 at ts 201 *** dropping frame 208 from stream 0 at ts 206:05.88 bitrate=N/A dup=2 drop=39 speed=0.73x *** dropping frame 213 from stream 0 at ts 211:06.04 bitrate=N/A dup=2 drop=40 speed=0.704x *** dropping frame 218 from stream 0 at ts 216:06.32 bitrate=N/A dup=2 drop=41 speed=0.678x *** dropping frame 223 from stream 0 at ts 221:06.56 bitrate=N/A dup=2 drop=42 speed=0.663x *** dropping frame 228 from stream 0 at ts 226:06.76 bitrate=N/A dup=2 drop=43 speed=0.618x *** dropping frame 233 from stream 0 at ts 231:07.00 bitrate=N/A dup=2 drop=44 speed=0.61x *** dropping frame 238 from stream 0 at ts 236:07.20 bitrate=N/A dup=2 drop=45 speed=0.597x *** dropping frame 243 from stream 0 at ts 241:07.40 bitrate=N/A dup=2 drop=46 speed=0.575x *** dropping frame 248 from stream 0 at ts 246:07.52 bitrate=N/A dup=2 drop=47 speed=0.563x *** dropping frame 253 from stream 0 at ts 251:07.72 bitrate=N/A dup=2 drop=48 speed=0.555x [hls @ 097be260] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny2.m4s' for writing [hls @ 097be260] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny.m3u8.tmp' for writing EXT-X-MEDIA-SEQUENCE:1 *** dropping frame 258 from stream 0 at ts 256:08.00 bitrate=N/A dup=2 drop=49 speed=0.54x *** dropping frame 263 from stream 0 at ts 261:08.20 bitrate=N/A dup=2 drop=50 speed=0.534x *** dropping frame 268 from stream 0 at ts 266 *** dropping frame 273 from stream 0 at ts 271:08.44 bitrate=N/A dup=2 drop=52 speed=0.51x *** dropping frame 278 from stream 0 at ts 276:08.76 bitrate=N/A dup=2 drop=53 speed=0.508x *** dropping frame 283 from stream 0 at ts 281:08.92 bitrate=N/A dup=2 drop=54 speed=0.502x *** dropping frame 288 from stream 0 at ts 286:09.16 bitrate=N/A dup=2 drop=55 speed=0.492x *** dropping frame 293 from stream 0 at ts 291:09.40 bitrate=N/A dup=2 drop=56 speed=0.486x *** dropping frame 298 from stream 0 at ts 296:09.56 bitrate=N/A dup=2 drop=57 speed=0.481x *** dropping frame 303 from stream 0 at ts 301:09.68 bitrate=N/A dup=2 drop=58 speed=0.471x *** dropping frame 308 from stream 0 at ts 306:09.88 bitrate=N/A dup=2 drop=59 speed=0.467x *** dropping frame 313 from stream 0 at ts 311:10.20 bitrate=N/A dup=2 drop=60 speed=0.457x *** dropping frame 318 from stream 0 at ts 316:10.32 bitrate=N/A dup=2 drop=61 speed=0.447x *** dropping frame 323 from stream 0 at ts 321:10.60 bitrate=N/A dup=2 drop=62 speed=0.434x *** dropping frame 328 from stream 0 at ts 326:10.76 bitrate=N/A dup=2 drop=63 speed=0.43x *** dropping frame 333 from stream 0 at ts 331:10.92 bitrate=N/A dup=2 drop=64 speed=0.427x *** dropping frame 338 from stream 0 at ts 336:11.12 bitrate=N/A dup=2 drop=65 speed=0.421x *** dropping frame 343 from stream 0 at ts 341 *** dropping frame 348 from stream 0 at ts 346:11.48 bitrate=N/A dup=2 drop=67 speed=0.415x *** dropping frame 353 from stream 0 at ts 351:11.68 bitrate=N/A dup=2 drop=68 speed=0.413x [hls @ 097be260] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny3.m4s' for writinged=0.411x [hls @ 097be260] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny.m3u8.tmp' for writing EXT-X-MEDIA-SEQUENCE:1 *** dropping frame 358 from stream 0 at ts 356:12.00 bitrate=N/A dup=2 drop=69 speed=0.408x *** dropping frame 363 from stream 0 at ts 361:12.12 bitrate=N/A dup=2 drop=70 speed=0.404x *** dropping frame 368 from stream 0 at ts 366 *** dropping frame 373 from stream 0 at ts 371:12.60 bitrate=N/A dup=2 drop=72 speed=0.406x *** dropping frame 378 from stream 0 at ts 376 *** dropping frame 383 from stream 0 at ts 381:12.84 bitrate=N/A dup=2 drop=74 speed=0.405x *** dropping frame 388 from stream 0 at ts 386:13.12 bitrate=N/A dup=2 drop=75 speed=0.407x *** dropping frame 393 from stream 0 at ts 391 *** dropping frame 398 from stream 0 at ts 396:13.44 bitrate=N/A dup=2 drop=77 speed=0.411x *** dropping frame 403 from stream 0 at ts 401:13.80 bitrate=N/A dup=2 drop=78 speed=0.39x *** dropping frame 408 from stream 0 at ts 406:13.96 bitrate=N/A dup=2 drop=79 speed=0.388x *** dropping frame 413 from stream 0 at ts 411:14.20 bitrate=N/A dup=2 drop=80 speed=0.388x *** dropping frame 418 from stream 0 at ts 416:14.40 bitrate=N/A dup=2 drop=81 speed=0.388x *** dropping frame 423 from stream 0 at ts 421:14.60 bitrate=N/A dup=2 drop=82 speed=0.387x *** dropping frame 428 from stream 0 at ts 426:14.80 bitrate=N/A dup=2 drop=83 speed=0.386x *** dropping frame 433 from stream 0 at ts 431:15.00 bitrate=N/A dup=2 drop=84 speed=0.386x *** dropping frame 438 from stream 0 at ts 436:15.20 bitrate=N/A dup=2 drop=85 speed=0.385x *** dropping frame 443 from stream 0 at ts 441:15.40 bitrate=N/A dup=2 drop=86 speed=0.384x *** dropping frame 448 from stream 0 at ts 446:15.60 bitrate=N/A dup=2 drop=87 speed=0.383x *** dropping frame 453 from stream 0 at ts 451:15.80 bitrate=N/A dup=2 drop=88 speed=0.384x [hls @ 097be260] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny4.m4s' for writing [hls @ 097be260] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny.m3u8.tmp' for writing EXT-X-MEDIA-SEQUENCE:1 *** dropping frame 458 from stream 0 at ts 456:16.00 bitrate=N/A dup=2 drop=89 speed=0.383x *** dropping frame 463 from stream 0 at ts 461 *** dropping frame 468 from stream 0 at ts 466:16.28 bitrate=N/A dup=2 drop=91 speed=0.384x *** dropping frame 473 from stream 0 at ts 471:16.48 bitrate=N/A dup=2 drop=92 speed=0.385x *** dropping frame 478 from stream 0 at ts 476:16.80 bitrate=N/A dup=2 drop=93 speed=0.387x *** dropping frame 483 from stream 0 at ts 481:17.00 bitrate=N/A dup=2 drop=94 speed=0.386x *** dropping frame 488 from stream 0 at ts 486 *** dropping frame 493 from stream 0 at ts 491:17.32 bitrate=N/A dup=2 drop=96 speed=0.389x *** dropping frame 498 from stream 0 at ts 496 *** dropping frame 503 from stream 0 at ts 501:17.64 bitrate=N/A dup=2 drop=98 speed=0.387x *** dropping frame 508 from stream 0 at ts 506 *** dropping frame 513 from stream 0 at ts 511:18.20 bitrate=N/A dup=2 drop=100 speed=0.395x *** dropping frame 518 from stream 0 at ts 516 *** dropping frame 523 from stream 0 at ts 521 *** dropping frame 528 from stream 0 at ts 526:18.76 bitrate=N/A dup=2 drop=103 speed=0.401x *** dropping frame 533 from stream 0 at ts 531 *** dropping frame 538 from stream 0 at ts 536 *** dropping frame 543 from stream 0 at ts 541:19.40 bitrate=N/A dup=2 drop=106 speed=0.41x *** dropping frame 548 from stream 0 at ts 546 *** dropping frame 553 from stream 0 at ts 551 [hls @ 097be260] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny5.m4s' for writing [hls @ 097be260] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny.m3u8.tmp' for writing EXT-X-MEDIA-SEQUENCE:1 *** dropping frame 558 from stream 0 at ts 556:19.96 bitrate=N/A dup=2 drop=109 speed=0.418x *** dropping frame 563 from stream 0 at ts 561:20.16 bitrate=N/A dup=2 drop=110 speed=0.417x *** dropping frame 568 from stream 0 at ts 566 *** dropping frame 573 from stream 0 at ts 571 *** dropping frame 578 from stream 0 at ts 576 *** dropping frame 583 from stream 0 at ts 581 *** dropping frame 588 from stream 0 at ts 586 *** dropping frame 593 from stream 0 at ts 591:21.40 bitrate=N/A dup=2 drop=116 speed=0.438x *** dropping frame 598 from stream 0 at ts 596 *** dropping frame 603 from stream 0 at ts 601 *** dropping frame 608 from stream 0 at ts 606 *** dropping frame 613 from stream 0 at ts 611:22.16 bitrate=N/A dup=2 drop=120 speed=0.449x *** dropping frame 618 from stream 0 at ts 616 *** dropping frame 623 from stream 0 at ts 621:22.52 bitrate=N/A dup=2 drop=122 speed=0.451x *** dropping frame 628 from stream 0 at ts 626 *** dropping frame 633 from stream 0 at ts 631 *** dropping frame 638 from stream 0 at ts 636:23.04 bitrate=N/A dup=2 drop=125 speed=0.456x *** dropping frame 643 from stream 0 at ts 641 *** dropping frame 648 from stream 0 at ts 646 *** dropping frame 653 from stream 0 at ts 651 [hls @ 097be260] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny6.m4s' for writing [hls @ 097be260] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny.m3u8.tmp' for writing EXT-X-MEDIA-SEQUENCE:1 *** dropping frame 658 from stream 0 at ts 656 *** dropping frame 663 from stream 0 at ts 661 *** dropping frame 668 from stream 0 at ts 666 *** dropping frame 673 from stream 0 at ts 671:24.48 bitrate=N/A dup=2 drop=132 speed=0.479x *** dropping frame 678 from stream 0 at ts 676 *** dropping frame 683 from stream 0 at ts 681:24.96 bitrate=N/A dup=2 drop=134 speed=0.473x *** dropping frame 688 from stream 0 at ts 686:25.20 bitrate=N/A dup=2 drop=135 speed=0.472x *** dropping frame 693 from stream 0 at ts 691 *** dropping frame 698 from stream 0 at ts 696:25.52 bitrate=N/A dup=2 drop=137 speed=0.472x *** dropping frame 703 from stream 0 at ts 701 *** dropping frame 708 from stream 0 at ts 706:25.92 bitrate=N/A dup=2 drop=139 speed=0.47x *** dropping frame 713 from stream 0 at ts 711 *** dropping frame 718 from stream 0 at ts 716:26.40 bitrate=N/A dup=2 drop=141 speed=0.471x *** dropping frame 723 from stream 0 at ts 721 *** dropping frame 728 from stream 0 at ts 726:26.80 bitrate=N/A dup=2 drop=143 speed=0.47x *** dropping frame 733 from stream 0 at ts 731 *** dropping frame 738 from stream 0 at ts 736:27.16 bitrate=N/A dup=2 drop=145 speed=0.471x *** dropping frame 743 from stream 0 at ts 741 *** dropping frame 748 from stream 0 at ts 746:27.44 bitrate=N/A dup=2 drop=147 speed=0.469x No more output streams to write to, finishing.:27.68 bitrate=N/A dup=2 drop=148 speed=0.466x [hls @ 097be260] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny7.m4s' for writing [hls @ 097be260] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny.m3u8.tmp' for writing EXT-X-MEDIA-SEQUENCE:1 [hls @ 097be260] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny8.m4s' for writing [hls @ 097be260] Opening 'C:\inetpub\wwwroot\fmp4_x264\big_bunny.m3u8.tmp' for writing EXT-X-MEDIA-SEQUENCE:1 frame= 750 fps= 12 q=-1.0 Lsize=N/A time=00:00:29.92 bitrate=N/A dup=2 drop=148 speed=0.493x video:12176kB audio:0kB 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): 907 packets read (11565677 bytes); 898 frames decoded; Input stream #0:1 (audio): 21 packets read (10080 bytes); Input stream #0:2 (audio): 1 packets read (1280 bytes); Total: 929 packets (11577037 bytes) demuxed Output file #0 (C:\inetpub\wwwroot\fmp4_x264\big_bunny.m3u8): Output stream #0:0 (video): 750 frames encoded; 750 packets muxed (12468332 bytes); Total: 750 packets (12468332 bytes) muxed [libx264 @ 09bb88a0] frame I:8 Avg QP:14.94 size:240466 [libx264 @ 09bb88a0] frame P:222 Avg QP:19.94 size: 37873 [libx264 @ 09bb88a0] frame B:520 Avg QP:24.34 size: 4108 [libx264 @ 09bb88a0] consecutive B-frames: 3.6% 8.5% 10.0% 77.9% [libx264 @ 09bb88a0] mb I I16..4: 33.7% 45.8% 20.6% [libx264 @ 09bb88a0] mb P I16..4: 3.1% 7.9% 0.9% P16..4: 23.0% 8.3% 6.6% 0.0% 0.0% skip:50.2% [libx264 @ 09bb88a0] mb B I16..4: 0.5% 0.3% 0.0% B16..8: 23.9% 1.4% 0.4% direct: 1.4% skip:72.1% L0:45.4% L1:49.5% BI: 5.1% [libx264 @ 09bb88a0] 8x8 transform intra:59.0% inter:63.1% [libx264 @ 09bb88a0] coded y,uvDC,uvAC intra: 30.1% 42.9% 23.3% inter: 5.7% 7.4% 1.7% [libx264 @ 09bb88a0] i16 v,h,dc,p: 66% 19% 6% 9% [libx264 @ 09bb88a0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 15% 37% 3% 4% 4% 4% 4% 4% [libx264 @ 09bb88a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 15% 12% 7% 9% 8% 9% 8% 8% [libx264 @ 09bb88a0] i8c dc,h,v,p: 63% 19% 13% 5% [libx264 @ 09bb88a0] Weighted P-Frames: Y:8.6% UV:8.1% [libx264 @ 09bb88a0] ref P L0: 66.3% 12.5% 13.9% 7.2% 0.0% [libx264 @ 09bb88a0] ref B L0: 87.0% 10.7% 2.3% [libx264 @ 09bb88a0] ref B L1: 95.1% 4.9% [libx264 @ 09bb88a0] kb/s:3324.70
And here is the .m3u8 content :
C:\Users\Beloko\Desktop\FFMPEG>type "C:\inetpub\wwwroot\fmp4_x264\big_bunny.m3u8" #EXTM3U #EXT-X-VERSION:7 #EXT-X-TARGETDURATION:4 #EXT-X-MEDIA-SEQUENCE:1 #EXT-X-MAP:URI="C:\inetpub\wwwroot\fmp4_x264\init.mp4" #EXTINF:4.000000, big_bunny1.m4s #EXTINF:4.000000, big_bunny2.m4s #EXTINF:4.000000, big_bunny3.m4s #EXTINF:4.000000, big_bunny4.m4s #EXTINF:4.000000, big_bunny5.m4s #EXTINF:4.000000, big_bunny6.m4s #EXTINF:4.000000, big_bunny7.m4s #EXTINF:2.000000, big_bunny8.m4s #EXT-X-ENDLIST
The total duration is 30 seconds (4 * 7) + (2 * 1) = 30.
The first .m4s duration is exactly 4 seconds.
And validated as proper with the Apple mediastreamvalidator tool.
Belokos-Mac:~ beloko$ mediastreamvalidator http://192.168.1.3/fmp4_x264/big_bunny.m3u8 mediastreamvalidator: Version 1.2(170822) [/fmp4_x264/big_bunny.m3u8] Started root playlist download [/fmp4_x264/big_bunny.m3u8] Started media playlist download [/fmp4_x264/big_bunny.m3u8] All media files delivered and have end tag, stopping -------------------------------------------------------------------------------- http://192.168.1.3/fmp4_x264/big_bunny.m3u8 -------------------------------------------------------------------------------- Processed 8 out of 8 segments Average segment duration: 3.750000 Total segment bitrates (all discontinuities): average: 3326.89 kb/s, max: 5707.06 kb/s Discontinuity: sequence: 0, parsed segment count: 8 of 8, duration: 30.000 sec, average: 3326.89 kb/s, max: 5707.06 kb/s Track ID: 1 Video Codec: avc1 Video profile: High Video level: 4.0 Video resolution: 1920x1080 Video average IDR interval: 4.000000, Standard deviation: 0.000000 Video frame rate: 25.000
Also I replaced the -an parameter with -c:a aac to test a stream with video and audio muxed. HLS segmenter cuts properly at 4 seconds as expected.
Tried with the -hls_segment_type mpegts parameter. And tested with many diffrent input files. I can't find any kind of regress.
You did a very good job.
Hope this update will be available soon for everyone.
comment:15 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
fix by commit id: 8318f60845bbbc4d33a39eee45e4daff0e5dacfb
comment:16 by , 7 years ago
In ffmpeg 3.4.2 that was released not so long ago this bug is still present :( In the current repository then another bug are present like https://trac.ffmpeg.org/ticket/7023 or https://trac.ffmpeg.org/ticket/7021 or https://trac.ffmpeg.org/ticket/7024 ... with repository revision you use ?
comment:17 by , 7 years ago
I can see that Steven's fix was not yet include in the FFmpeg 3.4.2 source code release. Probably because the 3.4 referring version was released on October 15th 2017. This means before Steven commits its fix to the master repository on December 11th 2017.
I think it will be available in the 3.5 or 3.6 final release.
For now you should try to use the Master version : https://git.ffmpeg.org/ffmpeg.git
Tested with different segment duration values : 2 secs, 3 secs, etc.
And the first segment duration is always the double of its expected duration value.
As example, this FFMPEG command line sets a segment duration of 3 seconds :
The .m3u8 playlist content is :
(3 x 9) = 27 seconds
miss 3 seconds to get 30 seconds as expected
And the FFProbe inspected duration for each segment :
. big_bunny1.m4s = 00:00:06.00
. big_bunny2.m4s = 00:00:03.00
. big_bunny3.m4s = 00:00:03.00
. big_bunny4.m4s = 00:00:03.00
. big_bunny5.m4s = 00:00:03.00
. big_bunny6.m4s = 00:00:03.00
. big_bunny7.m4s = 00:00:03.00
. big_bunny8.m4s = 00:00:03.00
. big_bunny9.m4s = 00:00:03.00
(6 x 1) + (3 x 8) = 30 seconds
the 3 missing seconds are located in the first .m4s segmented file.