PDA

View Full Version : HOWTO: Extract audio from mpeg files



TeeAhr1
August 15th, 2006, 04:11 PM
"Dammit, it's a video!" You thought you were downloading five songs. Nope, five videos. You don't want videos, you just want something to put on your mp3 player. Here's how to do it:

1. Download ffmpeg from the repositories (and any dependencies requested).
2. In the terminal, type: ffmpeg -i "/path/to/file.mpg" -f mp3 "/path/to/newfile.mp3"
Note that if your filename or path has spaces, you need the quotes around it.
3. There is no 3. You're done!

*Note: ffmpeg supports many different filetypes, and can do a lot more than just pull audio. If you're interested, here's the documentation (http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html) page for ffmpeg.

RhysU
April 8th, 2009, 03:53 AM
Try sticking '-ab 256k' or '-ab 128k' or whatever before '-f mp3', otherwise you may find your MP3 has a bitrate much lower than you'd usually want.

produnis
January 21st, 2012, 11:23 AM
Try sticking '-ab 256k' or '-ab 128k' or whatever before '-f mp3', otherwise you may find your MP3 has a bitrate much lower than you'd usually want.

thanks man,
thats exactly what I was looking for
:)