Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Take the audio from a youtube video

Is it possible to retrieve only the audio from a youtube video using the java youtube api?

like image 704
papafe Avatar asked Dec 06 '10 16:12

papafe


People also ask

How can I save the audio from a YouTube video?

If you're looking for easy ways to download YouTube audio to your Android device, the VidPaw app can help you. The download YouTube audio app lets users download YouTube music for free in just a few taps.

Can you extract just audio from a video?

One of the quickest ways to extract the audio from a video file on a Windows PC is to use the VLC Media Player. Although VLC is a free media player app, it has some secret features, including conversion options built into it as well. You can use those conversion options to convert your video file into an audio file.


2 Answers

Very similar to How do I programmatically extract the audio from a YouTube video?.

The top answer there is:

Writing an application for this might be overkill. Existing tools already do a pretty good job, and it's hard to beat their simplicity:

wget http://www.youtube.com/get_video.php?video_id=...

| ffmpeg -i - audio.mp3

All done!

If your application needs to do something special with the audio afterwards, it would make sense to write an app for that part. But for just getting the audio out, shelling out to ffmpeg will be a lot easier.

Kudos to John Feminella for the answer.

like image 121
Mark Mayo Avatar answered Oct 21 '22 04:10

Mark Mayo


sudo apt-get install youtube-dl ffmpeg libavcodec-extra-53 libav-tools

youtube-dl -x --audio-format mp3 --audio-quality 4 http://youtu.be/oRJ0FaOIIbM 
like image 42
head_thrash Avatar answered Oct 21 '22 05:10

head_thrash