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

Only download the video file without extracting info #972

Closed
Interopnl opened this issue Jul 1, 2013 · 9 comments
Closed

Only download the video file without extracting info #972

Interopnl opened this issue Jul 1, 2013 · 9 comments
Assignees
Labels

Comments

@Interopnl
Copy link

@Interopnl Interopnl commented Jul 1, 2013

Is it prossible to instruct Youtube-dl to only download the video file by providing the video download url and not extracting the video information?

@phihag
Copy link
Contributor

@phihag phihag commented Jul 1, 2013

No, not yet - many features (for example, output template or video format selection) are only useful with information about the video. May I ask what your overarching goal is? How did you get the video URL in the first place?

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jul 1, 2013

If you know only the url and want to save it to a specific file, using python is not difficult, for example:

from youtube_dl import *
ydl = YoutubeDL({'outtmpl':''})
ydl.fd._do_download(u'example.jpeg', {'url':"https://upload.wikimedia.org/wikipedia/commons/3/31/Faro%2C_Puerto_de_la_Cruz%2C_Tenerife%2C_Espa%C3%B1a%2C_2012-12-13%2C_DD_01.jpg"})

But as phihag has said, you can't use the ouput template, for that you need an info_dict with all the information

@Interopnl
Copy link
Author

@Interopnl Interopnl commented Jul 1, 2013

Okay, thanks for your quick reply.

The goal is that once the you have extracted the video information from youtube for example, in a json file, there is no need to roundtrip to youtube again just to download the video file. I would be a nice to have to instruct youtube-dl to use a json file with the extracted video information.

@phihag
Copy link
Contributor

@phihag phihag commented Jul 1, 2013

Oh, that sound's reasonable simple to implement (@jaimeMF already provided an outline we can use, although I'm not sure that it includes post-processing). However, we need to move the cookies to the .info.json first. Just keep following this issue, we'll update it when it gets implemented.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jul 1, 2013

@phihag it just downloads from the url, it's not useful for this case.
It's not hard to implement, once the cookies are read, the only thing that needs to be done is pass the info_dict to ydl.process_info, which will execute post-processors, save subtitles...

@oliverthered
Copy link

@oliverthered oliverthered commented Oct 7, 2013

the bugs I raised #1566 is kid of the reverse process of this since the part file contains the watch url info not the actual video file info but the solution is similar (or could be)

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Oct 7, 2013

I would save the original url (or a simplified one) in the json info, so that we could reobtain the video url if the link has expired, but we would first try to download the already extracted info (to save time).

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Dec 9, 2013

With the last version once you have written the info to a .info.json file with the --write-info-json, you can run youtube-dl --load-info somefilename.info.json and it will use the saved info to download the video.

@jaimeMF jaimeMF closed this Dec 9, 2013
@Interopnl
Copy link
Author

@Interopnl Interopnl commented Dec 9, 2013

Thanks for implementing this!

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
4 participants
You can’t perform that action at this time.