2

I am using below command to add timestamps to video:

ffmpeg -y -i input.mp4 -vf "drawtext=fontfile=roboto.ttf:fontsize=36:fontcolor=yellow:text='%{pts\:gmtime\:1456007118}'" -preset ultrafast output.mp4

command is working but i don't get desired output. it is adding timestamp like this:

sample video screenshot

I want to use different date format like this:

  1. Simple Date Format
  2. Date and Time Patterns

I get this date :

2016-02-20 22:25:20

but i want this :

Sat, 20 Feb 2016 22:25:20 -0700

1 Answer 1

2

i found my answer in this link:

strftime - format date and time

strftime(3) - Linux man page

ex: i use this command for demo and i made several other command for different date format

ffmpeg -y -i input.mp4 -vf "drawtext=fontfile=roboto.ttf:fontsize=36:fontcolor=yellow:text='%{pts\:gmtime\:1575526882\:%A, %d, %B %Y %I\\\:%M\\\:%S %p}'" -preset ultrafast -f mp4 output.mp4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.