waveform

Watch on youtube.com
doc

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

default

00:00:00

By default luminance only.

#! /bin/sh
ifn="Drifting with Cars.mp4"
ifnb="`basename \"${ifn}\" .mp4`"
pref="`basename $0 .sh`"

#
ffmpeg -y -i "${ifn}" -filter_complex "
[0:v]split=2[v0][v1];
[v0]waveform,scale=1280:720,setsar=1,format=yuv420p[v2];
[v1]scale=1280/6:720/6,setsar=1[v3];
[v2][v3]overlay=x=50:y=H-h-50[v]
" -map '[v]' -an "${pref}_${ifnb}.mp4"

components=0x7:display=stack

00:00:38

It’ll display all 3 available color components (in this case, Y, U, and V).

#! /bin/sh
ifn="Drifting with Cars.mp4"
ifnb="`basename \"${ifn}\" .mp4`"
pref="`basename $0 .sh`"

#
ffmpeg -y -i "${ifn}" -filter_complex "
[0:v]split=2[v0][v1];
[v0]waveform=components=0x7:display=stack,scale=1280:720,setsar=1[v2];
[v1]scale=1280/6:720/6,setsar=1[v3];
[v2][v3]overlay=x=50:y=H-h-50[v]
" -map '[v]' -an "${pref}_${ifnb}.mp4"

components=0x7:display=parade

00:01:16

It’ll display all 3 available color components (in this case, Y, U, and V).

#! /bin/sh
ifn="Drifting with Cars.mp4"
ifnb="`basename \"${ifn}\" .mp4`"
pref="`basename $0 .sh`"

#
ffmpeg -y -i "${ifn}" -filter_complex "
[0:v]split=2[v0][v1];
[v0]waveform=components=0x7:display=parade,scale=1280:720,setsar=1[v2];
[v1]scale=1280/6:720/6,setsar=1[v3];
[v2][v3]overlay=x=W-w-250:y=50[v]
" -map '[v]' -an "${pref}_${ifnb}.mp4"

components=0x7:display=overlay

00:01:54

It’ll display all 3 available color components (in this case, Y, U, and V).

#! /bin/sh
ifn="Drifting with Cars.mp4"
ifnb="`basename \"${ifn}\" .mp4`"
pref="`basename $0 .sh`"

#
ffmpeg -y -i "${ifn}" -filter_complex "
[0:v]split=2[v0][v1];
[v0]waveform=components=0x7:display=overlay,scale=1280:720,setsar=1[v2];
[v1]scale=1280/6:720/6,setsar=1[v3];
[v2][v3]overlay=x=W-w-50:y=50[v]
" -map '[v]' -an "${pref}_${ifnb}.mp4"

components=0x6:display=stack

00:02:32

It’ll display 2nd, and 3rd color components (in this case, U, and V).

#! /bin/sh
ifn="Drifting with Cars.mp4"
ifnb="`basename \"${ifn}\" .mp4`"
pref="`basename $0 .sh`"

#
ffmpeg -y -i "${ifn}" -filter_complex "
[0:v]split=2[v0][v1];
[v0]waveform=components=0x6:display=stack,scale=1280:720,setsar=1[v2];
[v1]scale=1280/6:720/6,setsar=1[v3];
[v2][v3]overlay=x=W-w-50:y=50[v]
" -map '[v]' -an "${pref}_${ifnb}.mp4"