Saturday, May 30, 2009

Making subwoofer work for mp3 playback in Ubuntu

The only thing I felt missing whenever I played MP3s on Ubuntu was the rich punch of bass from my subwoofer speakers. There is no option of a mixer to reroute sub base frequencies to the subwoofer channel.

My Subwoofer is a home brewn one and has no external hardware to downmix and filter out the frequencies from the front stereo channels as found in 2.1 speaker systems. The ac3 filter or the ffdshow audio decoder I normally use in windows has this option but not in linux.

So I tried many media player applications in ubuntu. Amarok, Xine..etc...and ended up clueless

Then I installed mplayer from the repositories using

$ sudo apt-get install mplayer

MPlayer is a command line media player for KDE. The GUI version is GMplayer.

This one has got tons of command line options with it. The one I like particularly is the -af (Audio filter) option.

The man pages of mplayer are too large to scroll through, better make it into a file to be read by some thing like gedit.

it has the option sub=cutoff:channel

which it says will filter frequencies from the left and right channels using butterworth filter below the cutoff value and reroute it to the channel specified.

Here is what i have used

$ mplayer -ao oss -af sub=75:5 -channels 5

-ao : specifies the audio output driver, Here oss is given

-af : audio filter options without which the sub option won't work

sub=75:5 : the cutoff frequency and the sub channel

-channels : specifies the number of channels to be used.
Here mplayer recognises channel 5 as the sub channel.

if you want to invoke all these options when double clicking an MP3 file,

feed all these options with the "open with" menu's extra options. Add an "&" at

the end to make it work in the background.

Enjoy the thump of music!!!!

To configure the mixer for 6 channel mode in Ubuntu..see this post...

http://electrowonder.blogspot.com/2009/07/activate-subwoofer-channel.html


No comments: