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

Default example from docs not working correctly. #63

Open
YegorStolyarov opened this issue Jul 6, 2023 · 5 comments
Open

Default example from docs not working correctly. #63

YegorStolyarov opened this issue Jul 6, 2023 · 5 comments

Comments

@YegorStolyarov
Copy link

Description

OS: Ubuntu 22.04.2 LTS
Executing following code:

#[tokio::main]
async fn main() {
    let url = "https://www.youtube.com/watch?v=Edx9D2yaOGs&ab_channel=CollegeHumor";
    println!("downloaded video to {:?}", [path](rustube::download_best_quality(&url).await.unwrap())
}

downloads and saves the video as expected, but freezes and println line not triggered

Version

rustube 0.6.0
@CodingForing
Copy link

CodingForing commented Jul 22, 2023

I think its due to slow download speed.
Try use 'rustube::download_worst_quality' instead of 'rustube::download_best_quality' and give it a few minutes.
I am pretty sure you will get the printed text.
Is your video working till end? Or it freezes?

@jjaacckk
Copy link

Hi @CiderSlime, were you able to find a solution? I am having the same issue with the default example (and my own code). It downloads the video perfectly and I can watch it, but the code after the awaited download never executes and the program hangs. Thanks!

@TylerHext
Copy link

I think this is slow download speed, as @CodingForing mentioned. I thought the example program hung for me as well, but I came back and let it run and it just takes ~6min to download a 12min video at lowest quality.

Screen Shot 2023-11-22 at 1 26 10 PM

@jjaacckk Just confirming you're certain you can watch the entire video start to finish and the program still doesn't complete? How long are you waiting?

@jjaacckk
Copy link

@TylerHext Hi! I don't have my computer with me at the moment, but from what I remember I was able to download the entire video, but the program seemed to hang and I would just exit manually. I definitely left it for a while, but I will do another test later tonight.

I was also trying to download about 10 YT videos (just audio) simultaneously, and I had an issue where the some of the files were missing a good chunk of the audio. For example if the song was 3 minutes it would only have about a minute of audio after I exited manually.

I will test again and let you know!

@jjaacckk
Copy link

Hi @TylerHext, I'm sorry I never got around to doing that until now. I tried with just audio and it does download the file, but it takes ~90 seconds.

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

No branches or pull requests

4 participants