[FFmpeg-user] Drawtext and Metadata

Paul B Mahol onemda at gmail.com
Wed Oct 17 17:48:09 EEST 2018


On 10/17/18, Grant Griffith <grant.griffith at mono-1.com> wrote:
> I've tested many variation on the metadata flag, but per the recommendation
> earlier I've tried this. It will error out and just won't print anything.
>
> The command I'm attempting...
>
> ./ffmpeg -i "$1" \
> -vf "select=gt(scene\,0.087),\
> scale=192:-1,\
> tile=10x10,\
> drawtext="fontfile=/System/Library/Fonts/Helvetica.ttc":\
> text='%{metadata=print\:key=duration}' :\
> fontcolor=magenta:\
> shadowx=3:\
> shadowy=3:\
> shadowcolor=black at .7:\
> fontsize=60\:\
> x=(w-text_w)/2:\
> y=(h-text_h)/2:\
> box=1:\
> boxcolor=lime at .45:\
> boxborderw=200:" \
> -hide_banner \
> -v error \
> -frames:v 1 \
> -q:v 7 \
> "${output}"
>
>
> Variations - no error, just no output or the last value e.g. "Duration"---
> text='%{metadata\:print\:key=Duration}'
> text='%{metadata\:0\:Duration}'
> text='%{metadata\:creation_date}'
> text='%{metadata\:Creator}'
> text='%{metadata\:filename}'
>
> The output of those variations looks like this:
> https://imgur.com/a/jdohoLa

The "metadata" you seek is not part of frame metadata available to
drawtext filter.


More information about the ffmpeg-user mailing list