Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Can i just extract youtube video download url but not download ? #816
Comments
|
yes you can by using -g or --get-url as the parameter. For example: youtube-dl -g www.youtube.com/watch?v=a15KgyXBX24 On Thu, May 2, 2013 at 3:07 PM, dfang notifications@github.com wrote:
|
|
thanks yasoob , it works ! however the url is different from the results from 10youtube.com , i mean even the first part (http://r6---sn-o097zne7.c.youtube.com/ vs http://r6---sn-a5m7znez.c.youtube.com, when i paste the url to browser , one is directly downable , one is for streaming) is different , and there are so many parameters , which parameters are required to download the video ? where can i find the documentation about all the parameters ? i know by extracting the video_info file , i can get the urls , but the url is not downloadable . Thanks ! |
|
you can not use it like that. because youtube requires some headers which On Thu, May 2, 2013 at 6:58 PM, dfang notifications@github.com wrote:
|
|
The above explanation was according to my knowledge and the difference in On Thu, May 2, 2013 at 7:48 PM, Yasoob Khalid yasoobkhld@gmail.com wrote:
|
|
As @yasoob pointed out, youtube uses (its internal) CDN, and the domain name depends on your locale, timing, and youtube's configuration. The URL will be the correct one for whatever arguments (mainly I'm not sure why you don't let youtube-dl download the video in the first place. Can you elaborate why? In any case, I'm closing this issue for now, but feel free to comment if the current explanations are not sufficient. |
|
Hi @phihag : I am a little late to this discussion. I am trying to grab the download url of a video using -g option. Then I want to use third party download accelerators for faster downloading. For example, axel download youtube videos with 3MBps (when given proper download link) while youtube-dl use only <200KBps. So I want to get correct download link from youtube-dl, but as mentioned before, link given by youtube-dl is only for streaming. I can't download it. Is there any option to get the correct download-ready link? |
|
Please provide a sample. |
|
@juancri :
It works with axel. Axel throws an error: HTTP/1.1 403 Forbidden |
|
@abidrahmank The problem seems to be that the url extracted with youtube-dl uses |
|
@jaimeMF : Thank you.. that works. |
|
Hello guys, Sorry for late coming. My issue is the filename of video downloaded from url fetched from youtube-dl -g when i try to download this. it gives me a file like videoplayback.mp4 what i need is a file whose name is not videoplayback but the video title. Any suggestions? |
|
`<?php $cmd =' youtube-dl -g -f36 ' . escapeshellarg($url); $results = print_r($outputsd[0], true); $results2 = print_r($outputss[0], true); $cmd3 =' youtube-dl -g -f22 ' . escapeshellarg($url); $cmd4 =' youtube-dl -g -f17 ' . escapeshellarg($url); $name =' youtube-dl -e ' . escapeshellarg($url); |
|
@praburamWAPKA Thanks a lot, brother. It worked. |
|
@praburamWAPKA |
|
you need to encode url and set filename well its similar to project |
|
@AdnanHussainTurki Add title query param at the end of the link. |
can u fix this code pls its not working with me :( |
|
@shaniax420 `<?php header('Content-Disposition:filename="video.mp4"'); $url = 'https://youtube.com/watch?v='.$_GET['v'].''; $cmds = ("/usr/local/bin/youtube-dl -g -f22 $url 2>&1 ") $link_720=print_r($out[1],true); $cmdss = ("/usr/local/bin/youtube-dl -g -f18 $url 2>&1 ") $link_360=print_r($outt[1],true); $cmdsss = ("/usr/local/bin/youtube-dl -g -f36 $url 2>&1 ") $link_240=print_r($outtt[1],true); $cmdssss = ("/usr/local/bin/youtube-dl -g -f140 $url 2>&1 ") $link_mp3=print_r($outttt[1],true); $name =' /usr/local/bin/youtube-dl -e ' . escapeshellarg($url); echo ' Download[720p]';echo ' Download[360p]';echo ' Download[240p]';echo ' Download [Mp3]';
|
|
Happy to see your reaply but your code i cant see perfect can you pls add your code in this website https://pastebin.com/ :) |
|
Hi @praburamWAPKA Can you help me? Actually I am getting 0 byte Txt file for some downloads ,The link is working perfect but its gives me 0 bytes .
|
|
@MSZ991 use this https://github.com/jeckman/YouTube-Downloader to generate links.... Don't forget to enable Ciphered Option on Config file(default.php) under Config folder |
|
@praburamWAPKA Thank you so much bro :) <3 Vevo & Tseries videos 720x240 not working |
|
Using this way but no sound 720 any way to get link 720 with Sound Vevo Videos
|
|
@scut-salmon Don’t you give that URL as input? You should already have it. Or am I misunderstanding your question? |
Can i just extract youtube video download url but not download ?
Thanks !