[FFmpeg-user] HLS Streaming - FFMPEG: Program date time of older segment also changing in playlist.m3u8 when re-streaming after discontinuity.

Suriya Velusamy suriyasmart555 at gmail.com
Wed Nov 11 12:55:51 EET 2020


HI,

Following is the ffmpeg command used to stream the data.

ffmpeg -re -f avfoundation

-framerate 30 -i 0

-codec:v h264_videotoolbox -x264-params keyint=120:scenecut=0

-codec:a copy -f hls

-hls_list_size 60

-hls_time 10

-hls_flags delete_segments

-hls_flags +append_list

-hls_flags +discont_start

-hls_flags +program_date_time

-strftime 1

-strftime_mkdir 1

-hls_segment_filename

'%Y%m%dT%H%M%S%z.ts' playlist.m3u8



Following is the playlist.m3u8 content which generated for a few seconds.



#EXTM3U

#EXT-X-VERSION:3

#EXT-X-TARGETDURATION:10

#EXT-X-MEDIA-SEQUENCE:0

#EXT-X-DISCONTINUITY

#EXT-X-DISCONTINUITY

#EXTINF:10.000000,

#EXT-X-PROGRAM-DATE-TIME:2020-11-09T22:07:53.000+0530

20201109T220753+0530.ts

#EXTINF:10.000000,

#EXT-X-PROGRAM-DATE-TIME:2020-11-09T22:08:03.000+0530

20201109T220803+0530.ts

#EXT-X-ENDLIST



When the re-stream happens(in case of restarting the streaming service),
the program date time of older segments(before #EXT-X-DISCONTINUITY) also
get changed like below which is unexpected.



#EXTM3U

#EXT-X-VERSION:3

#EXT-X-TARGETDURATION:10

#EXT-X-MEDIA-SEQUENCE:0

#EXT-X-DISCONTINUITY

#EXT-X-DISCONTINUITY

#EXTINF:10.000000,

#EXT-X-PROGRAM-DATE-TIME:2020-11-09T22:12:50.633+0530

20201109T220753+0530.ts

#EXTINF:10.000000,

#EXT-X-PROGRAM-DATE-TIME:2020-11-09T22:13:00.633+0530

20201109T220803+0530.ts

#EXT-X-DISCONTINUITY

#EXTINF:10.000000,

#EXT-X-PROGRAM-DATE-TIME:2020-11-09T22:13:12.000+0530

20201109T221312+0530.ts

#EXTINF:5.400000,

#EXT-X-PROGRAM-DATE-TIME:2020-11-09T22:13:22.000+0530

20201109T221322+0530.ts

#EXT-X-ENDLIST



Why does the program date time of older segments change? Should we add any
arguments explicitly in ffmpeg command to handle this?



Regards,

Suriya V.


More information about the ffmpeg-user mailing list