Opened 4 years ago
#7986 new defect
Initial EXT-X-PROGRAM-DATE-TIME rounded to integer
Reported by: | Pavel Pilar | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | git-master | Keywords: | hls timestamp |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
recording in DASH format (HLS) outputs m3u8 where EXT-X-PROGRAM-DATE-TIME is always floored to seconds while millisecond digits are available in the timestamp.
How to reproduce:
ffmpeg -f v4l2 -framerate 25 -video_size 720x480 -standard pal -i /dev/video0 -vcodec libx264 -r 25 -preset medium -keyint_min 250 -g 250 -f hls -hls_flags +program_date_time -hls_segment_type fmp4 -hls_fmp4_init_filename now.mp4 -use_localtime 1 -hls_list_size 0 -hls_time 60 -hls_segment_filename %Y-%m-%d_%H-%M-%S.m4s /data/video0/now.m3u8
ffmpeg version latest
built on ubuntu 18.04
libavformat/hlsenc.h:
if (hls->flags & HLS_PROGRAM_DATE_TIME) { time_t now0; time(&now0); vs->initial_prog_date_time = now0; }
time_t is integer and therefore one cannot get millisecond resolution. This causes up to 1s error.
Note:
See TracTickets
for help on using tickets.