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

what about migrate to yt-dlp? #237

Closed
Rpsl opened this issue Oct 15, 2021 · 24 comments
Closed

what about migrate to yt-dlp? #237

Rpsl opened this issue Oct 15, 2021 · 24 comments

Comments

@Rpsl
Copy link
Contributor

Rpsl commented Oct 15, 2021

Several weeks ago i stoped to get updates from podsync because youtube-dl (2021.06.06) can download video only on very slow speed (about 50kb/s). It was repeateble on several pc's in another locations.

While i do little research i try migrate my instance to https://github.com/yt-dlp/yt-dlp and it was work perfect. Also that have many additional features.

@mxpv what do you think about migrate from youtube-dl to yt-dlp?

FROM alpine:3.10

WORKDIR /app/
RUN wget -O /usr/bin/youtube-dl https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp && \
    chmod +x /usr/bin/youtube-dl && \
    apk --no-cache add ca-certificates python3 py3-pip ffmpeg tzdata
COPY podsync /app/podsync

ENTRYPOINT ["/app/podsync"]
CMD ["--no-banner"]
@psyciknz
Copy link

Does that new binary just drop in to a new container, or does the code need to change as well? (of which when I tried playing with the code got a bit stuck not knowing golang #238 )

I've noticed really slow downloads as well.

@psyciknz
Copy link

So I've worked out a new dockerfile that preforms a build of go first (I don't have the language). And have successfully built with your referred to yt-dlp. - holy hell it's so much faster.

I'd also started adding for my own interest telling Plex to update but that code failed. But I backed that out and just left the changes to the downloaded.

@derdide
Copy link

derdide commented Oct 25, 2021

Hi, for an existing podsync instance that stopped working, do I understand properly from OP that you just install yt-dlp into the existing youtube-dl directory (the wget -O /usr/bin/youtube-dl https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp command) and... that's basically it?

(I'm running podsync through CLI on Raspbian)

@sutr90
Copy link

sutr90 commented Oct 27, 2021

@derdide On standalone installation I have successfully tested creating softlink called youtube-dl aimed at yt-dlp. Podsync does not care and the download went through without a problem.

@derdide
Copy link

derdide commented Nov 2, 2021

@sutr90 sorry for the late reply, it took me a while to figure out what I was doing wrong - on Raspbian, youtube-dl is located in /usr/local/bin/ - so your wget above was working but was useless... I got it right now and yes, the DL speed is far better.

@murmelbahn
Copy link

Several weeks ago i stoped to get updates from podsync because youtube-dl (2021.06.06) can download video only on very slow speed (about 50kb/s). It was repeateble on several pc's in another locations.

While i do little research i try migrate my instance to https://github.com/yt-dlp/yt-dlp and it was work perfect. Also that have many additional features.

@mxpv what do you think about migrate from youtube-dl to yt-dlp?

FROM alpine:3.10

WORKDIR /app/
RUN wget -O /usr/bin/youtube-dl https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp && \
    chmod +x /usr/bin/youtube-dl && \
    apk --no-cache add ca-certificates python3 py3-pip ffmpeg tzdata
COPY podsync /app/podsync

ENTRYPOINT ["/app/podsync"]
CMD ["--no-banner"]

Can you give me a hint to make this work on the docker container?

@Rpsl
Copy link
Contributor Author

Rpsl commented Nov 16, 2021

@murmelbahn just replace Dockerfile and build image.

@murmelbahn
Copy link

@murmelbahn just replace Dockerfile and build image.

Sorry for the maybe dump question but how do I do this? I cloned the repo and replacec the content of the Dockerfile with your Dockerfile. When I run docker build . I get the following error message:

Step 4/6 : COPY podsync /app/podsync
COPY failed: file not found in build context or excluded by .dockerignore: stat podsync: file does not exist

I dont know how to pass this error:(

@psyciknz
Copy link

You need the binary for podsync. Go compiles it. The dockerfile as written needs a compiled binary to make the container.

@murmelbahn
Copy link

Aaah, thank you. That was the missing piece;) Now its working.

tuxpeople added a commit to tuxpeople/docker-podsync that referenced this issue Nov 28, 2021
@mxpv mxpv modified the milestone: 3.0 Jan 2, 2022
@LewisSpring
Copy link

Hi @mxpv , is this still planned?
Youtube-DL performs very badly compared to YT-DLP on slow internet connections, and it's quite complicated to compile an image manually according to Comment #1.

Cheers

@distbit0
Copy link

distbit0 commented May 2, 2022

Yeah having this supported by default would be excellent! Also being able to configure the default timeout value of yt-dlp to something other than 10 mins would be excellent 👍 Thanks :)

@mxpv
Copy link
Owner

mxpv commented May 9, 2022

