[FFmpeg-user] Drawtext specific date and time with replay

Stanislas Defawes sdefawes at ina.fr
Thu May 7 16:25:29 EEST 2020


Hello everyone,

I try to print a specific date and time on ts stream with ffplay. I use the name of the file to calculate the timestamp of the day and time of capture. I use this command line :

ffplay /Users/stan/Desktop/200501MEZ0600_N.MPG -vf "drawtext=text='%{pts\:gmtime\:1588305600\}':fontfile=/Library/Fonts/Arial.ttf:fontsize=48:fontcolor=white:box=1:boxborderw=6:boxcolor=black at 0.75:x=(w-text_w)/2:y=h-text_h-20 »

The Timestamp (1588305600) correspond at 2020:05:01 06:00:00. But when the file is played, the date is OK, but the time does not correspond to 06:00:00 but 21:11:21, I suppose the PTS  are discorrupts in the file but is there a way to print the exact time I want to see on screen ?

Thank’s for your help.

Stan

Her the uncut console :


/Users/stan/Desktop/ffplay /Users/stan/Desktop/200501MEZ0600_N.MPG -vf "drawtext=text='%{pts\:gmtime\:1588305600\}':fontfile=/Library/Fonts/Arial.ttf:fontsize=48:fontcolor=white:box=1:boxborderw=6:boxcolor=black at 0.75:x=(w-text_w)/2:y=h-text_h-20"
ffplay version N-96969-gaef2016bb0-tessus  https://evermeet.cx/ffmpeg/  Copyright (c) 2003-2020 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.17)
  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --enable-librtmp --enable-ffplay --enable-sdl2 --disable-ffmpeg --disable-ffprobe
  libavutil      56. 42.100 / 56. 42.100
  libavcodec     58. 75.100 / 58. 75.100
  libavformat    58. 41.100 / 58. 41.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 77.100 /  7. 77.100
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] decode_slice_header error
[h264 @ 0x7fa450022000] no frame!
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] decode_slice_header error
[h264 @ 0x7fa450022000] no frame!
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] decode_slice_header error
[h264 @ 0x7fa450022000] no frame!
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] decode_slice_header error
[h264 @ 0x7fa450022000] no frame!
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] decode_slice_header error
[h264 @ 0x7fa450022000] no frame!
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] decode_slice_header error
[h264 @ 0x7fa450022000] no frame!
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] decode_slice_header error
[h264 @ 0x7fa450022000] no frame!
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] decode_slice_header error
[h264 @ 0x7fa450022000] no frame!
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] decode_slice_header error
[h264 @ 0x7fa450022000] no frame!
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] decode_slice_header error
[h264 @ 0x7fa450022000] no frame!
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] decode_slice_header error
[h264 @ 0x7fa450022000] no frame!
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] decode_slice_header error
[h264 @ 0x7fa450022000] no frame!
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] decode_slice_header error
[h264 @ 0x7fa450022000] no frame!
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] decode_slice_header error
[h264 @ 0x7fa450022000] no frame!
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] decode_slice_header error
[h264 @ 0x7fa450022000] no frame!
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] decode_slice_header error
[h264 @ 0x7fa450022000] no frame!
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] decode_slice_header error
[h264 @ 0x7fa450022000] no frame!
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] decode_slice_header error
[h264 @ 0x7fa450022000] no frame!
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] decode_slice_header error
[h264 @ 0x7fa450022000] no frame!
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] decode_slice_header error
[h264 @ 0x7fa450022000] no frame!
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] decode_slice_header error
[h264 @ 0x7fa450022000] no frame!
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] decode_slice_header error
[h264 @ 0x7fa450022000] no frame!
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] SPS unavailable in decode_picture_timing
[h264 @ 0x7fa450022000] non-existing PPS 0 referenced
[h264 @ 0x7fa450022000] decode_slice_header error
[h264 @ 0x7fa450022000] no frame!
[h264 @ 0x7fa450022000] mmco: unref short failure
[h264 @ 0x7fa450022000] mmco: unref short failure sq=    0B f=0/0
[mpegts @ 0x7fa45000d800] start time for stream 2 is not set in estimate_timings_from_pts
[mpegts @ 0x7fa45000d800] PES packet size mismatch
[mpegts @ 0x7fa45000d800] Packet corrupt (stream = 1, dts = 5937022544).
Input #0, mpegts, from '/Users/stan/Desktop/200501MEZ0600_N.MPG':
  Duration: 01:08:08.64, start: 61879.506378, bitrate: 2039 kb/s
  Program 8010
    Metadata:
      service_name    : MEZZO
      service_provider: CSAT
    Stream #0:0[0x3f2]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1440x1080 [SAR 4:3 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x3fd](fra): Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 192 kb/s
  No Program
    Stream #0:2[0x12]: Data: epg
