Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing filter-complex parameters to FFMPEG #616

Open
maptz opened this issue Mar 4, 2022 · 0 comments
Open

Passing filter-complex parameters to FFMPEG #616

maptz opened this issue Mar 4, 2022 · 0 comments

Comments

@maptz
Copy link

maptz commented Mar 4, 2022

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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant