how to get audio from youtube?

Polytropon freebsd at edvax.de
Wed Dec 12 05:50:20 UTC 2012


On Tue, 11 Dec 2012 20:17:05 -0800, Gary Kline wrote:
> 
> 	is there a way I can get the audio off u-toob?

Depends. The FreeBSD solution:

1. Use youtube-dl (it's in ports) to download the file.

2. Use ffmpeg -i <infile.flv> <outfile.mp3> to get the audio
   converted to MP3.

This process can be scripted if you require batch operation.

If you are fine with the native audio component, you could
just use "mplayer -dumpaudio <infile.flv> && mv stream.dump
<outfile.mp3>", but that's not always optimal for further
use (and depends on FLV vs. MP4 file format).

Alternative: There are web services that allow you to paste
a YT URI and then download it in MP3 format. Such a service
is http://www.youtube-mp3.org - but there are several others.

But please be advised that it's illegal to listen to MP3 in
the USA. :-)




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list