[FFmpeg-trac] #9321(undetermined:new): Wrong HLS segment duration on playlist rotation

FFmpeg trac at avcodec.org
Wed Jul 7 16:00:23 EEST 2021

#9321: Wrong HLS segment duration on playlist rotation
             Reporter:  ohmerci      |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:  hls segment  |               Blocked By:
  duration                           |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
 Summary of the bug:

 Trying to output a HLS live stream with fixed segment duration (10s in
 this case).

 '''video segmentation issue''': when hls_list_size is reached, instead of
 a 10s video segment a 2s and 8s video segment are generated (durations of
 the parts is dependent on GOP length and hls_time value), and added to the
 video manifest.
 After which output continues with 10s segments as expected.

 Intitial full-lenght manifest:

 Next, the manifest file rotates for a first time and a 8s segment is added

 Next, 10s are generated and added to the manifest file again


 '''audio segmentation issue''': when hls_list_size is reached a 0s audio
 segment is generated and added to the audio manifest file.



 Forcing 10s GOP -g:v 250 (and remove keyint=50:min-keyint=50:no-scenecut)
 , fixes the splitted video segment, but doesn't fix the 0s audio segment.


 How to reproduce:
 ffmpeg -re -fflags +genpts -i /data/str02/pseudo_src/devmul/ott-en-us.mp4
 -map 0 -c:v libx264 -x264opts "keyint=50:min-keyint=50:no-scenecut" -b:v
 2M -g:v 50 -r:v 25 -c:a aac -b:a 128k -f hls -hls_delete_threshold 20
 -hls_segment_filename "hlsdir/%v_%d.ts" -hls_time 10 -hls_init_time 10
 -hls_list_size 5 -master_pl_name master.m3u8 -var_stream_map
 v:0,name:video,agroup:audio" -hls_flags
 independent_segments+program_date_time+round_durations "hlsdir/%v.m3u8"


 ffmpeg version:
 ffmpeg version N-102852-g758e2da289 Copyright (c) 2000-2021 the FFmpeg
   built with gcc 8 (Debian 8.3.0-6)
   configuration: --prefix=/data/local/home/ramdata/ffmpeg-master --enable-
 gpl --enable-version3 --enable-nonfree --enable-openssl --enable-postproc
 --enable-avfilter --enable-pthreads --enable-filter=movie --enable-
 libfontconfig --enable-libfreetype --enable-libfribidi --enable-libx264
Ticket URL: <https://trac.ffmpeg.org/ticket/9321>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list