Yes, will I'll take a look, but PRs are welcome :)

@LewisSpring
Copy link

Yes, will I'll take a look, but PRs are welcome :)

I'm not too experienced with the code here, but isn't the only thing that needs changing the Dockerfile? Does the rest of the code depend on YT-DL specifically? YT-DLP should be fully pin-compatible otherwise.

@distbit0
Copy link

distbit0 commented May 9, 2022

Yeah tbh after doing some experimentation, I realised it is very easy to fix this problem on my end. I simply installed yt dlp to the same location as I would usually install the YouTube-dl binary, so it is activated by calls to YouTube-dl.

I also figured out that compiling podsync code is as simple as typing "make" into the terminal of the project folder (this should probs be stated in the readme.md file :), so I was able to adjust the time out value from 10 mins to 35 mins which has significantly improved my download success rate.

@pagdot
Copy link
Contributor

pagdot commented Jun 8, 2022

Yes, will I'll take a look, but PRs are welcome :)

Can do a PR. Easiest would be to just update the Dockerfile to download the yt-dlp binary, but name it youtube-dl to prevent regressions. This could also be done with a different docker image tag. e.g. mxpv/podsync:yt-dlp (=latest) and mxpv/podsync:yt-dlp-2.4.1

Else podsync could embrace yt-dlp and recommend it over youtube-dl with probably a new major version number because it would be a breaking change. This would involve a bigger refactor to yt-dlp.

@Th0masL
Copy link
Contributor

Th0masL commented Jul 9, 2022

FYI, the PR to start using yt-dlp has just been merged, so podsync will start using it starting the next release.

@skofieldO5
Copy link

Several weeks ago i stoped to get updates from podsync because youtube-dl (2021.06.06) can download video only on very slow speed (about 50kb/s). It was repeateble on several pc's in another locations.

While i do little research i try migrate my instance to https://github.com/yt-dlp/yt-dlp and it was work perfect. Also that have many additional features.

@mxpv what do you think about migrate from youtube-dl to yt-dlp?

FROM alpine:3.10

WORKDIR /app/
RUN wget -O /usr/bin/youtube-dl https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp && \
    chmod +x /usr/bin/youtube-dl && \
    apk --no-cache add ca-certificates python3 py3-pip ffmpeg tzdata
COPY podsync /app/podsync

ENTRYPOINT ["/app/podsync"]
CMD ["--no-banner"]

hey! I'm also having trouble with youtube-dl and I would like to try yt-dlp but I barely know what I'm doing here. Could you provide me with more details on how to do what you did? would be great. thanks

@LewisSpring
Copy link

@skofieldO5 I’m not sure on the ETA of the next release, but if you wait until then YT-DLP will be built in.

@skofieldO5
Copy link

@LewisSpring oh cool! Well I really don't care if it is youtube-dl or yt-dlp.
I tried installing all kind of versions of youtube-dl and got different error message. Right now my log looks like this:

"^[[36mINFO^[[0m[2022-07-15T17:48:55Z] ! downloading episode https://youtube.com/watch?v=0MIkxQDTuqA  ^[[36mepisode_id^[[0m=0MIkxQDTuqA ^[[36mindex^[[0m=4
^[[31mERRO^[[0m[2022-07-15T17:48:56Z] youtube-dl error: /tmp/podsync-901732990/0MIkxQDTuqA.%(ext)s  ^[[31merror^[[0m="failed to execute youtube-dl: exit status 1"
^[[31mERRO^[[0m[2022-07-15T17:48:56Z] [youtube] 0MIkxQDTuqA: Downloading webpage
ERROR: 0MIkxQDTuqA: YouTube said: Unable to extract video data"

Any help with that would be great. I would like to surprise them that I turned their channel into a podcast ;)

@pagdot
Copy link
Contributor

pagdot commented Jul 16, 2022

@skofieldO5 Do you run it in docker or another way? If in docker, you need an image with yt-dlp included (e.g. the one from Th0masL (th0masl/podsync:ytdlp) or hack it into the image (I use a custom entrypoint script to handle the modification)

Either way, podsync does only supports binaries called youtube-dl. So you need to rename or add a symlink if you use a fork/variant

@skofieldO5
Copy link

@pagdot thanks! I made it work with a symlink.

@Simon818
Copy link

I see this issue hasn't had any activity for over a year, does the current release use yt-dlp? The documentation still says youtube-dl. I see there is a fork of it by another developer which does use yt-dlp, but it hasn't been updated since December and I would rather stick to the official repo. I can just run without Docker but I'd prefer not to.

@mxpv
Copy link
Owner

mxpv commented Oct 22, 2023

Current version uses yt-dlp

RUN wget -O /usr/bin/yt-dlp https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp && \

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