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

Use yt-dlp instead of youtube-dl #20

Open
DaniloL88s opened this issue Oct 21, 2021 · 6 comments
Open

Use yt-dlp instead of youtube-dl #20

DaniloL88s opened this issue Oct 21, 2021 · 6 comments

Comments

@DaniloL88s
Copy link

How can I switch the download from youtube-dl to yt-dlp?
Is there a re-call into the code to change the directory where the .py search the youtube-dl to download videos/songs?

@anothervictimofsurvivalinstinct

You can do this by replacing youtube-dl with yt-dlp in requirements.txt and replace all instances of youtube_dl with yt_dlp in app.py before building from source
They are interchangeable

@SomKen
Copy link

SomKen commented Mar 10, 2022

You can do this by replacing youtube-dl with yt-dlp in requirements.txt and replace all instances of youtube_dl with yt_dlp in app.py before building from source They are interchangeable

It's not that easy... I'm currently working on converting it to yt-dlp myself. but it's requiring some debugging as variables were renamed.

@anothervictimofsurvivalinstinct
Copy link

anothervictimofsurvivalinstinct commented Mar 10, 2022

It is that easy. What issues are you running into? Every bug report helps. I've been using this config since at least September, i'll be posting my changes here in a little while to my fork seeing as OP is redoing this project in a completely different language, check back in a day if you want and it should be up to date with my changes

@SomKen
Copy link

SomKen commented Mar 10, 2022

I may have just fixed a bug unrelated to my work so excuse my response.

While the flag can exist, the "album" metadata tag is being assumed it exists and this is causing the filenames to fallback to the "default plain file name."

If you look at https://github.com/katznboyz1/youtube-dl-server/blob/master/app.py#L1058, you see a try / catch for collecting the meta data. While this may work for music, it doesn't work for normal videos / channels. I needed to change this line, funny enough, from "album" to "playlist" in order for the file names to work.

I also found that https://github.com/katznboyz1/youtube-dl-server/blob/master/app.py#L1117 caused the merging of the files to never complete because the "default" video format doesn't support AAC. If you remove -c:a aac completely, ffmpeg is able to complete. Without, it RC 1's after failing. Error given in logs stated Only VP8 or VP9 or AV1 video and Vorbis or Opus audio and WebVTT subtitles are supported for WebM. I was attempting to download https://www.youtube.com/watch?v=H1dIGNSV9Ho / using this channel as my subscription test.

@anothervictimofsurvivalinstinct

Ah gotcha. Just a bug with implementation, those would be outside the conversion to yt-dlp. I'll test those changes and add them to my repo. thanks for the info.

@SomKen
Copy link

SomKen commented Mar 10, 2022

Ah gotcha. Just a bug with implementation, those would be outside the conversion to yt-dlp. I'll test those changes and add them to my repo. thanks for the info.

Np. I'm updating this project for myself to add a few things anyways

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

3 participants