Drawtext specific date and time with replay

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Drawtext specific date and time with replay

Stanislas Defawes

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@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@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
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Drawtext specific date and time with replay

kumowoon1025
Hi,

> 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


Apparently the second argument is an offset added to the timestamp. Have you tried using the timecode arguments instead of using pts?

Regards,
Ted Park

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Drawtext specific date and time with replay

Stanislas Defawes

Le 8 mai 2020 à 04:25, Edward Park <[hidden email]<mailto:[hidden email]>> a écrit :

Hi,

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


Apparently the second argument is an offset added to the timestamp. Have you tried using the timecode arguments instead of using pts?

Regards,
Ted Park

_______________________________________________
ffmpeg-user mailing list
[hidden email]<mailto:[hidden email]>
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".

Hi,

Thank’s for reply. Yes I try it and it works fine but with this argument (Timecode), it’s going back to 00:00:00:00 when you seek and this is exactly that I don’t want. My idea is to use the name of the file (it’s contains date and time) to calculate the timestamp and use it to print date and time on screen with pts, and in this case you can seek, but may be it’s not possible, my knowledge with all that concern PTS are very limited.

The fact that the date was good with my first command line encouraged me to think it was possible to do that.

Stan

encouraged me

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Drawtext specific date and time with replay

kumowoon1025
Hi,
> Thank’s for reply. Yes I try it and it works fine but with this argument (Timecode), it’s going back to 00:00:00:00 when you seek and this is exactly that I don’t want.

Oh, I did not know this happened, it sounds like a small bug? Then I suppose you could add setpts=PTS-STARTPTS before the drawtext filter and use the original command you had, it will set the starting pts to be 0.

Regards,
Ted Park

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Drawtext specific date and time with replay

Stanislas Defawes


Le 8 mai 2020 à 13:59, Edward Park <[hidden email]<mailto:[hidden email]>> a écrit :

Hi,
Thank’s for reply. Yes I try it and it works fine but with this argument (Timecode), it’s going back to 00:00:00:00 when you seek and this is exactly that I don’t want.

Oh, I did not know this happened, it sounds like a small bug? Then I suppose you could add setpts=PTS-STARTPTS before the drawtext filter and use the original command you had, it will set the starting pts to be 0.

Regards,
Ted Park

_______________________________________________
ffmpeg-user mailing list
[hidden email]<mailto:[hidden email]>
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".

I'll try it yesterday but with a wrong syntax, then I try again now and it works (good date and time) but the seeking problem is the same that with the timecode syntax, it’s come back to 06:00:00 when you seek forward,  ooooh it was to good to be true !

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Drawtext specific date and time with replay

Stanislas Defawes


> Le 8 mai 2020 à 14:58, Stanislas Defawes <[hidden email]> a écrit :
>
>
>
> Le 8 mai 2020 à 13:59, Edward Park <[hidden email]<mailto:[hidden email]>> a écrit :
>
> Hi,
> Thank’s for reply. Yes I try it and it works fine but with this argument (Timecode), it’s going back to 00:00:00:00 when you seek and this is exactly that I don’t want.
>
> Oh, I did not know this happened, it sounds like a small bug? Then I suppose you could add setpts=PTS-STARTPTS before the drawtext filter and use the original command you had, it will set the starting pts to be 0.
>
> Regards,
> Ted Park
>
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]<mailto:[hidden email]>
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
>
> I'll try it yesterday but with a wrong syntax, then I try again now and it works (good date and time) but the seeking problem is the same that with the timecode syntax, it’s come back to 06:00:00 when you seek forward,  ooooh it was to good to be true !
>
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe ».

I try to pipe from ffmpeg  (with fix PTS) to ffplay and then it’s works but audio and video are out of sync in this case and it’s re encoded off course…. Is it possible to pipe from ffplay to ffplay ? I don’t find how to do that

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Drawtext specific date and time with replay

Stanislas Defawes


> Le 8 mai 2020 à 15:51, Stanislas Defawes <[hidden email]> a écrit :
>
>
>
>> Le 8 mai 2020 à 14:58, Stanislas Defawes <[hidden email]> a écrit :
>>
>>
>>
>> Le 8 mai 2020 à 13:59, Edward Park <[hidden email]<mailto:[hidden email]>> a écrit :
>>
>> Hi,
>> Thank’s for reply. Yes I try it and it works fine but with this argument (Timecode), it’s going back to 00:00:00:00 when you seek and this is exactly that I don’t want.
>>
>> Oh, I did not know this happened, it sounds like a small bug? Then I suppose you could add setpts=PTS-STARTPTS before the drawtext filter and use the original command you had, it will set the starting pts to be 0.
>>
>> Regards,
>> Ted Park
>>
>> _______________________________________________
>> ffmpeg-user mailing list
>> [hidden email]<mailto:[hidden email]>
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>
>> To unsubscribe, visit link above, or email
>> [hidden email] with subject "unsubscribe".
>>
>> I'll try it yesterday but with a wrong syntax, then I try again now and it works (good date and time) but the seeking problem is the same that with the timecode syntax, it’s come back to 06:00:00 when you seek forward,  ooooh it was to good to be true !
>>
>> _______________________________________________
>> ffmpeg-user mailing list
>> [hidden email]
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>
>> To unsubscribe, visit link above, or email
>> [hidden email] with subject "unsubscribe ».
>
> I try to pipe from ffmpeg  (with fix PTS) to ffplay and then it’s works but audio and video are out of sync in this case and it’s re encoded off course…. Is it possible to pipe from ffplay to ffplay ? I don’t find how to do that
>
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".


Well, the answer is No, ffplay is only a player so I found a solution for my problem, if someone else in interested :

First : extraction of the start time of the first image with ffprobe :

ffprobe -v error -show_format -show_streams path/to/theFile.ts | grep start_time | head -n 1

start_time=61880.537989

Keep the result as integer then calculate the timestamp of the time and date you looking for (in my case 2020:05:01 06:00:00)

date -j -f "%Y:%m:%d %H:%M:%S" '2020:05:01 06:00:00' +%s

Result is 1588305600

Then 1588305600 - 61880 = 1588243720

Then ffplay command :

ffplay path/to/theFile.ts -vf "drawtext=text='%{pts\:localtime\: 1588243720\}':fontfile=/Library/Fonts/Arial.ttf:fontsize=48:fontcolor=white:box=1:boxborderw=6:boxcolor=black@0.75:x=(w-text_w)/2:y=h-text_h-20 »

It work’s for me and it’s seekable.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".