mxpv / podsync

Turn YouTube or Vimeo channels, users, or playlists into podcast feeds
MIT License
1.52k stars 266 forks source link

Most downloads seem to be failing ( error="failed to execute youtube-dl: exit status 1) #236

Closed richardwarriner closed 2 years ago

richardwarriner commented 3 years ago

I had a few of these recently but now it seems to be everything.

It finds the download ok then spends many minutes trying to download it and eventually throwing these errors.

Runing these versions: date="2020-10-17T23:50:21Z" version=2.4.0 1:43:26+01:00] using youtube-dl 2021.06.06 INFO[2021-10-12T11:43:26+01:00] found ffmpeg: ffmpeg version 4.4-full_build-www.gyan.dev Copyright (c) 2000-2021 the

Error: INFO[2021-10-12T12:53:38+01:00] downloading episodes page_size=30 INFO[2021-10-12T12:53:38+01:00] download count: 2 INFO[2021-10-12T12:53:38+01:00] ! downloading episode https://youtube.com/watch?v=8uLzRDExhBk episode_id=8uLzRDExhBk index=0 ERRO[2021-10-12T13:03:38+01:00] youtube-dl error: C:\Users\server\AppData\Local\Temp\podsync-126304288\8uLzRDExhBk.%(ext)s error="failed to execute youtube-dl: exit status 1" ERRO[2021-10-12T13:03:38+01:00] [youtube] 8uLzRDExhBk: Downloading webpage [download] Destination: C:\Users\server\AppData\Local\Temp\podsync-126304288\8uLzRDExhBk.f137.mp4 [download] 35.4% of 97.63MiB at 59.59KiB/s ETA 18:04 INFO[2021-10-12T13:03:38+01:00] ! downloading episode https://youtube.com/watch?v=uK-0Yndxmss episode_id=uK-0Yndxmss index=1

AdamCurtisVT commented 3 years ago

I believe it's due to the 10 minute default timeout and downloads being extremely slow over the past couple of days. I just tested this by changing the timeout from 10 minutes to 60 and my downloads are now succeeding.

richardwarriner commented 3 years ago

@AdamCurtisVT Do you have a solution to this? I am now back to watching everything on YouTube as I can't get anything to download. Where is the timeout setting?

AdamCurtisVT commented 3 years ago

In the /pkg/ytdl/ytdl.go file there is a constant that defines how long the download timeout is. I downloaded the source, changed it from 10 minutes to 60, and recompiled. I let it run overnight and it seems to have fixed all my issues.

const ( DefaultDownloadTimeout = 10 * time.Minute UpdatePeriod = 24 * time.Hour )

richardwarriner commented 3 years ago

@AdamCurtisVT Thanks. I notice on the main podsync github page it mentions a timeout option in the [downloader] section of the config. I have changed this in the hope it will help. How easy is it to do a new build? I am a c# programmer so not a noob but I have no idea where to start with go

fqx commented 3 years ago

https://github.com/ytdl-org/youtube-dl/issues/29326 It seems that YouTube-DL is outdated.

AdamCurtisVT commented 3 years ago

@richardwarriner I tried to modify the config file setting but it didn't work in my particular case, hopefully it works better for you! I'm a C# dev too and it was pretty easy to modify the source and compile it. From start to finish it took less than 10 minutes and that includes downloading the runtime and figuring out how to compile it.

@fqx That was one of the first things I tried, but mine was already up to date.

richardwarriner commented 3 years ago

I tried this and it works at full speed https://github.com/yt-dlp/yt-dlp

I renamed the exe to youtube-dl.exe and it seems to work (for now anyway)

This project is being maintained unlike youtube-dl

fqx commented 3 years ago

I tried this and it works at full speed https://github.com/yt-dlp/yt-dlp

Do you know how to do this in docker.

richardwarriner commented 3 years ago

Sorry no - I know more about brain surgery than docker

fqx commented 3 years ago

Good news, I have build a working docker image with yt-dlp, get it with

docker pull ghcr.io/fqx/podsync-with-yt-dlp:latest

https://github.com/fqx/podsync-with-yt-dlp/pkgs/container/podsync-with-yt-dlp

deyangchu commented 3 years ago

Good news, I have build a working docker image with yt-dlp, get it with

docker pull ghcr.io/fqx/podsync-with-yt-dlp:latest

https://github.com/fqx/podsync-with-yt-dlp/pkgs/container/podsync-with-yt-dlp

It would be greatly helpful for me as a Synology NAS user if you could push this to Docker Hub. The Github link seems to be hard to apply on Synology docker GUI...

fqx commented 3 years ago

@deyangchu You can refer to this post. Docker Hub seems needing a paid account to publish image there.

Rpsl commented 3 years ago

https://github.com/mxpv/podsync/issues/237

deyangchu commented 3 years ago

@deyangchu You can refer to this post. Docker Hub seems needing a paid account to publish image there.

Worked like a charm! Thanks!

IkeC commented 3 years ago

Good news, I have build a working docker image with yt-dlp, get it with

docker pull ghcr.io/fqx/podsync-with-yt-dlp:latest

https://github.com/fqx/podsync-with-yt-dlp/pkgs/container/podsync-with-yt-dlp

This works great, thanks!

derdide commented 3 years ago

After a bit of fiddling, I managed to properly try it with yt-dlp and I confirm the above, this works quite well.

One question though: in the config.toml, there is a section about the downloader that proposes to update youtube-dl every 24hrs. I assume this would not work with yt-dlp - worst case, it overwrites with the normal (and older) version of youtube.dl, mid-case, it doesn't update when yt-dlp gets updated.

So I put the option to false, but is there a way to get it to work? (I assume a wget in the crontab would do but this is not what I am looking for)

Rpsl commented 3 years ago

@derdide you can stay it in true because selfupdate doing by self binary of youtube-dl (yt-dlp in our case)

https://github.com/mxpv/podsync/blob/c1130f3f9748ce2153b29f65ecc3e065d678baaf/pkg/ytdl/ytdl.go#L122

derdide commented 2 years ago

@Rpsl thanks!