DEV Community

Discussion on: RTSP stream to Web Browser using FFMPEG

Collapse
 
magantiakhilchandra profile image
mac_4 • Edited

Hey! Hello how to timestamp the output files with linux date comand,

If possible in ns resolution, something like date "+%Y%m%d-%H%M%S%N"

Or may be the other way round, What are my options to relate video with another signal from another source.

Any info is appreciated.

Collapse
 
tejasvi2 profile image
Tejasvi Shinde • Edited

Hey, try this command to generate timestamp

ffmpeg -i test.mp4 -vf \ "drawtext=fontfile=arialbd.ttf:text='%{pts\:gmtime\:0\:%H\\\:%M\\\:%S}'" test.avi

This produces a stamp in the HH:MM:SS format; you can change it to whatever you'd like, using
strftime