drawgrid

Watch on youtube.com
doc

https://ffmpeg.org/ffmpeg-filters.html#drawgrid

“drawgrid” is not related to “visualization of image data” itself. It is helpful to know this, for example, when you want to visually specify the target position of some filter. Perhaps you will have more opportunities to use this with ffplay than using this with ffmpeg.

00:00:00
#! /bin/sh
ifn="Pexels_flowers_fast.mp4"
ifnb="`basename \"${ifn}\" .mp4`"
pref="`basename $0 .sh`"

#
ffmpeg -y -i "${ifn}" -filter_complex "
[0:v]
drawgrid=c=blue:w=80:h=45
[v]
" -map '[v]' -an "${pref}_${ifnb}.mp4"
00:00:15
#! /bin/sh
ifn="Pexels_flowers_fast.mp4"
ifnb="`basename \"${ifn}\" .mp4`"
pref="`basename $0 .sh`"

#
ffmpeg -y -i "${ifn}" -filter_complex "
[0:v]
drawgrid=c=blue@0.7:w=16*5:h=9*5,
drawgrid=c=blue@0.7:w=16*10:h=9*10:t=3
[v]
" -map '[v]' -an "${pref}_${ifnb}.mp4"
00:00:30
#! /bin/sh
ifn="Pexels_flowers_fast.mp4"
ifnb="`basename \"${ifn}\" .mp4`"
pref="`basename $0 .sh`"

#
ffmpeg -y -i "${ifn}" -filter_complex "
[0:v]
drawgrid=c=blue@0.5:w=16*5:h=9*5,
drawgrid=c=blue@0.5:w=16*10:h=9*10:t=3,
drawgrid=c=yellow:w=16*60:h=9*60:t=4,
drawgrid=c=red:w=16*80:h=9*80:t=5
[v]
" -map '[v]' -an "${pref}_${ifnb}.mp4"