VLC Command Line – Apply Equalizer in Transcoding Chain

command lineequalizerffmpegvlc-media-player

I've seen this question asked many time but I have not been able to find an answer. One issue appears to be changes across versions, so historical discussions on this topic often seem to have lost their relevance.

I am trying to apply an equalizer to the filter chain from the command line using something like:

vlc --audio-filter equalizer -I dummy myfile.mp4 :sout=#transcode{afilter=equalizer{bands="1.5,-0.9,-1.6,-1.6,-0.5,1.4,2.7,3.4,3.2,2.8",twopass=true},vcodec=none,acodec=fl32,ab=128,channels=2,samplerate=44100}:std{access=file,mux=wav,dst="myfile.wav"}

I get something like:

[006a651c] core stream out error: cannot add user audio filter "equalizer{bands=1.5,-0.9,-1.6,-1.6,-0.5,1.4,2.7,3.4,3.2,2.8,twopass=true}" (skipped)

I've tried a lot of different variations and it looks like it's the equalizer filter it's self that it's not happy about, rather than the arguments.

Alternately, I would be just as happy, if not more so, to simply translate the VLC filter bands to an ffmpeg equalizer statement like:

equalizer=f=60:width_type=o:width=1:g=1.5, equalizer=f=170:width_type=o:width=1:g=-0.9, equalizer=f=310:width_type=o:width=1:g=-1.6, equalizer=f=600:width_type=o:width=1:g=-1.6, equalizer=f=1000:width_type=o:width=1:g=-0.5, equalizer=f=3000:width_type=o:width=1:g=1.4, equalizer=f=6000:width_type=o:width=1:g=2.7, equalizer=f=12000:width_type=o:width=3:g=3.4, equalizer=f=14000:width_type=o:width=3:g=3.2, equalizer=f=16000:width_type=o:width=3:g=2.8

but I have yet to figure out what type of filter vlc is implementing or its Q or bandwidth, so I've not been able to get the equivalent result.

Does anyone know how to do either of these with a version that isn't 2 years old?

Best Answer

I guess I just hadn't tried enough permutations. This seems to work:

vlc --no-video -I dummy MyFile.mp4" --equalizer-bands="1.5 -0.9 -1.6 -1.6 -0.5 1.4 2.7 3.4 3.2 2.8" --equalizer-2pass :sout=#transcode{afilter=equalizer,acodec=fl32,ab=128,channels=2,samplerate=44100}:std{access=file,mux=wav,dst="MyFile.wav"}

I had no luck is passing parameters within the the afilter, but --audio-filter equalizer did nothing as far as actually inserting it into the chain. afilter=equalizer will actually cause it to become active and --equalizer-bands=" ... " seems to set the filters correctly.

I should point out that I'm referring to ffmpeg-20160731-04da20e-win64-static and can't make any claim about any other version.

Related Question