Git Product home page Git Product logo

hoshinova's Introduction

hoshinova

Monitor YouTube channels and automatically run ytarchive when the channel goes live.

Screenshot

โš ๏ธ Unstable Software: This program is under heavy development. It works, but will still undergo a lot of breaking changes. Upgrade with caution.

Install

Make sure you have ytarchive installed and executable in your PATH.

go install github.com/HoloArchivists/hoshinova@main

You should now have an executable ~/go/bin/hoshinova.

Configure

Copy the config.example.yaml to config.yaml and edit the file as needed.

poll_interval: 60
workdir: /tmp

The poll_interval is how long (in seconds) to wait before checking the channel's RSS feed for new videos. There is no known rate limit for the RSS endpoint so feel free to adjust this parameter.

Workdir is where all temporary files will be stored. Stream fragments, unfinished downloads, etc.

ytarchive configuration

ytarchive:
  path: ytarchive
  quality: best
  flags:
    - '--vp9'
    - '--thumbnail'
    - '--add-metadata'
    - '--threads'
    - '4'
    - '--output'
    - '%(id)s'

By default, the --wait and --merge flags are added. You can add your own flags to use cookies, set the number of threads, etc.

Channel configuration

channels:
  - name: Moona ch.
    id: UCP0BspO_AMEe3aQqqpo89Dg
    filters:
      - '(?i)MoonUtau'
      - '(?i)Karaoke'
      - '(?i)Unarchived'

The channels array contains a list of YouTube channels to monitor. The filters in each channel is a list of regular expressions string. If the title of a stream matches the regex, it will get downloaded. For more information on Go's regex syntax, run go doc regexp/syntax.

In the example above, the (?i) marks the expression as case-insensitive.

Uploader configuration

uploaders:
  - name: My Videos folder
    type: local
    config:
      path: /home/kitsune/Videos
      base_url: http://localhost:3000

After a live stream is finished downloading, it will get "uploaded" to all of the uploaders in the list. Right now, there is only the local uploader, which simply moves the resulting video to the destination directory. The base_url parameter will be useful if path leads to a webserver root.

In the future, this can be expanded to include other services such as Google Drive, S3, etc.

Notifier configuration

notifiers:
  - name: My private server
    type: discord
      webhook_url: 'https://discord.com/api/webhooks/...'

Notifiers can be registered to send a message when the video has been uploaded. Right now, only Discord is supported, but more will be added in the future.

Run

If you used go install,

~/go/bin/hoshinova

hoshinova's People

Contributors

hizkifw 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.