[h264 @ 0x7fa45085ae00] co located POCs unavailableq=    0B f=0/0
[h264 @ 0x7fa45085ba00] reference picture missing during reorder
[h264 @ 0x7fa45085ba00] Missing reference picture, default is 65768
[h264 @ 0x7fa45085ae00] reference picture missing during reorder0
[h264 @ 0x7fa45085ae00] Missing reference picture, default is 65784
[h264 @ 0x7fa45085b400] mmco: unref short failure
[h264 @ 0x7fa45085ae00] co located POCs unavailablesq=    0B f=0/0
[h264 @ 0x7fa45085ba00] reference picture missing during reorder/0
[h264 @ 0x7fa45085ba00] Missing reference picture, default is 65768
[h264 @ 0x7fa45085ae00] reference picture missing during reorder
[h264 @ 0x7fa45085ae00] Missing reference picture, default is 65784
[h264 @ 0x7fa45085b400] mmco: unref short failure
[h264 @ 0x7fa45085ae00] co located POCs unavailablesq=    0B f=0/0
[h264 @ 0x7fa45085ba00] reference picture missing during reorder0
[h264 @ 0x7fa45085ba00] Missing reference picture, default is 65768
[h264 @ 0x7fa45085ae00] reference picture missing during reorder
[h264 @ 0x7fa45085ae00] Missing reference picture, default is 65784
[h264 @ 0x7fa45085b400] mmco: unref short failure
[h264 @ 0x7fa45085ae00] co located POCs unavailablesq=    0B f=0/0
[h264 @ 0x7fa45085ba00] reference picture missing during reorder/0
[h264 @ 0x7fa45085ba00] Missing reference picture, default is 65768
[h264 @ 0x7fa45085ae00] reference picture missing during reorder
[h264 @ 0x7fa45085ae00] Missing reference picture, default is 65784
[h264 @ 0x7fa45085b400] mmco: unref short failure
[h264 @ 0x7fa45085ae00] co located POCs unavailablesq=    0B f=0/0
[h264 @ 0x7fa45085ba00] reference picture missing during reorder0
[h264 @ 0x7fa45085ba00] Missing reference picture, default is 65768
[h264 @ 0x7fa45085ae00] reference picture missing during reorder
[h264 @ 0x7fa45085ae00] Missing reference picture, default is 65784
[h264 @ 0x7fa45085b400] mmco: unref short failure
[h264 @ 0x7fa45085ae00] co located POCs unavailablesq=    0B f=0/0
[h264 @ 0x7fa45085ba00] reference picture missing during reorder
[h264 @ 0x7fa45085ba00] Missing reference picture, default is 65768
[h264 @ 0x7fa45085ae00] reference picture missing during reorder/0
[h264 @ 0x7fa45085ae00] Missing reference picture, default is 65784
[h264 @ 0x7fa45085b400] mmco: unref short failure
[h264 @ 0x7fa45085ae00] co located POCs unavailablesq=    0B f=0/0
[h264 @ 0x7fa45085ba00] reference picture missing during reorder0
[h264 @ 0x7fa45085ba00] Missing reference picture, default is 65768
[h264 @ 0x7fa45085ae00] reference picture missing during reorder/0
[h264 @ 0x7fa45085ae00] Missing reference picture, default is 65784
[h264 @ 0x7fa45085b400] mmco: unref short failure
[h264 @ 0x7fa45085ae00] co located POCs unavailablesq=    0B f=0/0
[h264 @ 0x7fa45085ba00] reference picture missing during reorder/0
[h264 @ 0x7fa45085ba00] Missing reference picture, default is 65768
[h264 @ 0x7fa45085ae00] reference picture missing during reorder/0
[h264 @ 0x7fa45085ae00] Missing reference picture, default is 65784
[h264 @ 0x7fa45085b400] mmco: unref short failure
[h264 @ 0x7fa45085ae00] co located POCs unavailablesq=    0B f=0/0
[h264 @ 0x7fa45085ba00] reference picture missing during reorder0
[h264 @ 0x7fa45085ba00] Missing reference picture, default is 65768
[h264 @ 0x7fa45085ae00] reference picture missing during reorder/0
[h264 @ 0x7fa45085ae00] Missing reference picture, default is 65784
[h264 @ 0x7fa45085b400] mmco: unref short failure
[h264 @ 0x7fa45085ae00] co located POCs unavailablesq=    0B f=0/0
[h264 @ 0x7fa45085ba00] reference picture missing during reorder/0
[h264 @ 0x7fa45085ba00] Missing reference picture, default is 65768
[h264 @ 0x7fa45085ae00] reference picture missing during reorder
[h264 @ 0x7fa45085ae00] Missing reference picture, default is 65784
[h264 @ 0x7fa45085b400] mmco: unref short failure
[h264 @ 0x7fa45085ae00] co located POCs unavailablesq=    0B f=0/0
[h264 @ 0x7fa45085ba00] reference picture missing during reorder/0
[h264 @ 0x7fa45085ba00] Missing reference picture, default is 65768
[h264 @ 0x7fa45085ae00] reference picture missing during reorder/0
[h264 @ 0x7fa45085ae00] Missing reference picture, default is 65784
[h264 @ 0x7fa45085b400] mmco: unref short failure
[h264 @ 0x7fa45085ae00] co located POCs unavailablesq=    0B f=0/0
[h264 @ 0x7fa45085ba00] reference picture missing during reorder0
[h264 @ 0x7fa45085ba00] Missing reference picture, default is 65768
[h264 @ 0x7fa45085ae00] reference picture missing during reorder
[h264 @ 0x7fa45085ae00] Missing reference picture, default is 65784
[h264 @ 0x7fa45085b400] mmco: unref short failure
61879.54 A-V:    nan fd=   0 aq=   51KB vq=  242KB sq=    0B f=0/0


More information about the ffmpeg-user mailing list