Adding date/time information on video for ffmpeg I am using FFmpeg for live streaming with RTMP to YouTube.
My ffmpeg command is like this:

ffmpeg -ar 44100 -ac 2 -f alsa -i plughw:1,0 -f v4l2 -codec:v h264 -framerate 30 \
  -video_size 1920x1080 -itsoffset 0.5 -i /dev/video2 -copyinkf -codec:v copy -codec:a aac \
  -ab 44k -af 'highpass=200, lowpass=3000, volume=1' -g 4 -f flv \
   rtmp://a.rtmp.youtube.com/live2/8b35-vkye-476f-xxxx


I want to add date and time information on live stream video.
How can I do this?
I think adding:

-vf "drawtext=fontfile=/usr/share/fonts/dejavu/DejaVuSans-Bold.ttf: text='%{localtime\:%T}': fontcolor=white@0.8: x=7: y=700"


should work. See Adding time stamp overlay to video stream using ffmpeg