249
submitted 2 months ago* (last edited 2 months ago) by ArtVandelay@lemmy.world to c/selfhosted@lemmy.world

Hi everyone, I decided there simply were not enough docker apps for downloading Youtube videos, and so I made the situation worse :p

In all seriousness, I couldn't find one that fulfilled all my desires in a YT downloader, so I wrote my own in python using pytubefix and streamlit. It's still fairly rough, but it works, and i'd love to get your feedback. Installation is just a simple docker compose.

services:
    pytube-gui:
        container_name: pytube-gui
        image: artisanbytecrafter/pytube-gui:develop
        ports:
            - 8501:8501
        volumes:
            - /path/to/downloads:/app/downloads # set to where you want downloads to go

Please let me know if you run into any issues, or have any feedback. I do still have a long list :)

Source code: https://codeberg.org/ArtisanByteCrafter/pytube-gui

top 36 comments
sorted by: hot top controversial new old
[-] RootBeerGuy@discuss.tchncs.de 61 points 2 months ago* (last edited 2 months ago)

Would be nice if you could elaborate what exactly you did different than all the others?

Edit: jeez, guys. It was just a question since they said "none of the others met their needs" so I was interested in that? Did that sound that rude? I am not a native English speaker, so I am not sure now. They are completely OK to ignore my question. But cool, will not ask that again and ignore such posts in the future.

[-] ArtVandelay@lemmy.world 7 points 2 months ago

You're ok, it's a fair question. The initial want arose from my son asking me to download YT videos for him to watch offline, and the various youtube-dl, yt-dlp, pytube, etc based solutions all being in various stages of broken, due to how youtube always changes things on their end. I chose an underlying library (pytubefix) that seems to be fast in updating when YT breaks things. Nothing in my app is revolutionary on never seen before, except maybe the ability to choose and combine the exact stream you want, i'm not sure. I took everything I liked in various solutions and put them together to work how i wanted. Then I though maybe someone else might like it too, so i shared it :) I work on it when i want to and just kinda go in the direction i want.

[-] RootBeerGuy@discuss.tchncs.de 2 points 2 months ago

Thank you! Also thanks for not getting discouraged to answer by all this comment mess.

[-] cheddar@programming.dev 4 points 2 months ago
[-] ArtVandelay@lemmy.world 3 points 2 months ago

I am a data scientist, so i know python i guess is my only answer lol. I do love rust as a consumer, but I'm definitely not a full scale programmer.

[-] N0x0n@lemmy.ml 34 points 2 months ago

While I'm not able to give it a try right now (just woke up, need to get ready for work...) I just wanna thank you for sharing your work and contributing to the community !!

It looks neat and simple :) !!!

[-] ArtVandelay@lemmy.world 1 points 2 months ago
[-] countstex@feddit.dk 13 points 2 months ago

I'll have to check this out. By any chance can you give it a Playlist and have it monitor it for changes and auto-download any new entries?

[-] Scrath@lemmy.dbzer0.com 6 points 2 months ago

yt-dlp supports downloading playlists. By using the --archive option it can save all downloaded video ID's into a text file and will only download videos which are not in that file.

I wrote a docker container with a friend that uses that mechanism to auto download new videos every time it is triggered using cron. The configuration is a bit rough though and there is no gui so if this supports that part as well I might switch.

[-] countstex@feddit.dk 2 points 2 months ago

I have some batch jobs on my windows machine that do it, so I guess I could go to the trouble of building my own container to run them, was just looking for an easy way out ;)

[-] ArtVandelay@lemmy.world 3 points 2 months ago

Playlist support is on the roadmap. I want to make sure existing functionality is solid first, and then i'd like to include this feature. There's an issue in the tracker for it too.

[-] countstex@feddit.dk 1 points 2 months ago

Excellent, we will watch your career with great interest! ;)

[-] clay_pidgin@sh.itjust.works 2 points 2 months ago

That's a great idea. YouTube doesn't have RSS feeds, does it?

[-] willya@lemmyf.uk 4 points 2 months ago

Not outright displayed but you can find them in the source code.

[-] EddyBot@discuss.tchncs.de 2 points 2 months ago* (last edited 2 months ago)

you might be interested in pinchflat or tubearchivest which are made for this task

[-] Rooki@lemmy.world 13 points 2 months ago

Works pretty good but basic error handling is missing. I made a issue and a PR for it already. My first try at streamlit.

[-] ArtVandelay@lemmy.world 2 points 2 months ago

Thanks, looking over the PR now and testing it locally, should be good to merge very soon.

[-] Rooki@lemmy.world 1 points 2 months ago

About https://codeberg.org/ArtisanByteCrafter/pytube-gui/issues/7 Would it be ok if i try the playlist integration or do you want to do your things first?

[-] BearOfaTime@lemm.ee 11 points 2 months ago

I decided there simply were not enough docker apps for downloading Youtube videos, and so I made the situation worse :p

You get my upvote for this alone!

[-] cron@feddit.org 10 points 2 months ago

Is it possible to submit a channel and download all the videos (also new videos when they are released).

[-] grehund@lemmy.world 4 points 2 months ago

TubeArchivist sounds like a better fit for that.

[-] cron@feddit.org 3 points 2 months ago* (last edited 2 months ago)

A simple cron job with youtube-dl works also fine.

Edit: But thanks for your suggestion! I'll take a look

Edit 2: TubeArchivist looks nice, but way over my personal needs. Also, its performance requirements are quite high for my small server (4 Cores, 4 GB RAM). I'll keep my small, scripted solution (yt-dl + store to nextcloud folders).

[-] ArtVandelay@lemmy.world 1 points 2 months ago

I have playlist support now, but that's all so far.

[-] JackGreenEarth@lemm.ee 7 points 2 months ago

I use Seal on Android and yt-dlp-gui on Linux because they're native apps using native theming/design languages, but it's always cool to have another option!

[-] Landless2029@lemmy.world 6 points 2 months ago

+1 for yt-dlp

[-] griD@feddit.org 5 points 2 months ago
[-] ArtVandelay@lemmy.world 3 points 2 months ago

Thank you! The tables are indeed sortable by clicking the column headers. I do this with the underlying streamlit dataframe, I don't believe they support styling the columns, but i'm not 100% sure. Feedback noted on the download button, the border is a remnant of a form submission that gradually got removed so now it's just a form of one button. One of my chief goals was to avoid scrolling as much as possible.

[-] finitebanjo@lemmy.world 3 points 2 months ago* (last edited 2 months ago)

Idea for an unrelated browser extension:

Add like 5-6 reccomended videos with similar tags for a platform other than YT to the top of YT Reccomendations.

For people who want to spend less time on YT but dont want to spend more time searching.

[-] Appoxo@lemmy.dbzer0.com 3 points 2 months ago

I like the [Max Quality] option. Much fancy, very wow.

[-] StorageAware@lemmings.world 2 points 2 months ago

Looks interesting! Might give it a go later to check it out.

[-] aldalire@lemmy.dbzer0.com 1 points 2 months ago

Wow, thank you kind sir 😊

this post was submitted on 10 Sep 2024
249 points (98.4% liked)

Selfhosted

40347 readers
226 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS