[FFmpeg-trac] #8524(ffmpeg:new): ffmpeg generated m3u8 segments durations do not match ffprobe

FFmpeg trac at avcodec.org
Fri Feb 14 19:55:55 EET 2020


#8524: ffmpeg generated m3u8 segments durations do not match ffprobe
-------------------------------------+-------------------------------------
             Reporter:  mjustini99   |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  ffmpeg       |                  Version:  4.2
             Keywords:  ffmpeg HLS   |               Blocked By:
  m3u8                               |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:
 I am attempting to create generate a new HLS stream based on an existing
 one, the new m3u8 playlist and segments are created fine, but the
 durations of each segment do not agree with what ffprobe says they are.
 For example, the second segment is listed in the newly generated m3u8 as a
 duration of 2.2s, while ffprobe says it is 2.238667

 How to reproduce:
 {{{
 ffmpeg -i vid.m3u8 -y -t 5.000 -max_muxing_queue_size 1024 -ss 0.76 -f hls
 -hls_time 2 -c:v copy -c:a copy -map 0 segment.m3u8
 ffmpeg version N-96723-g8e27867229-tessus  https://evermeet.cx/ffmpeg/
 Copyright (c) 2000-2020 the FFmpeg developers
   built with Apple clang version 11.0.0 (clang-1100.0.33.17)
   configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-
 version=tessus --enable-avisynth --enable-fontconfig --enable-gpl
 --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d
 --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-
 libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-
 libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-
 libopus --enable-librubberband --enable-libshine --enable-libsnappy
 --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame
 --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-
 libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-
 libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-
 libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-
 flags=--static --disable-ffplay
   libavutil      56. 40.100 / 56. 40.100
   libavcodec     58. 68.102 / 58. 68.102
   libavformat    58. 38.100 / 58. 38.100
   libavdevice    58.  9.103 / 58.  9.103
   libavfilter     7. 75.100 /  7. 75.100
   libswscale      5.  6.100 /  5.  6.100
   libswresample   3.  6.100 /  3.  6.100
   libpostproc    55.  6.100 / 55.  6.100
 [hls @ 0x7fa838000400] Skip ('#EXT-X-VERSION:6')
 [hls @ 0x7fa838000400] Skip ('#EXT-X-START:TIME-OFFSET=10.560')
 [hls @ 0x7fa838000400] Skip ('#EXT-X-PROGRAM-DATE-
 TIME:2020-01-30T17:26:35.440Z')
 [hls @ 0x7fa838000400] Skip ('#EXT-X-PROGRAM-DATE-
 TIME:2020-01-30T17:26:46.240Z')
 [hls @ 0x7fa838000400] Opening 'part1.ts' for reading
 Input #0, hls, from 'vid.m3u8':
   Duration: 00:00:21.60, start: 64820.533867, bitrate: 0 kb/s
   Program 0
     Metadata:
       variant_bitrate : 0
     Stream #0:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv,
 unknown/reserved/unknown), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr,
 90k tbn, 50 tbc
     Metadata:
       variant_bitrate : 0
     Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz,
 stereo, fltp
     Metadata:
       variant_bitrate : 0
 Output #0, hls, to 'segment.m3u8':
   Metadata:
     encoder         : Lavf58.38.100
     Stream #0:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv,
 unknown/reserved/unknown), 720x576 [SAR 64:45 DAR 16:9], q=2-31, 25 fps,
 25 tbr, 90k tbn, 25 tbc
     Metadata:
       variant_bitrate : 0
     Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz,
 stereo, fltp
     Metadata:
       variant_bitrate : 0
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
   Stream #0:1 -> #0:1 (copy)
 Press [q] to stop, [?] for help
 [hls @ 0x7fa83905e000] Opening 'segment0.ts' for writing
 [hls @ 0x7fa83905e000] Opening 'segment.m3u8.tmp' for writing
 [hls @ 0x7fa83905e000] Opening 'segment1.ts' for writing
 [hls @ 0x7fa83905e000] Opening 'segment.m3u8.tmp' for writing
 frame=   55 fps=0.0 q=-1.0 Lsize=N/A time=00:00:05.00 bitrate=N/A
 speed=1.34e+03x
 video:143kB audio:59kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/8524>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list