-1

I am making android app to add timestamp to video using FFMPEG library and also it works fine but it add timestamp using by default date time format provided by FFMPEG.

Video Screenshot

it's uses YYYY-MM-DD HH:MM:SS format for timestamp

where android provide different date & time format Click here for examples

ex: I want to use "EEE, MMM d, ''yy" date format for timestamp.

How to do that?

I an using this FFMPEG Command:

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

Milan Tejani
  • 372
  • 5
  • 21

1 Answers1

1

ffmpeg calls strftime from the system's linked C library to generate the formatted string, so what's possible will depend on what your available strftime function can do.

That said, this is the closest I can get, using MinGW strftime

text='%{pts\:gmtime\:1456007118\:%a, %b %d, %y}'

which produces

Sat, Feb 20, 16
Gyan
  • 85,394
  • 9
  • 169
  • 201