rustube icon indicating copy to clipboard operation
rustube copied to clipboard

Default example from docs not working correctly.

Open YegorStolyarov opened this issue 1 year ago • 5 comments

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

YegorStolyarov avatar Jul 06 '23 13:07 YegorStolyarov

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?

CodingForing avatar Jul 22 '23 17:07 CodingForing

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!

jjaacckk avatar Sep 15 '23 06:09 jjaacckk

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?

TylerHext avatar Nov 22 '23 21:11 TylerHext

@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 avatar Nov 23 '23 04:11 jjaacckk

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.

jjaacckk avatar Mar 27 '24 20:03 jjaacckk