Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different results for different countries #4101

Closed
ayushhgoyal opened this issue Nov 4, 2014 · 6 comments
Closed

Different results for different countries #4101

ayushhgoyal opened this issue Nov 4, 2014 · 6 comments

Comments

@ayushhgoyal
Copy link

@ayushhgoyal ayushhgoyal commented Nov 4, 2014

I am getting correct results on my local machine (India) while when I installed in on Amazon Web Services (Oregon) and executed the command, returned results are different. Moreover, its not working.
Testing url: http://www.youtube.com/watch?v=TvngY4unjn4
Command: youtube-dl --extract-audio --get-url http://www.youtube.com/watch?v=TvngY4unjn4

Returned URL should stream properly in browser.

Result (India-local) [WORKING]: https://r2---sn-ci5gup-qxal.googlevideo.com/videoplayback?id=4ef9e0638ba78e7e&itag=141&source=youtube&requiressl=yes&mm=31&mv=m&ms=au&gcr=in&ratebypass=yes&mime=audio/mp4&gir=yes&clen=8817223&lmt=1412655816692966&dur=276.526&upn=Ypz0gw157Ys&fexp=923360,930666,931349,932404,939977,939981,940620,947209,947215,948124,952302,952606,952901,953912,957103,957201&key=dg_yt0&sver=3&signature=28774F9E1B819EBCBBFE86E39835C0067DF9129E.6505788B1ABB322573D6A8FD5DA2679E38C20E09&mt=1415131505&ip=122.161.214.58&ipbits=0&expire=1415153198&sparams=ip,ipbits,expire,id,itag,source,requiressl,mm,mv,ms,gcr,ratebypass,mime,gir,clen,lmt,dur

Result (Oregon-AWS) [NOT WORKING]: https://r12---sn-nx57yn76.googlevideo.com/videoplayback?id=4ef9e0638ba78e7e&itag=141&source=youtube&requiressl=yes&ms=au&mv=m&gcr=us&mm=31&ratebypass=yes&mime=audio/mp4&gir=yes&clen=8817223&lmt=1412655816692966&dur=276.526&signature=80970117208C6285BFC22CA7F1489589175B92DB.53CFCC8B0CA09C8C255F42ADF196CF574629FA7F&sver=3&mt=1415131228&fexp=901466,904732,905639,908549,917000,930666,932404,947209,947215,948124,951821,952302,952901,953761,953912,957103,957201&upn=Kfz_SbeNpxQ&key=dg_yt0&ip=54.201.52.201&ipbits=0&expire=1415152921&sparams=ip,ipbits,expire,id,itag,source,requiressl,ms,mv,gcr,mm,ratebypass,mime,gir,clen,lmt,dur

ANY help is appreciated.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Nov 4, 2014

Could you explain what's the exact problem? Can you download the video from the same server?

If you are trying to download/stream the url you get on AWS in your computer, that may not work (YouTube locks the url to a specific ip).

@ayushhgoyal
Copy link
Author

@ayushhgoyal ayushhgoyal commented Nov 4, 2014

Oh I didn't know about ip-locking by youtube. Thanks.
Then how are we supposed to download/stream url on requesting device? It will be always be locked to AWS ip.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Nov 4, 2014

youtube-dl only extracts url valid for the computer running it (as your browser would do), so you'll need to download the videos on you server and download from it.

@jaimeMF jaimeMF closed this Nov 4, 2014
@ayushhgoyal
Copy link
Author

@ayushhgoyal ayushhgoyal commented Nov 4, 2014

Alright, thank you.

@phihag
Copy link
Contributor

@phihag phihag commented Nov 4, 2014

Note that this depends on the service in question. There are numerous services where a URL extracted from one computer just happens to work from another computer as well (until recently, even YouTube fell into this category when the initial request came via IPv6).

@ayushhgoyal
Copy link
Author

@ayushhgoyal ayushhgoyal commented Nov 5, 2014

We are concerned about youtube only. Now I can understand why some URLs worked some didn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.