Jump to content

Fast Youtube2Mp3 Updated 22 Feb 2011


wakillon
 Share

Recommended Posts

Fast Youtube2Mp3

Download and Convert Youtube Video To mp3 with http://www.listentoyoutube.com Website and

FastDownload a command line multi-threaded segmented download tool who increases the download speed by 3 to 10.

A mp3 in 5 Second ? yes it's now possible if video is in the WebSite database ! :x

Posted Image

[FastYoutube2Mp3.au3]

previous download : 570

Updated 22 Feb 2011

External files are downloaded at first execution and are stored in @TempDir & '\FY2M' and _XMLDomWrapper.au3 can be found here

Fast and easy ! Hope you like it !

Every comments or ideas are welcolme ...

Sorry Website modified, not working anymore... :P

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Link to comment
Share on other sites

Your reply in firefox's thread (minus fastdownload) is plenty fast. I have been abusing that one, I like the fire and forget-ness of it.

Edited by iamtheky

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

Hey !!

Nice programming style, nice gui ! this is pretty clean !

Just tried the script, and can't make it work for now, put various existing youtube links,... i always get the timeout message..

any clue?

I like the skinning method with this DLL !! Ima explore it!

hench

Link to comment
Share on other sites

Hey !!

Nice programming style, nice gui ! this is pretty clean !

Just tried the script, and can't make it work for now, put various existing youtube links,... i always get the timeout message..

any clue?

I like the skinning method with this DLL !! Ima explore it!

hench

What Os ? do you need to run as administrator ?

Does your firewall allows access ?

Is your connection very slow ?

In case of error, script opens your links in IE for see if they are good, What it shows ?

If Round ( TimerDiff ( $_TimerInit )/1000 ) > 10 Then 
            MsgBox ( 0, 'Error', 'An error occured !' & @CRLF & @CRLF & 'Bad Url or You are Not Connected', 6 )
            ShellExecute ( "iexplore.exe", $_YoutubeUrl )
            Return
        EndIf

This TimeOut message is just for bad url or connection error...

Try to change the timeout to 30.Posted Image

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Link to comment
Share on other sites

Hey,

Sorry for the delay.

OK, so, I got this working sometime, but most of the time not, it just won't come before timing out, when it does work this is kinda fast tho.

I'm on WinXP SP3,... running as admin. Decent broadband connection. I don't usually have trouble with downloads/connection to internet within third party softwares.

Notes :

- All links have been tested first and after the fail.

- Manually, with FireFox, this is pretty instantaneous depending on the video size.

I added option 1 to InetRead to "force a reload from the remote site", it didn't do it. I have no more time to look into that for now, but I will expect some more comment to help out!!!!

Anybody else experience such ???

hench

Link to comment
Share on other sites

It is fast indeed, very fast and I'm very happy about that. Nice job :x

Unfortunately many times it won't get anything because it will complain about bad link or not connected even when connection is ok and link is good ( the IE page which opens goes straight to the video). I understand this is happening because everything is downloaded from an alternate site - not from Youtube - and the video is very well on Youtube but not on listentoyoutube. My guess is, listentoyoutube has a limited database and if the video is there, we are in luck, if not - that's it, move to next one.

Anyway, nice finding. As long as it works it is good.

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Link to comment
Share on other sites

My guess is, listentoyoutube has a limited database and if the video is there, we are in luck, if not - that's it, move to next one.

If you go to the Listentoyoutube homepage you can add the video you want to their database :x

just insert the link, tick the High Quality circle thingy, and let it convert.

Even that is quite quick actually...

Link to comment
Share on other sites

Hey,

Sorry for the delay.

OK, so, I got this working sometime, but most of the time not, it just won't come before timing out, when it does work this is kinda fast tho.

I'm on WinXP SP3,... running as admin. Decent broadband connection. I don't usually have trouble with downloads/connection to internet within third party softwares.

Notes :

- All links have been tested first and after the fail.

- Manually, with FireFox, this is pretty instantaneous depending on the video size.

I added option 1 to InetRead to "force a reload from the remote site", it didn't do it. I have no more time to look into that for now, but I will expect some more comment to help out!!!!

