HOWTO: Make Karaoke on your Ubuntu Box!

Update: If you enjoy Karaoke, you might want to try http://thesimsonstage.ea.com/. I tried it out once, and simply loved it.

Last week I searched the internet for a way to “make” karaoke – strip out the vocals from my songs.
This way, I get songs without the vocals – only instrumentals – so I can sing along instead of the real singer. Turns out this is called karaoke :)

So, my hunt led me to two things:

PyKaraoke (#fail)

This is a software that can be installed with a simple “sudo apt-get install pykaraoke“. But, this somehow did not do what it is supposed to do. :(
So I figured out a new way to do this (after a LOT of googling).

Mplayer, your friend (#yay)

So here’s a DIY for how-to-make-your-own-karaoke:

1. Install the required software

You need mplayer and lame encoder. Installation is pretty simple: sudo apt-get install mplayer lame shntool

2. Remove the vocals from the song

Here’s how to do that: mplayer -ao pcm:file=<output file> -af karaoke <input file (song)>
This command will (try to) strip the vocals from the input song (audio, video, whatever) and will dump the output as “PCM Wav” encoded audio. Relax, this just means that the output song is NOT in mp3 format. And its size is huge.

3. Convert the wav output to mp3

Here’s how: lame -V2 <input wav file> <output mp3 file>
Make sure that there are no spaces in the file names during this “lame” operation. (I don’t know what happens if there are).

So far, so good.

And here’s the catch: not all songs respond equally well to this “procedure”. Some pointers:

  1. This procedure is meant to “attenuate” the voice, not remove it, like, completely. (#ref: http://www.linuxjournal.com/article/9787)
  2. Songs with male voice repond better than ones with female voice.
  3. Sometimes, drum beats are also badly attenuated along with the vocals. In any case, the “boom” of the beat gets killed.

So much for being a killjoy. But all said and done, I still use this method. It works on some songs, and it doesn’t on others.

Q: So what do you do if this method doesn’t work?

A: Search for a better method, and if you find it, post it in here!

About these ads

14 comments so far

  1. PyKaraoke on

    Interesting, I didn’t realise there was an existing way to do this with mplayer.

    In case you’re wondering about PyKaraoke, it is an application for playing back pre-prepared karaoke files (music+lyrics) in CDG, KAR/MID and MPG format. It’s not used for stripping the audio from regular tracks.

  2. jrharshath on

    Oho, so that’s the mystery behind PyKaraoke! Thanks :)

  3. davidlee on

    er..i dun quite understand about the process….about the output part…remove vocal…

    can u give me some examples? send to my email starstar89@hotmail.com

  4. Parry on

    OMG! Amazing! I could NEVER find something like this on windows. This works like hell! THANKS A LOT! You’re amazing! Hats off to your effort!

    • topher on

      For Windows there’s a free plugin for any audio program called Vocal Remover that you can get from download.com. Also,Audacity is free, does vocal removal and is available in both Linux and Windows distros.

  5. Parry on

    OH BTW. Very important. People copy pasting your code will not be able to run it. karaoke is spelt “karakoe”. Pls make that correction. thanks!

  6. jrharshath on

    @Parry Thanks! Corrected that..

  7. tiffy on

    there are loads of “vocal removal software progs that run on windows, don’t know why you can’t find any?

    • jrharshath on

      The point is to do it on linux, using the command line.

  8. Mat on

    Anyone know of a way to “make Karaoke CD+G files with Ubuntu?

    In windows I used karaoke CDG Creator (from powerkaraoke.com).

    It adds lyrics to a backing track (song with no vocals) and saves as CDG or BIN files to create a CD with.

    I want something like this for Ubuntu!

  9. Ajay Rama K on

    I get the following error upon executing the command

    lame -V2 baamaleyeba.wav baamaleyebaa.mp3

    Unsupported data format: 0×0003

    I tried with and without the .wav extension at both mplayer command and lame command. Same error. Anything?

    I am using Ubuntu Lucid Lynx with KDE.

  10. vaisarger on

    Please, take a look at my program:
    http://sites.google.com/site/bashkaraoke

    It plays karaoke through Bash…

  11. paolo on

    good guide!

    here how to create LRC karaoke lyrics files:
    http://wiki.xbmc.org/index.php?title=HOW-TO:Create_LRC_karaoke_lyrics_files


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: