← Back to context

Comment by j45

2 years ago

I almost feel like I should have a backup of my BB liked or saved videos

I recently found ytdl-sub which is basically a metadata wrapper around yt-dlp to help you save videos in a format library software like Plex etc supports. Rather than having some horribly named videos with metadata files just taking up space.

https://github.com/jmbannon/ytdl-sub

  • This looks handy thanks!

    Naming is definitely the hardest problem in coding and file naming.

    Part of me feels like chaining a few of these tools into a docker project.

A dash of yt-dlp and a cron job. If you've got a media server, it's the way to go for subscribing to content you're interested in.

  • The tricky bit is that you have to get your youtube cookie in order for yt-dlp to get your own liked videos. I expect it to be a lot more LoC to authenticate and get the cookie than to do everything else (which is a one-liner in yt-dlp), so I just do it manually once in a while.

      yt-dlp -f "best[height<=480][fps<=30]"+bestaudio --cookies cookies.txt --download-archive archive.txt --all-subs --embed-subs --embed-metadata --merge-output-format mkv --sponsorblock-mark all -o "%(channel)s/(%(upload_date)s) %(fulltitle)s.%(ext)s" "https://www.youtube.com/watch?list=LL"

    • I solved this by making my own "To watch..." playlist which was available to anyone who had the link.

      But I'm one of those "solve the unstable server by rebooting it once a day" guys, so...

    • If you're logged in on a browser on the same machine you can use the --cookies-from-browser option instead of a cookies.txt

    • For all the responses to my post, I’m glad I did

      Lots to dive into.

There's also tube archivist, which is a whole archival front end and back end. Bit more complicated to set up but once you do, you also get a nice web UI of your videos that is similar to YouTube. It even shows comments.