Anybody else experience such ???

hench

I don't know where you find your youtube urls, because i test script with lot of differents urls took on youtube website...

but perhaps not enough ! Posted Image

It is fast indeed, very fast and I'm very happy about that. Nice job :x

Unfortunately many times it won't get anything because it will complain about bad link or not connected even when connection is ok and link is good ( the IE page which opens goes straight to the video). I understand this is happening because everything is downloaded from an alternate site - not from Youtube - and the video is very well on Youtube but not on listentoyoutube. My guess is, listentoyoutube has a limited database and if the video is there, we are in luck, if not - that's it, move to next one.

Anyway, nice finding. As long as it works it is good.

Thanks ! Posted Image

Your explanations sounds like a good reason for the woes of hench !

This was too nice...

If you go to the Listentoyoutube homepage you can add the video you want to their database :P

just insert the link, tick the High Quality circle thingy, and let it convert.

Even that is quite quick actually...

Thanks KingNED, but it should take some times for website to add it to their database...I will do some other tries ! Posted Image

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Link to comment
Share on other sites

@KingNED

That works indeed, I have "discovered" that myself, once you get it converted first, it will be added to database and available for all.

@wakillon

Very good job, if anyone complains about links not working, the explanation stays in several above posts; it doesn't work because the video is not in the database - end of story. Not your fault at all.

5 stars from me :x

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Link to comment
Share on other sites

  • 2 weeks later...

@KingNED

That works indeed, I have "discovered" that myself, once you get it converted first, it will be added to database and available for all.

@wakillon

Very good job, if anyone complains about links not working, the explanation stays in several above posts; it doesn't work because the video is not in the database - end of story. Not your fault at all.

5 stars from me :)

Thanks enaiman ! Posted Image

Waouh, already 180 downloads !

I do a little update of the script for add a separate msgBox for video who are not in database for a better understanding of the script function.

See first Post for download link.

Edit : If you want absolutely another download solution you can try my

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Link to comment
Share on other sites

I have a suggestion for you wakillon, which for me makes an app much more convenient - able to pass a parameter at execution of the program, OR read from the clipboard. Aside from this, your code looks good, and useful to me.

You could also easily add a button on the GUI form to paste the contents of the clipboard, so a user cold run the app, find a URL and paste it without needing to click in the input field and then press Ctrl V. I have done this in a little program I wrote to query Active Directory user information in a corporate network, easy to do, and convenient to use.

Change your original line 131 as below, this will use a variable to fill the input field, which will allow us to either put up a message, or put in the contents of the clipboard or a parameter.

GUICtrlSetData ( $_Input, 'Enter a YouTube Url' )

GUICtrlSetData ( $_Input, $URLMsg)

Add the lines below, (showing your original global declarations and function calls for reference) which test for http://youtube.com at the start of a command line parameter, then for the same string in the clipboard if no command line parameter

Global $_ProgressBar, $_Input, $_LaunchButton, $_Label1, $_Label2

Global $_TimerInit, $_DownloadDirectoryPath = @DesktopDir & '\Fast Youtube2Mp3'

; allanm start of added code

Global $URLMsg= "Enter a YouTube Url"

If $CmdLine[0] = 1 Then

If StringInStr ($CmdLine[1], "http://youtube.com", 0, 1, 1) Then

$URLMsg = $CmdLine[1]

EndIf

Else

$ClipBrd = ClipGet()

If StringInStr($ClipBrd,"http://youtube.com", 0, 1, 1) Then

$URLMsg = $ClipBrd

EndIf

EndIf

; allanm end of added code

_FileInstall ( )

_GuiCreate ( )

Link to comment
Share on other sites

I have a suggestion for you wakillon, which for me makes an app much more convenient - able to pass a parameter at execution of the program, OR read from the clipboard. Aside from this, your code looks good, and useful to me. This is a minor modification from the last post - I added a second test with StringInStr to test not only for http://youtube.com, but also http://www.youtube.com to make it a bit more robust

