<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/platform.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d23884446\x26blogName\x3dJust+Another+Tech+Blog\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dSILVER\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttps://justanothertechblog.blogspot.com/search\x26blogLocale\x3den_US\x26v\x3d2\x26homepageUrl\x3dhttp://justanothertechblog.blogspot.com/\x26vt\x3d-484221019928432923', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Just Another Tech Blog

Anything and everything having to do with technology, computers, science, and most of all... Linux! The documentation of my Linux endeavor.



Easily extract audio from any YouTube video

Monday, February 19, 2007

There are times when you come across a YouTube video that has a soundtrack that you just must have. You can download the video... but then you still have the video attached. What if you want just the audio? Well, if you're running Linux, ffmpeg has come to your rescue. Using any YouTube ripper, first download the video. Make sure it saves in .flv format. After that we can simply run the following command:

ffmpeg -i input.flv -f mp3 -vn -acodec copy output.mp3
This will give you just the audio of the video in nice mp3 format. From there, you can encode it as you wish.
Another method you may want to use, utilizing mplayer, is:

mplayer -dumpaudio [name of file].flv
This gives you a file called stream.dump in the original audio format. Rename the file as you wish.

Enjoy!
posted by linnerd40, Monday, February 19, 2007


4 Comments:

That is a very useful idea. Thanks

commented by Blogger Dave, 9:58 PM  

Great! This was just what I was looking for! Thanks!

commented by Anonymous Anonymous, 3:03 AM  

I'm using that kind of commands and I provide a tool to extract audio from youtube (or any other) video here:

http://vmeste.fr/data/svs/

I hope that'll be useful.

Gaetan

commented by Blogger Unknown, 4:22 PM  

Thanks!!

commented by Anonymous Anonymous, 7:46 PM  

Add a comment