Skip to content
This repository has been archived by the owner on Sep 28, 2020. It is now read-only.

Audio download performance compared to youtube-dl #64

Closed
ghost opened this issue Jun 28, 2014 · 6 comments
Closed

Audio download performance compared to youtube-dl #64

ghost opened this issue Jun 28, 2014 · 6 comments

Comments

@ghost
Copy link

ghost commented Jun 28, 2014

youtube-dl, the Python equivalent version for downloading YouTube videos, takes a few seconds to download a video with the same id for audio extraction. YoutubeExtractor spends about 65 seconds on my computer. 99% of the time was spent in VideoDownloader.Execute() method.

youtube-dl: http://rg3.github.io/youtube-dl/
Usage command: youtube-dl --extract-audio --audio-format mp3 http://www.youtube.com/watch?v=O3UBOOZw-FE

The link used by youtube-dl (ip removed):

https://r18---sn-5hnezne7.googlevideo.com/videoplayback?signature=0714AF3FEC2ACC7BCBF90995A77F1DABBE446036.CEFE593E7BE214EDF987D14EC25E1ED93D7DBFB4&sparams=clen%2Cdur%2Cgir%2Cid%2Cip%2Cipbits%2Citag%2Clmt%2Cpbr%2Cpfa%2Cpm_type%2Crequiressl%2Csource%2Cupn%2Cexpire&fexp=902408%2C910207%2C924222%2C929203%2C930008%2C931331%2C934024%2C934030%2C948201%2C948701&mws=yes&ipbits=0&ip=xx.xxx.xx.xx&lmt=1392296545675827&pbr=yes&itag=140&pfa=10s&id=o-AGQXdDWfgzh5SV113D_PjE7SBZBpEGAHjagbstIDtGku&mv=m&upn=acy4qp28vVg&pm_type=static&key=yt5&clen=4116948&requiressl=yes&source=youtube&dur=259.181&expire=1404003600&sver=3&mt=1403981504&gir=yes&ms=au&ratebypass=yes

The link used by YoutubeExtractor (ip removed):

http://r3---sn-5hn7sn7k.googlevideo.com/videoplayback?sver=3&expire=1404000000&fexp=902408,924222,930008,931021,933906,934024,934030,938633,948113&ms=au&signature=D9D9A9F3363A26B2B04141FA720CC25D083D1D65.9C530F348751D7AF6947B490CE9331E41206F9E3&id=o-AIPsuFPbPdjuhBQ29RZaDLfkvetVnk_wVx_YFGNANi3t&itag=5&mv=m&ipbits=0&mws=yes&sparams=id,ip,ipbits,itag,source,upn,expire&source=youtube&upn=F7SdoBYczJ4&mt=1403977932&key=yt5&ip=xx.xxx.xx.xx

@j-mie
Copy link

j-mie commented Oct 24, 2014

+1 for this

@j-mie
Copy link

j-mie commented Oct 24, 2014

Looks to do with the "&ratebypass=yes" on the end of the link

@ghost
Copy link
Author

ghost commented Dec 23, 2014

Just tested, throwing '&ratebypass=yes' to the end of the download url drastically improves performance

@ghost
Copy link
Author

ghost commented Dec 23, 2014

I made a small test program to compare the performance
For a 4.6mb file (the .mp4 at 128kbps of this video: https://www.youtube.com/watch?v=Qpl7XU9sLfs) the difference is huge. Average is about 1s with the extra query parameter and about 77 without it.
screen shot 2014-12-23 at 2 46 39 pm

@ghost
Copy link
Author

ghost commented Dec 23, 2014

I submitted a pull request with the change here #94

@flagbug
Copy link
Owner

flagbug commented Jan 16, 2015

Should be fixed with version 0.10.5

@flagbug flagbug closed this as completed Jan 16, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants