n00bfest.com
Home Forum phpBB3 Shoutbox Servers Teamspeak Admins Donate FAQ
Sign Up
Stats Contact Us!

 

View unanswered posts | View active topics It is currently Fri Sep 04, 2026 2:20 pm

Forum rules


- n00bfest is not the special olympics. It is a gaming community. Do not act like n00bfest is a retard daycare or you will be punished.
- Outright flames and flamebaiting will be punished.
- Even if you are not an adult, do your best to act like one.
- *NEW* Political/Religious News and NSFW posts do not belong here. Use the Videos, Links, Political/Religious News Discussion Forum
- Punishments range from warnings to permanent forum/gameserver bans.





Reply to topic  [ 17 posts ] 
 Download Youtube Videos as MP3s 
Author Message
n00bfest Elder, Lead Developer
User avatar

Joined: Sun May 24, 2009 11:00 pm
Posts: 2766
Location: Gettin it in
Post Download Youtube Videos as MP3s
So there's this site youtube-mp3.com that extracts the audio from youtube videos and lets you download the mp3. I use it a ton. So the other day I wrote a greasemonkey script that would put a little icon on youtube pages that would take you directly to the mp3 download page.

See:
Attachment:
yt2mp3.PNG
yt2mp3.PNG [ 142.87 KiB | Viewed 2801 times ]


And that link takes me to this page.

It has worked without issue for a few weeks so I'll post it here in case anyone is interested. To use, just install greasemonkey, and install the script below.

The greasemonkey link I posted is for firefox, but I'm pretty sure Chrome supports it too and apparently, Chrome 4 supports GM scripts natively without the need for an addon.

Anyway, after you install greasemonkey (and in firefox, restart your browser), you can install the script by clicking here.

If you're curious/paranoid, the source is below.

♥ fomenta

Code:
// ==UserScript==
// @name        Youtube-to-mp3 Link
// @namespace   n00bfest.com
// @include     http://www.youtube.com/*
// @version     1
// ==/UserScript==

var $;

// Add jQuery
(function(){
    if (typeof unsafeWindow.jQuery == 'undefined') {
        var GM_Head = document.getElementsByTagName('head')[0] || document.documentElement,
            GM_JQ = document.createElement('script');

        GM_JQ.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js';
        GM_JQ.type = 'text/javascript';
        GM_JQ.async = true;

        GM_Head.insertBefore(GM_JQ, GM_Head.firstChild);
    }
    GM_wait();
})();

// Check if jQuery's loaded
function GM_wait() {
    if (typeof unsafeWindow.jQuery == 'undefined') {
        window.setTimeout(GM_wait, 100);
    } else {
        $ = unsafeWindow.jQuery.noConflict(true);
        letsJQuery();
    }
}

// http://stackoverflow.com/questions/901115/get-query-string-values-in-javascript
function getParameterByName(name)
{
    name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
    var regexS = "[\\?&]" + name + "=([^&#]*)";
    var regex = new RegExp(regexS);
    var results = regex.exec(window.location.search);
    if(results == null)
        return "";
    else
        return decodeURIComponent(results[1].replace(/\+/g, " "));
}


// All your GM code must be inside this function
function letsJQuery() {
    //icon = '<img src="http://a.dryicons.com/images/icon_sets/coquette_part_6_icons_set/png/32x32/mp3_file.png">';
    var icon = '<img src="http://cdn.last.fm/favicons/itunes16x16.png">';
   
    // Extract v param
    var key = getParameterByName('v');
   
    // Build Download Link
    var link = 'http://www.youtube-mp3.org/#v=' + key;
   
    title = $('h1#watch-headline-title');
    title.append('<a href="'+ link +'">' + icon + '</a>');
}

_________________

Image


Sun Jul 08, 2012 5:12 pm
Profile
[n00b] Member
User avatar

Joined: Wed Nov 09, 2011 10:28 pm
Posts: 1295
Post Re: Download Youtube Videos as MP3s
Works great, thanks.

