Passing `filter-complex` parameters to FFMPEG
maptz opened this issue · 0 comments
maptz commented
Can you you pass filter-complex
arguments to FFMPEG?
I'm trying to use ffmediaelement to show various different scope views of an input video. For instance, I can show a vectorscope using the following video filter:
videoFilter.Append("waveform=filter=lowpass:scale=ire:graticule=green:flags=numbers+dots");
I'd like to show audio histogram levels from a video input using the ahistogram
filter. This requires use of a filter-complex
. Is there a way to pass a filter-complex
parameter to FFMPEG using ffmediaelement?
For an example of the ahistogram
command in action from the command line, see (here)[https://hhsprings.bitbucket.io/docs/programming/examples/ffmpeg/audio_visualization/ahistogram_dmode_separate.html].
Or look at the script below
#! /bin/sh
ifn="Air on the G String (from Orchestral Suite no. 3, BWV 1068).mp3"
ifnb="`basename \"${ifn}\" .mp3`"
pref="`basename $0 .sh`"
#
ffmpeg -y -i "${ifn}" -filter_complex "
[0:a]ahistogram=s=1920x1080:dmode=separate[v]
" -map '[v]' -map '0:a' -c:a copy \
"${pref}_${ifnb}.mp4"