[FFmpeg-trac] #7798(undetermined:new): hls muxer often generates segments shorter than -hls_time

FFmpeg trac at avcodec.org
Sun Mar 17 05:02:29 EET 2019

#7798: hls muxer often generates segments shorter than -hls_time
             Reporter:  JoshuaWalsh  |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
                                     |  undetermined
              Version:  git-master   |               Resolution:
             Keywords:  hls          |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |

Comment (by JoshuaWalsh):

 Tried using Git master in my original post, but I haven't had access to my
 work PC since then so wasn't set up to build from source.

 I want segment duration >= 5s, it doesn't need to be 5s exactly. I don't
 want to force GOP and I don't want to disable scenecut.

     If the packet pts - the start of the segment pts is large than
 hls_time, and the packet flags is key, then close current file and open
 new file for the next segment

 I don't understand how this can produce segments shorter than -hls_time,
 since packet pts - start of segment pts will be less than hls_time.

 With your second example:


 First segment is
 That makes sense. Remaining data is:
 But to produce a second segment of 1.6s length:
 would require splitting while packet pts - seg start pts < hls_time, no?
 If respecting hls_time, second segment should be
 kpppppppkpppkppkppp (2.4s again)

Ticket URL: <https://trac.ffmpeg.org/ticket/7798#comment:11>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list