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

URL to video file #3583

Closed
KickassCoxa opened this issue Aug 25, 2014 · 1 comment
Closed

URL to video file #3583

KickassCoxa opened this issue Aug 25, 2014 · 1 comment

Comments

@KickassCoxa
Copy link

@KickassCoxa KickassCoxa commented Aug 25, 2014

Hello, i am building small application (API) for youtube-dl and i have several questions about possibility to return video URL for downloading in file.

API set would be:

  1. Dedicated server with Python installed
  2. Client PHP website with possibility for user enter video URL (external server)

Would it be possible to:
For user enter video view URL in Client PHP website, then with Client API functions provided send API request to my DServer, where youtube-dl/Python application would parse URL, access video provider website and get direct video URL, and then return it to Client PHP website where user after URL submition (On next page) would be able to press "download" and then be able to download video file?

Do i need return cookies from my DServer to Client PHP website and then set user cookie?

How could i do that?

Would there be some problems with some providers with this workflow?

If yes, is it legal to download video file to server and then let users to download it, or download-to-stream without storying video file in server?

How could i return direct video URL instead of downloading it server?

Thank you

@phihag
Copy link
Contributor

@phihag phihag commented Aug 25, 2014

That all totally depends on the the video site.

  • For some sites, only the direct URL is enough
  • For others, it won't work without cookies
  • And many providers restrict the download to the IP that extracted it.

So in general, you need to download the video on your server first.

I am not a lawyer, so I cannot answer legal questions. Unless you specify a psasword, youtube-dl only downloads public videos though, and those often cached anyways between users. Many major ISPs also have their own official or unofficial active caching and recompression boxes. I guess it also depends a lot on where you are actually running your server - law can be quite different from country to country.

To allow the video to be downloaded by a client, you must implement the extraction (i.e. run youtube-dl) client-side. Due to security restrictions, this won't work in a web application though.

@phihag phihag closed this Aug 25, 2014
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
2 participants
You can’t perform that action at this time.