Page 1 of 2

Direct Youtube video downloader

Posted: Fri Sep 13, 2019 8:50 am
by RSBasic
Hello

There are many addons and pages to download YouTube video. There you either have to click on the download button or enter and confirm the URL.
I had an idea and I can offer a service to download YouTube videos directly automated without GUI and without user input.

You can download any YouTube video with my site instantly. Just call my address with the parameter VideoID and the download will start immediately.
I am using the following code to download YouTube videos: https://github.com/Athlon1600/youtube-downloader
I have extended the code so that you can download any YouTube video directly via URL.
You can download any video as mp4 720p. Other formats and qualities are not planned.

You can use my site both privately and for your projects.

Automated download link: http://youtube.rsbasic.de/?v=<ID>
Example: http://youtube.rsbasic.de/?v=viaRIIMsMZA
PB example:

Code: Select all

EnableExplicit

InitNetwork()

ReceiveHTTPFile("http://youtube.rsbasic.de/?v=viaRIIMsMZA", "D:\MyVideo.mp4")
Have fun :)

Re: Direct Youtube video downloader

Posted: Mon Sep 16, 2019 9:08 am
by ar-s
Cool tool :D
Thanks :mrgreen:

Re: Direct Youtube video downloader

Posted: Mon Sep 16, 2019 2:44 pm
by Paul
It would be interesting to see how you have it all set up in case one wanted to set up their own download server.

Re: Direct Youtube video downloader

Posted: Mon Sep 16, 2019 6:45 pm
by SPH
Very interesting. well done

Re: Direct Youtube video downloader

Posted: Mon Sep 16, 2019 8:44 pm
by applePi
.

Re: Direct Youtube video downloader

Posted: Tue Sep 17, 2019 4:30 am
by Rinzwind
You do know that sooner or later bandwidth will go through the roof? You're prepared for that?

Or YouTube start blocking your ip(rang).

Anyway, interesting to see what going on behind the scenes. Seems like an interesting github project so others can also mirror it. Possibly using https://github.com/ytdl-org/youtube-dl/ ?

Re: Direct Youtube video downloader

Posted: Tue Sep 17, 2019 8:53 pm
by SPH
Hi, I'm interested in this subject. Let's take a concrete youtube example:
https://www.youtube.com/watch?v=RYAIQRPPu5w

How to download it?
Is it up to us to impose conversion to MP4 or must we know in advance in which format the video is?

Thank you :!:

Re: Direct Youtube video downloader

Posted: Wed Sep 18, 2019 8:42 am
by RSBasic
SPH wrote:Is it up to us to impose conversion to MP4 or must we know in advance in which format the video is?
No, YouTube automatically converts the uploaded videos to MP4 using codec H.264.
SPH wrote:How to download it?
Simply copy and paste the VideoID:
https://www.youtube.com/watch?v=[b]RYAIQRPPu5w[/b]
http://youtube.rsbasic.de/?v=[b]RYAIQRPPu5w[/b]
Downloadlink from your video: http://youtube.rsbasic.de/?v=RYAIQRPPu5w
Paul wrote:It would be interesting to see how you have it all set up in case one wanted to set up their own download server.
1. I downloaded the GitHub code "youtube-downloader" and uploaded it to my server.
2. I wrote a PHP file to receive the parameter for the VideoID and pass it to the function of "youtube-downloader".
3. I get the download link from the "youtube-downloader" function. I send the download link to the header of my PHP page and the file is offered for download.
4. I created a subdomain.
Rinzwind wrote:You do know that sooner or later bandwidth will go through the roof? You're prepared for that?
The mp4 file is downloaded from the original YouTube server. My server is not affected by this.
Rinzwind wrote:Or YouTube start blocking your ip(rang).
There are many pages and addons that do the same. YouTube doesn't seem to have a problem with that. :D

Re: Direct Youtube video downloader

Posted: Wed Sep 18, 2019 4:16 pm
by SPH
Thank you very much.

Small question: Is there a quota not to exceed a day?
Because, I tried to transform this:
https://www.youtube.com/watch?v=uF0PrDdKogo

in this:
http://youtube.rsbasic.de/?v=uF0PrDdKogo

but it does not work. Why ?

Thank you :|

Re: Direct Youtube video downloader

Posted: Wed Sep 18, 2019 4:25 pm
by RSBasic
I've noticed that, too. It doesn't work on all videos. This problem exists with all other pages and addons too.
My guess is: YouTube has many servers (load balancer) and some servers do not support the download.
But other quality levels (720p, 480p, 360p) may work. I'll test and check that.

Re: Direct Youtube video downloader

Posted: Sat Sep 21, 2019 9:11 am
by RSBasic
I've analyzed it. I get the following array from youtube-downloader function:

Code: Select all

array(1) { [18]=> array(2) { ["url"]=> string(793) "https://r1---sn-oxujvavbox-jbol.googlevideo.com/videoplayback?expire=1569074820&ei=JNqFXZPJEJGt1wLxmLzoCA&ip=2a00%3A17d8%3A200%3A%3Ad1&id=o-APPUaPDxtm5WunaCMh7uMPSZYH95rUleEB7O8jK4fGev&itag=18&source=youtube&requiressl=yes&mm=31%2C29&mn=sn-oxujvavbox-jbol%2Csn-5hnekn7k&ms=au%2Crdu&mv=u&mvi=0&pl=32&mime=video%2Fmp4&gir=yes&clen=367765293&ratebypass=yes&dur=5020.107&lmt=1540385078883928&mt=1569052721&fvip=4&c=WEB&txp=5431432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cmime%2Cgir%2Cclen%2Cratebypass%2Cdur%2Clmt&lsparams=mm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl&lsig=AHylml4wRAIgb8Yj7tGC1hJ9odja-y6GnjT_LbmnJ6HZrDqi-s9129sCIHbm7NO1nzZ3BmMAdsVtiS2gTmlrodYllq1SDKPGw7b9&signature=X==QoKcfVpHe6rjDeI8HKVZkObiFzj40LttwYBZg4keruGDQICkSW8RVcI8FUjRZVwZ=1nW-Hw8LXYCwyKFHtc0dAKbVUgIQRww2IxgLAgLA" ["format"]=> string(8) "MP4 360p" } } 
Download is not possible with this URL from this Google server. Sorry, I can't fix the problem.

Re: Direct Youtube video downloader

Posted: Sat Sep 21, 2019 9:27 am
by Mijikai
Nice project, the last time i tried to write a downloader i was only able to download video (*.webm) and sound seperately.
I still have the project (i was brutefocing the data container until it contained valid video links).

Re: Direct Youtube video downloader

Posted: Sun Sep 22, 2019 1:48 pm
by firace
http://youtube.rsbasic.de/?v=uF0PrDdKogo

but it does not work. Why ?

Thank you :|
FWIW youtube-dl seems to have no problem with it:

Code: Select all

youtube-dl.exe https://www.youtube.com/watch?v=uF0PrDdKogo

Re: Direct Youtube video downloader

Posted: Sun Sep 22, 2019 1:55 pm
by Derren
Looks like this video was migrated from googlevideo, which is no longer active, but it seems they kept the servers running and only built a bridge interface to youtube.
The author of the lib RSBasic is using probably didn't account for that

Re: Direct Youtube video downloader

Posted: Tue Sep 24, 2019 1:28 am
by SPH
Derren wrote:Looks like this video was migrated from googlevideo, which is no longer active, but it seems they kept the servers running and only built a bridge interface to youtube.
The author of the lib RSBasic is using probably didn't account for that
Do you know a lib that can download any type of video youtube? :?: