Direct Youtube video downloader

For everything that's not in any way related to PureBasic. General chat etc...
firace
Addict
Addict
Posts: 902
Joined: Wed Nov 09, 2011 8:58 am

Re: Direct Youtube video downloader

Post by firace »

Mijikai wrote: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).
Interesting. Would you be ok to post the code? I'd love to see if I can get rid of the youtube-dl dependency in my browser application. (Though I have a feeling it wouldn't be a simple task)
User avatar
NicTheQuick
Addict
Addict
Posts: 1226
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: Direct Youtube video downloader

Post by NicTheQuick »

SPH wrote:Do you know a lib that can download any type of video youtube? :?:
I don't know any video which can not be downloaded with youtube-dl. But remember to constantly update the python package because Youtube often changes its API.
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
User avatar
SPH
Enthusiast
Enthusiast
Posts: 269
Joined: Tue Jan 04, 2011 6:21 pm

Re: Direct Youtube video downloader

Post by SPH »

NicTheQuick wrote:
SPH wrote:Do you know a lib that can download any type of video youtube? :?:
I don't know any video which can not be downloaded with youtube-dl. But remember to constantly update the python package because Youtube often changes its API.
It can not be programmed in PB?
http://HexaScrabble.com/
!i!i!i!i!i!i!i!i!i!
!i!i!i!i!i!i!
!i!i!i!
//// Informations ////
Portable LENOVO ideapad 110-17ACL 64 bits
Version de PB : 5.73LTS - 32 bits
User avatar
NicTheQuick
Addict
Addict
Posts: 1226
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: Direct Youtube video downloader

Post by NicTheQuick »

SPH wrote:
NicTheQuick wrote:
SPH wrote:Do you know a lib that can download any type of video youtube? :?:
I don't know any video which can not be downloaded with youtube-dl. But remember to constantly update the python package because Youtube often changes its API.
It can not be programmed in PB?
Why do you want to invent the wheel a second time? Of course you can program it with PB but then you also have to maintain it because it is not an official feature to download Youtube videos. The API can change every time. You can look at the source code of youtube-dl and then convert it to PB. But I don't see the point.
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
User avatar
SPH
Enthusiast
Enthusiast
Posts: 269
Joined: Tue Jan 04, 2011 6:21 pm

Re: Direct Youtube video downloader

Post by SPH »

NicTheQuick wrote:
SPH wrote:
NicTheQuick wrote:
SPH wrote:Do you know a lib that can download any type of video youtube? :?:
I don't know any video which can not be downloaded with youtube-dl. But remember to constantly update the python package because Youtube often changes its API.
It can not be programmed in PB?
Why do you want to invent the wheel a second time? Of course you can program it with PB but then you also have to maintain it because it is not an official feature to download Youtube videos. The API can change every time. You can look at the source code of youtube-dl and then convert it to PB. But I don't see the point.
I would like to make a software :idea:
http://HexaScrabble.com/
!i!i!i!i!i!i!i!i!i!
!i!i!i!i!i!i!
!i!i!i!
//// Informations ////
Portable LENOVO ideapad 110-17ACL 64 bits
Version de PB : 5.73LTS - 32 bits
infratec
Always Here
Always Here
Posts: 6871
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Direct Youtube video downloader

Post by infratec »

Just tried:

https://www.youtube.com/watch?v=JFFMh2OXikY

http://youtube.rsbasic.de/?v=JFFMh2OXikY

results in 0 byte.
I think youtube changed something (again)

If the code of https://github.com/Athlon1600/youtube-downloader is adapted, maybe I try it to use it directly in PB with our libcurl.pbi

Ups ... your demo link still works.
User avatar
tj1010
Enthusiast
Enthusiast
Posts: 624
Joined: Mon Feb 25, 2013 5:51 pm
Location: US or Estonia
Contact:

Re: Direct Youtube video downloader

Post by tj1010 »

I've ripped HLS where there were timeouts and cookie checks on the segment keys and an obfuscator on the JS(the most secure you can make HLS) it's pretty easy to do. Hulu and Netflix and Discovery and Science channels all use it.. YouTube did too last I checked and converter services just use FFMPEG on the back-end..

I've been waiting on someone to use the HTML5 DRM which also uses a key session but actually requires advanced tools..
The truth hurts.
User avatar
Mijikai
Addict
Addict
Posts: 1360
Joined: Sun Sep 11, 2016 2:17 pm

Re: Direct Youtube video downloader

Post by Mijikai »

I totally forgot about this thread.

Yesterday revisited my code which surprisingly still downloads most videos(*.webm) + audio(*.weba) - only subtitles dont seem to work anymore.
I was mentioning bruteforcing the datacontainer but that was what i did (in a previous attempt) before discovering 'obfuscated' links in plain sight.
So in short i have a method that seems to work on most but not all videos.
I havent really had the time back then to really look into it but im confidend it may be a viable solution.

Maybe someone wants to help me - we can talk/chat on discord :)
User avatar
tj1010
Enthusiast
Enthusiast
Posts: 624
Joined: Mon Feb 25, 2013 5:51 pm
Location: US or Estonia
Contact:

Re: Direct Youtube video downloader

Post by tj1010 »

Mijikai wrote:I totally forgot about this thread.

Yesterday revisited my code which surprisingly still downloads most videos(*.webm) + audio(*.weba) - only subtitles dont seem to work anymore.
I was mentioning bruteforcing the datacontainer but that was what i did (in a previous attempt) before discovering 'obfuscated' links in plain sight.
So in short i have a method that seems to work on most but not all videos.
I havent really had the time back then to really look into it but im confidend it may be a viable solution.

Maybe someone wants to help me - we can talk/chat on discord :)
'obfuscated' or whatever you want to call miniaturized JS that uses ajax to generate root m3u8 URI.. YouTube, Hulu, Netflix and all the big pay-TV networks use HLS for HTTP streaming.

Anyone who wants to rip with no tools at all can always just use F12>Network to grab root m3u8 URL and feed it to FFMPEG or some program or the browser itself using segments. You'll actually find that all these big billion revenue networks don't even implement HLS security other than a 'paywall' in their CMS.. FFMPEG has been able to build output from just a root m3u8 over TLS and HTTP for years since nobody auths segment key requests....
The truth hurts.
Post Reply