_________________
Lots of people have birthdays in early November. I like to think that it's because their parents fucked on Valentine's day.

"OH BABY YOU BOUGHT ME A HALLMARK CARD AND SOME F*CKING ROSES. PLEASE BUST A LOAD IN MY SNATCH AND LET'S MAKE A CRITTER"
"LOL K"
*SPLAT*

-Gman


Sun Jul 08, 2012 5:21 pm
Profile
[n00b] Member
User avatar

Joined: Wed Jul 23, 2008 11:00 pm
Posts: 5727
Location: Dakota, North
Post Re: Download Youtube Videos as MP3s
Do you know if the site automatically pulls the highest quality audio stream (i.e. the 1080p stream over the 360p stream)?

_________________
Image


Sun Jul 08, 2012 6:11 pm
Profile
[n00b] Member
User avatar

Joined: Fri Aug 21, 2009 3:46 am
Posts: 2623
Location: Montreal, Canada
Post Re: Download Youtube Videos as MP3s
Tazzaler wrote:
Do you know if the site automatically pulls the highest quality audio stream (i.e. the 1080p stream over the 360p stream)?


I was going to ask the same question.
I'm going to be using this a lot, thanks!

_________________
Image


Sun Jul 08, 2012 8:50 pm
Profile
n00bfest Elder, Lead Developer
User avatar

Joined: Sun May 24, 2009 11:00 pm
Posts: 2766
Location: Gettin it in
Post Re: Download Youtube Videos as MP3s
Tazzaler wrote:
Do you know if the site automatically pulls the highest quality audio stream (i.e. the 1080p stream over the 360p stream)?


I dunno man, its kind of hard to tell. I get like 1MB / min for the files I download and they're 128 kbps CBR.

_________________

Image


Sun Jul 08, 2012 9:09 pm
Profile
[n00b] Member
User avatar

Joined: Thu Feb 23, 2006 12:00 am
Posts: 1918
Location: Miami, FL
Post Re: Download Youtube Videos as MP3s
Site is also being threatened by Google: http://www.youtube-mp3.org/situation-update


Sun Jul 08, 2012 9:18 pm
Profile
[n00b] Member
User avatar

Joined: Tue Nov 29, 2011 3:08 pm
Posts: 216
Post Re: Download Youtube Videos as MP3s
use this all the time as well. its pretty badass

_________________
In actual news, the human race was doomed to extinction today, as the robot revolt turned violent.

WHAT UP NOW SWEDES!!!!!!!!!!
http://www.youtube.com/watch?v=TXh1sKkcYb8


Sun Jul 08, 2012 9:18 pm
Profile
[n00b] Member
User avatar

Joined: Wed Jul 23, 2008 11:00 pm
Posts: 5727
Location: Dakota, North
Post Re: Download Youtube Videos as MP3s
fomenta wrote:
Tazzaler wrote:
Do you know if the site automatically pulls the highest quality audio stream (i.e. the 1080p stream over the 360p stream)?


I dunno man, its kind of hard to tell. I get like 1MB / min for the files I download and they're 128 kbps CBR.

I guess in the end it doesn't matter because they're going to be 128kbs no matter the fact. It'd just be interesting what the source audio they use.

Might have to run some tests to see; as in play the audio I get from the program vs the audio playing straight from the youtube video playing in "HD".

_________________
Image


Sun Jul 08, 2012 9:20 pm
Profile
[n00b] Member
User avatar

Joined: Mon Jun 04, 2012 10:09 am
Posts: 696
Location: Texas
Post Re: Download Youtube Videos as MP3s
♥ that u leave comments

_________________
Image


Sun Jul 08, 2012 10:30 pm
Profile
Game Server Admin
User avatar

Joined: Tue Apr 01, 2008 11:00 pm
Posts: 5190
Location: Vegas Baby
Post Re: Download Youtube Videos as MP3s
The Chrome version of Greasemonkey is Tampermonkey. And the script for youtube-mp3 is here. Thanks for this awesome add-on :)


Also, what is chrome 4? this is my current version of chrome, which says "up to date."


