(with expression) - (4) emulating progress barΒΆ

Watch on youtube.com
doc

https://ffmpeg.org/ffmpeg-filters.html#overlay-1, (ffmpeg-utils)3. Expression Evaluation

#! /bin/sh
dur=45
ffmpeg -y -filter_complex "
color=green:size=1280x32,loop=loop=-1:size=2,setsar=1[pbbg];
color=white:size=1280x32,loop=loop=-1:size=2,setsar=1[pbfg];
[pbbg][pbfg]overlay='x=t/${dur}*w'[pb];

color=black:size=1920x1080,loop=loop=-1:size=2,setsar=1[bg];
[bg][pb]
overlay='x=(W-w)/2:y=700'
,drawtext='fontsize=50:fontcolor=white:text=%{pts\:hms} / 00\:00\:${dur}.000':x=600:y=750
[v]
" -map '[v]' -an -shortest -t ${dur}.1 01-out.mp4