You could also easily add a button on the GUI form to paste the contents of the clipboard, so a user cold run the app, find a URL and paste it without needing to click in the input field and then press Ctrl V. I have done this in a little program I wrote to query Active Directory user information in a corporate network, easy to do, and convenient to use.

Change your original line 131 as below, this will use a variable to fill the input field, which will allow us to either put up a message, or put in the contents of the clipboard or a parameter.

GUICtrlSetData ( $_Input, 'Enter a YouTube Url' )

GUICtrlSetData ( $_Input, $URLMsg)

Add the lines below, (showing your original global declarations and function calls for reference) which test for http://youtube.com at the start of a command line parameter, then for the same string in the clipboard if no command line parameter

Global $_ProgressBar, $_Input, $_LaunchButton, $_Label1, $_Label2

Global $_TimerInit, $_DownloadDirectoryPath = @DesktopDir & '\Fast Youtube2Mp3'

; allanm start of added code

Global $URLMsg

If $CmdLine[0] = 1 Then

If StringInStr($CmdLine[1], "http://youtube.com", 0, 1, 1) or StringInStr($CmdLine[1],"http://www.youtube.com", 0, 1, 1) Then

$URLMsg = $CmdLine[1]

EndIf

Else

$ClipBrd = ClipGet()

If StringInStr($ClipBrd,"http://youtube.com", 0, 1, 1) or StringInStr($ClipBrd,"http://www.youtube.com", 0, 1, 1) Then

$URLMsg = $ClipBrd

Else

$URLMsg = "Enter a YouTube Url"

EndIf

EndIf

; allanm end of added code

FastYoutube2Mp3.au3

Edited by allanm
Link to comment
Share on other sites

  • 4 weeks later...

@allanm

your suggestion is interesting, and I add some features to the script that should interesting you.

_A tray menu with the possibility to :

.monitoring clipboard for youtube urls and start automatically the search and download

.open Download directory

.change Download directory

.open youtube.com/music

.open listentoyoutube.com

.open this topic for see if updates

.cancel current download

_The possibility to download "normally" if url is not in website database and convert to mp3.

_Win pos and settings are saved on exit

And like listentoyoutube.com start to be victim of his success,

somes days site is unreachable or with difficulty,

i set number of tries to 3, to get sourcecode for the query

and add some minor improvements

See first post for last updated script.

If you have other ideas...Posted Image

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Link to comment
Share on other sites

  • 2 weeks later...

on XP SP3.

The download is not working if the video is in the database, It counts to two seconds but there is no result.

However, if the video is not in the database, it does download the .flv albeit into the temp directory not the selected output directory, i suppose at that point maybe it should convert the video resulting with the mp3 in the output directory, but that also does not occur.

any idea where i am failing?

I still get a lot of use out of the original which works like a champ.

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

on XP SP3.

The download is not working if the video is in the database, It counts to two seconds but there is no result.

However, if the video is not in the database, it does download the .flv albeit into the temp directory not the selected output directory, i suppose at that point maybe it should convert the video resulting with the mp3 in the output directory, but that also does not occur.

any idea where i am failing?

I still get a lot of use out of the original which works like a charm.

I'm on XP sp3 too, and i just do some twenty tries ( in quick and normal mode ) without major problems.

The only change i have found , that is website modify his links.

Before the video name was at the end of the link and now it's like : Xkhmyzwagvy.Mp3

So i must adapt this but when i change download directory even while downloading,

mp3 arrive normally in the new folder...

If folder is deleted while downloading it will be recreated.

Do you use last version ( at the top of topic ) ?

What urls do you try ? ( for see by my side )

For normal download : Flv are downloaded to temp folder, encoded to mp3, and after moved to download directory selected.

Verify the temp directory @TempDir & '\FY2M', you must have :

FastDownload.exe

FLVExtractCL.exe

FY2M\Skin

But first, send me please your urls ! Posted Image

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Link to comment
Share on other sites

I am getting a white screen when I compile this. I had it compiled and it was working fine. I don't understand what the problem is.

Have you a white screen only with this script ?

I did some tests compile without white screen...

Try to reinstall Autoit...Posted Image

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...