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

Question, Checking downloaded videos and fragments #19209

Closed
latot opened this issue Feb 12, 2019 · 5 comments
Closed

Question, Checking downloaded videos and fragments #19209

latot opened this issue Feb 12, 2019 · 5 comments

Comments

@latot
Copy link

@latot latot commented Feb 12, 2019

Hi all, i have a question about how youtube-dl works, in start for example, when we download a video, anywhere, if we try download it again just finish, because the file is already downloaded, so do nothing.

But how youtube-dl knows the file is right?, is checked?

The same when we download a video, but the video is downloaded in fragments, if we download it again will do nothing, but how can we know if the fragments are right?

I would like to know if youtube-dl have some method or way to check the integrity of the downloaded data.

I don't know this so maybe youtube-dl check the downloaded video with the already downloaded when we try download again, or if not, we will don't download the file again but we will keep the wrong file....

Ty

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 12, 2019

It does not actually know. If a file with target name already exists youtube-dl assumes it was already downloaded.
In general you can't check the integrity cause this requires obtaining some sort of checksum as metadata prior to downloading. Very few services provide such metadata.

@dstftw dstftw closed this Feb 12, 2019
@latot
Copy link
Author

@latot latot commented Feb 12, 2019

u.u

Ty for your response.

Okis, a realted question, i notice when i try download with the option --all-formats youtube-dl was trying to download other links but don't download anything because all the filenames was the same, but i notice the url of all files was different, this happen in iqiyi, maybe the webpage is sotoring multiples formats but all with the same names with differents urls?

Bye!

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 12, 2019

In case of downloading multiple formats of the same video you should provide output template that will guarantee unique filenames for different formats, e.g. by adding format_id.

@latot
Copy link
Author

@latot latot commented Feb 12, 2019

That will works even if is in cache?, i mean youtube-dl to know if a file is downloaded compare the filename provided by the url or the user?

@latot
Copy link
Author

@latot latot commented Feb 12, 2019

and iqiyi seems to be saving the files in the same format mp4, but one mp4 can be in good quality and others not.

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.