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

Possibility to pipe downloaded file to Django response #11011

Closed
nlhkh opened this issue Oct 23, 2016 · 6 comments
Closed

Possibility to pipe downloaded file to Django response #11011

nlhkh opened this issue Oct 23, 2016 · 6 comments

Comments

@nlhkh
Copy link

@nlhkh nlhkh commented Oct 23, 2016

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like that [x])
  • Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.10.21.1. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2016.10.21.1

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

Description of your issue, suggested solution and other information

I am using youtube_dl with Django. Currently I have youtube_dl download files to a temporary location, and send that file to a request. I wonder if I can somehow stream the file directly to the client without having to materialize a file on disk. This is possible with node_ytdl_core because NodeJS has good support for async operation and pipeline. I can also do this with Java.

I think this is doable if youtube_dl exposes a stream object programmatically, but I have not yet found out how to do so.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Oct 23, 2016

Use -o - with subprocess.Popen?

@nlhkh
Copy link
Author

@nlhkh nlhkh commented Oct 23, 2016

Could you elaborate? I thought -o is just to indicate a final filename template.

@nlhkh
Copy link
Author

@nlhkh nlhkh commented Oct 23, 2016

I guess -o - will pipe the file content to stdout?

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Oct 23, 2016

I guess -o - will pipe the file content to stdout?

Yes you're right.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Nov 8, 2016

No feedback for a long time, so I assume things are working fine. Feel free to leave comments if there's still something wrong.

@yan12125 yan12125 closed this Nov 8, 2016
@nlhkh
Copy link
Author

@nlhkh nlhkh commented Nov 8, 2016

Thanks :)

On 8 Nov 2016, at 16.08, Yen Chi Hsuan notifications@github.com wrote:

No feedback for a long time, so I assume things are working fine. Feel free to leave comments if there's still something wrong.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #11011 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/ADTJWGjRb92DIVTM-ofld4FGCiO-i1sAks5q8IJGgaJpZM4KeQST.

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.