drawtext with pts, etcΒΆ
Watch on youtube.com- see also
Especially if your purpose is debugging of the filter graph written by yourself, display such as pts may also be useful.
#! /bin/sh
ifn="Pexels_flowers.mp4"
ifnb="`basename \"${ifn}\" .mp4`"
pref="`basename $0 .sh`"
#
ffmpeg -y -i "${ifn}" -filter_complex "
[0:v]
drawtext='fontsize=40:fontcolor=white
:text=The frame number (starting from 0)\=%{frame_num}':x=300:y=500,
drawtext='fontsize=40:fontcolor=white
:text=A 1 character description of the current picture type\=%{pict_type}':x=300:y=550,
drawtext='fontsize=40:fontcolor=white
:text=The timestamp of the current frame\=%{pts\:hms}':x=300:y=600
[v]
" -map '[v]' -an "${pref}_${ifnb}.mp4"