Attachments:
WhatBrowser.png
WhatBrowser.png [ 268.38 KiB | Viewed 2772 times ]

_________________
Image


Last edited by -Purple- on Sun Jul 08, 2012 11:05 pm, edited 1 time in total.

Sun Jul 08, 2012 10:49 pm
Profile
[n00b] Member
User avatar

Joined: Thu Feb 23, 2006 12:00 am
Posts: 1918
Location: Miami, FL
Post Re: Download Youtube Videos as MP3s
-Purple- wrote:
what is chrome 4? this is my current version of chrome, which says "up to date."



Maybe he means since version Chrome 4 (16 versions behind the one your currently at)?


Sun Jul 08, 2012 10:57 pm
Profile
[n00b] Member
User avatar

Joined: Sun Mar 18, 2012 5:32 pm
Posts: 131
Location: Earth
Post Re: Download Youtube Videos as MP3s
Just the fact you showed a song from one of MrSuicideSheep's channels makes you AWESOME by tenfold.

_________________
Image


Sun Jul 08, 2012 11:39 pm
Profile
n00bfest Elder, Lead Developer
User avatar

Joined: Sun May 24, 2009 11:00 pm
Posts: 2766
Location: Gettin it in
Post Re: Download Youtube Videos as MP3s
lol I dunno what Chrome 4 is -- I googled something like "greasemonkey chrome" and found this article skimmed it and wrote that. Looking at it again, its from 2010 so who knows.

Its pretty cool theres the same extension for chrome already written. I actually end up doing things myself WAYYY more than I need to when I could spend like 1/4 of the time searching and finding something that was already written. I didn't look, but the script was prob already written for FF, maybe even better.

PS Thanks to virus for liking this website and then back a few months ago when I searched for something like "youtube to mp3" it popped up with "<virus> I AM A HOMOSEXUAL'd this".

_________________

Image


Mon Jul 09, 2012 6:16 pm
Profile
[n00b] Member
User avatar

Joined: Thu Feb 23, 2006 12:00 am
Posts: 1918
Location: Miami, FL
Post Re: Download Youtube Videos as MP3s
fomenta wrote:
lol I dunno what Chrome 4 is -- I googled something like "greasemonkey chrome" and found this article skimmed it and wrote that. Looking at it again, its from 2010 so who knows.

Its pretty cool theres the same extension for chrome already written. I actually end up doing things myself WAYYY more than I need to when I could spend like 1/4 of the time searching and finding something that was already written. I didn't look, but the script was prob already written for FF, maybe even better.

PS Thanks to virus for liking this website and then back a few months ago when I searched for something like "youtube to mp3" it popped up with "<virus> I AM A HOMOSEXUAL'd this".



No problem, I tend to be gay all the time. ♥


Mon Jul 09, 2012 6:18 pm
Profile
n00bfest Elder, Lead Developer
User avatar

Joined: Sun May 24, 2009 11:00 pm
Posts: 2766
Location: Gettin it in
Post Re: Download Youtube Videos as MP3s
LOLOLOL wordfilter -- of course, that was supposed to be "+1"

_________________

Image


Mon Jul 09, 2012 6:21 pm
Profile
[n00b] Member
User avatar

Joined: Thu Feb 23, 2006 12:00 am
Posts: 1918
Location: Miami, FL
Post Re: Download Youtube Videos as MP3s
lol it wasnt a word filter. I actually typed that.


Mon Jul 09, 2012 6:32 pm
Profile
[n00b] Member
User avatar

Joined: Mon Jun 21, 2010 6:04 pm
Posts: 4413
Location: Here.
Post Re: Download Youtube Videos as MP3s
There's another site like this, http://www.vidtomp3.com that I use when I can't find what I'm looking for on one of the legit mp3 sources I buy from (sometimes there's a particular version of a song that just doesn't seem to be available anywhere).

_________________
Image


Thu Jul 12, 2012 4:05 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 17 posts ] 

Who is online

Users browsing this forum: Google [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.