Opened 3 years ago
Last modified 3 years ago
#9474 new defect
Incorrect value of #EXT-X-PROGRAM-DATE-TIME added in absence of the flag
Reported by: | Yash | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | git-master | Keywords: | HLS |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
#EXT-X-PROGRAM-DATE-TIME tag gets added in parsing child playlist even if the child playlist is not created with program_date_time flag while using append_list HLS flag.
How to reproduce:
First command
% ffmpeg -loglevel debug -i BigBuckBunny.mp4 -ss 0 -t 30 -hls_list_size 0 -hls_playlist_type event -hls_flags independent_segments -hls_segment_type fmp4 -hls_time 2 -master_pl_name master.m3u8 -map 0:v:0 -map 0:a:0 -c:v copy -c:a copy -var_stream_map "v:0,a:0,name:1080p" -f hls %v.m3u8 ffmpeg version 4.4.git built on ... Ubuntu 20.04 5.11.0-38-generic
Second command
% ffmpeg -loglevel debug -i BigBuckBunny.mp4 -ss 0 -t 30 -hls_list_size 0 -hls_playlist_type event -hls_flags independent_segments+append_list -hls_segment_type fmp4 -hls_time 2 -master_pl_name master.m3u8 -map 0:v:0 -map 0:a:0 -c:v copy -c:a copy -var_stream_map "v:0,a:0,name:1080p" -f hls %v.m3u8 ffmpeg version 4.4.git built on ... Ubuntu 20.04 5.11.0-38-generic
Output child playlist after the first command
#EXTM3U #EXT-X-VERSION:7 #EXT-X-TARGETDURATION:2 #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-PLAYLIST-TYPE:EVENT #EXT-X-INDEPENDENT-SEGMENTS #EXT-X-MAP:URI="init.mp4" #EXTINF:2.500000, 1080p0.m4s #EXTINF:2.500000, 1080p1.m4s #EXTINF:2.500000, 1080p2.m4s #EXTINF:2.500000, 1080p3.m4s #EXTINF:1.916667, 1080p4.m4s #EXTINF:2.500000, 1080p5.m4s #EXTINF:1.375000, 1080p6.m4s #EXTINF:2.500000, 1080p7.m4s #EXTINF:2.500000, 1080p8.m4s #EXTINF:2.291667, 1080p9.m4s #EXTINF:2.500000, 1080p10.m4s #EXTINF:2.500000, 1080p11.m4s #EXTINF:1.916667, 1080p12.m4s #EXT-X-ENDLIST
Output child playlist after the second command
#EXTM3U #EXT-X-VERSION:7 #EXT-X-TARGETDURATION:2 #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-PLAYLIST-TYPE:EVENT #EXT-X-INDEPENDENT-SEGMENTS #EXT-X-MAP:URI="init.mp4" #EXTINF:2.500000, 1080p0.m4s #EXTINF:2.500000, #EXT-X-PROGRAM-DATE-TIME:1970-01-01T05:30:02.500+0530 1080p1.m4s #EXTINF:2.500000, #EXT-X-PROGRAM-DATE-TIME:1970-01-01T05:30:05.000+0530 1080p2.m4s #EXTINF:2.500000, #EXT-X-PROGRAM-DATE-TIME:1970-01-01T05:30:07.500+0530 1080p3.m4s #EXTINF:1.916667, #EXT-X-PROGRAM-DATE-TIME:1970-01-01T05:30:10.000+0530 1080p4.m4s #EXTINF:2.500000, #EXT-X-PROGRAM-DATE-TIME:1970-01-01T05:30:11.917+0530 1080p5.m4s #EXTINF:1.375000, #EXT-X-PROGRAM-DATE-TIME:1970-01-01T05:30:14.417+0530 1080p6.m4s #EXTINF:2.500000, #EXT-X-PROGRAM-DATE-TIME:1970-01-01T05:30:15.792+0530 1080p7.m4s #EXTINF:2.500000, #EXT-X-PROGRAM-DATE-TIME:1970-01-01T05:30:18.292+0530 1080p8.m4s #EXTINF:2.291667, #EXT-X-PROGRAM-DATE-TIME:1970-01-01T05:30:20.792+0530 1080p9.m4s #EXTINF:2.500000, #EXT-X-PROGRAM-DATE-TIME:1970-01-01T05:30:23.083+0530 1080p10.m4s #EXTINF:2.500000, #EXT-X-PROGRAM-DATE-TIME:1970-01-01T05:30:25.583+0530 1080p11.m4s #EXTINF:1.916667, #EXT-X-PROGRAM-DATE-TIME:1970-01-01T05:30:28.083+0530 1080p12.m4s #EXT-X-DISCONTINUITY #EXTINF:2.500000, 1080p13.m4s #EXTINF:2.500000, 1080p14.m4s #EXTINF:2.500000, 1080p15.m4s #EXTINF:2.500000, 1080p16.m4s #EXTINF:1.916667, 1080p17.m4s #EXTINF:2.500000, 1080p18.m4s #EXTINF:1.375000, 1080p19.m4s #EXTINF:2.500000, 1080p20.m4s #EXTINF:2.500000, 1080p21.m4s #EXTINF:2.291667, 1080p22.m4s #EXTINF:2.500000, 1080p23.m4s #EXTINF:2.500000, 1080p24.m4s #EXTINF:1.916667, 1080p25.m4s #EXT-X-ENDLIST
Video:http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4
Attachments (3)
Change History (4)
by , 3 years ago
Attachment: | first_command.log added |
---|
comment:1 by , 3 years ago
Seems to have been introduced while fixing https://trac.ffmpeg.org/ticket/8989. Following changes needed at https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/hlsenc.c#L1290
From
vs->last_segment->discont_program_date_time = discont_program_date_time; discont_program_date_time += vs->duration;
To
if (discont_program_date_time > 0) { vs->last_segment->discont_program_date_time = discont_program_date_time; discont_program_date_time += vs->duration; }
first_command_git_head_debug_log