Code Monkey home page Code Monkey logo

yt-mls's Introduction

yt-mls

YouTube Media Library Server aims to make downloading and updating media libraries easy.

features

  • Download of channels, playlists and videos in mp3 or mp4
  • Download of processed files either individually or entire channels and playlists as a .zip
  • Update of channels and playlists from the library
  • Ingesting folders manually added to downloads folder
  • Watching videos via an embed
  • Listening to song via an embed

what could be added eventually

  • Search function in library

media sources

Currently supported is YouTube but its possible to expand since the download itself is handled by yt-dlp.

deployment

To deploy this app, you need a production-ready WSGI server like Waitress. Do not use the Flask built-in development server.

waitress in truenas jail

The following works in a 13.2 base jail:

$ git clone https://github.com/maxweigner/yt-mls.git
$ cd yt-mls
$ pkg install python39 py39-pip py39-sqlite3 ffmpeg
$ pip install -r requirements.txt
$ pip install supervisord
$ python -m venv venv
$ source venv/bin/activate.csh
$ pip install -r requirements.txt
$ touch supervisord.conf

Put the following into supervisord.conf

[supervisord]

[program:ytmls]
command=/usr/local/bin/python /root/yt-mls/server.py ;
directory=/root/yt-mls ;
autostart=true ;
autorestart=true ;

Run crontab -e and add the following line

@reboot /usr/local/bin/supervisord -c /root/yt-mls/supervisord.conf

Restart the jail and you're done.

configuration

In server.py you can change:

  • PORT
  • MAX_VIDEO_DOWNLOAD_LENGTH_MINUTES

With the default settings, the server will be up and running on port 5000 and will not download videos longer than 10 minutes.

currently not supported

Having the same video in mp3 and mp4 is not possible with how the download process and database work. This includes channels and playlists. The chosen type on initial download dictates what you have.

suboptimal

Downloading as well as updating large playlists or channels can take hours but does not take up a lot of bandwidth. Updating could be sped up but involves either making an own extractor / crawler or an elaborate construct around the existing one provided by yt-dlp. Currently every item gets crawled even if only a handful of new videos got added.

yt-mls's People

Contributors

maxweigner avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.