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

Does downloading videos in chunks help improve download success rates? #1044

Open
teddy171 opened this issue Jan 11, 2025 · 5 comments
Open
Labels
feature request New feature or request

Comments

@teddy171
Copy link

describe the feature you'd like to see

According to #1040 and #1039, youtube either blocking or intentionally breaking streams at random points so the video fail to be downloaded. In this case, it's impossible to download any video larger than 100MB. I wonder if cobalt download videos in chunks can deal with the situaion. If video is divided to several chunks in small size(such as 10MB), cobalt doesn't need to give up all chunks when the stream break. If this is a possible solution, I'll try to make a PR to achieve the feature.

additional context

No response

@teddy171 teddy171 added the feature request New feature or request label Jan 11, 2025
@wukko
Copy link
Member

wukko commented Jan 11, 2025

cobalt already downloads videos in chunks. if you're talking about HLS (for youtube), it can be enabled in settings: https://cobalt.tools/settings/video#youtube-hls

@teddy171
Copy link
Author

But why did cobalt's download speed become 0 after sometime's download. If it's caused by heavy downloads, is it better to resume, wait for a while, and then continue downloading?

@teddy171
Copy link
Author

Another possible solution is only download a part of video(such as 50MB) each time. If a part encounters the error, just that part should be redownloaded instead of all the file.

@wukko
Copy link
Member

wukko commented Jan 11, 2025

i’m not sure that you understand why this is happening in the first place, so i’ll try to explain:

after some time, usually closer to the end of the stream, googlevideo starts returning 403 with no actual data. the stream won’t ever return anything but 403 from this point, so you have to request the entire video info again to continue downloading or start over. there’s no solution to this as far as we’re aware, but you’re welcome to make a pull request that follows our contribution guidelines and doesn’t break anything else.

hls is not affected by this, however, and we’ll soon make it default.

@teddy171
Copy link
Author

In my case, after using hls, the situation becomes better, but it still cannot download a complete video. Around 100MB, the download process stops.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants