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

FFmpeg trac at avcodec.org
Sun Feb 16 05:12:10 EET 2020


#8524: ffmpeg generated m3u8 segments durations do not match ffprobe
------------------------------------+------------------------------------
             Reporter:  mjustini99  |                    Owner:
                 Type:  defect      |                   Status:  new
             Priority:  normal      |                Component:  avformat
              Version:  git-master  |               Resolution:
             Keywords:  hls         |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+------------------------------------

Comment (by stevenliu):

 {{{
 ./ffmpeg -ss 0.76 -i part1.ts -y -t 5.000 -f hls -hls_time 2 -c:v copy
 -c:a copy -map 0 segment.m3u8

 }}}
 0.76 is not keyframe, so it cannot read video packets correct first
 segment.

 {{{
 liuqideMacBook-Pro:dash liuqi$ ffprobe segment0.ts
 ffprobe version N-95812-gd73f062706 Copyright (c) 2007-2019 the FFmpeg
 developers
   built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
   configuration: --enable-fontconfig --enable-gpl --enable-libass
 --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-
 libspeex --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-
 version3 --enable-nonfree --enable-videotoolbox --enable-libxml2 --samples
 =fate-suite/ --enable-libopencv
   libavutil      56. 36.100 / 56. 36.100
   libavcodec     58. 62.100 / 58. 62.100
   libavformat    58. 35.100 / 58. 35.100
   libavdevice    58.  9.101 / 58.  9.101
   libavfilter     7. 66.100 /  7. 66.100
   libswscale      5.  6.100 /  5.  6.100
   libswresample   3.  6.100 /  3.  6.100
   libpostproc    55.  6.100 / 55.  6.100
 [mpegts @ 0x7fd9bc003000] start time for stream 0 is not set in
 estimate_timings_from_pts
 [mpegts @ 0x7fd9bc003000] stream 0 : no TS found at start of file,
 duration not set
 [mpegts @ 0x7fd9bc003000] Could not find codec parameters for stream 0
 (Video: h264 ([27][0][0][0] / 0x001B), none): unspecified size
 Consider increasing the value for the 'analyzeduration' and 'probesize'
 options
 Input #0, mpegts, from 'segment0.ts':
   Duration: 00:00:03.54, start: 1.400000, bitrate: 104 kb/s
   Program 1
     Metadata:
       service_name    : Service01
       service_provider: FFmpeg
     Stream #0:0[0x100]: Video: h264 ([27][0][0][0] / 0x001B), none, 90k
 tbr, 90k tbn, 180k tbc
     Stream #0:1[0x101](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F),
 48000 Hz, stereo, fltp, 82 kb/s
 }}}




 {{{
 ./ffmpeg -ss 0.76 -i part1.ts -y -t 5.000 -f mpegts -c:v copy -c:a copy
 -map 0 segment.ts
 ffprobe -show_packets -of xml -select_streams v segment.ts |less
 }}}

 look at the segment.ts packets duraton, the last pts - first pts is 2.xx,
 so maybe it correct when you make a wrong operation.

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


More information about the FFmpeg-trac mailing list