Recording sound clips from movies

logo

What if, hypothetically, there is a clip on youtube that you’d really like to have on your iPod? Because you posted the content and lost your original source files, obviously. Or, say, there is a music video on youtube for a song you love (that you wrote and produced), but to your great disappointment, you lost your original master copies.

Never fear! Firefox, mplayer, and lame to the rescue!

First, get the video

The first order of business is to get a copy of the video. As often as really good youtube content disappears, this is a handy trick. Get the VideoDownloader plugin for Firefox. It helps you to grab .flv files for flash videos on youtube or Google video.

Install the plugin, restart your browser as instructed, and navigate back to the youtube page with the content you need. Use the new toolbar item you have and download the video to your home directory.

Extract the audio portion

If all you care about is the audio portion, then you’ll need to create a .wav file from the .flv file. No problem. That’s what mplayer is for.

Use the following command:

mplayer -vo null -ao pcm:file=output.wav video.flv

Now you’ll have a large “output.wav” file.

Clean up your audio file

At this point, you may want to clean it up a bit to slice the section you are interested in. Or perhaps there are some inappropriate words that you want to filter out by applying an effect of some sort. No problem: use Audacity.

Open Audacity with your “output.wav” file and make any all changes you want to. The program is pretty straight-forward, although I’m not an expert audio editor, so it always takes me longer than I expect to get the results I’m looking for.

Package your new file

The last step is compress your “output.wav” file. Chances are you’re not interested in lugging around a huge 50MB file everywhere. You want an .mp3 or .ogg file that will be a tenth the size.

Here are the commands you’ll need to convert the .wav file. Use just one of them depending on the output you seek:

oggenc out.wav -o out.ogg
lame -b 128 out.wav out.mp3

That’s all!

You’ve successfully extracted the audio or music portion of an online video and converted it into an MP3, without using alsa tools! Not too hard, right?


Related Posts

Tags:
Posted in solutions on July 4th, 2008 | 1 Comment »


Some fun clips

Jim Gaffigan on bacon:

A couple more funny clips…


Related Posts

Tags:
Posted in miscellanea on January 11th, 2008 | No Comments »

More by Mark Osborne

logo

I came across the video short “More” on youtube today. This is a great 6-minute short. I have the Special Edition DVD from despair.com, but I still enjoyed sitting and watching it again on youtube. It’ll be a long time before I tire of this little Academy-Award® nominated masterpiece. I could comment on it for days, but instead I’ll just link to the film and shut up.


Related Posts

Tags:
Posted in miscellanea on November 26th, 2007 | 1 Comment »