Skip to content

angeloanan/vod-squirrel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wakatime

VOD Squirrel

Archive your favorite Twitch.tv streams to YouTube

VOD Squirrel streamlines the process of downloading Twitch VODs and uploading them to YouTube for archival purposes. It is designed to be fast, efficient, and easy to use.

The app downloads the VOD in parallel chunks, ensuring that the download process is as quick as possible. Once the download is complete, it automatically "joins" the chunks and uploads the VOD to YouTube.

Usage

Prerequisites

An ffmpeg installation is required.

You will need to get a Google OAuth token with https://www.googleapis.com/auth/youtube.upload scope.

The easiest way of doing it is to utilize the Google OAuth 2.0 Playground

Click to see detailed instructions
  1. Visit the Google OAuth 2.0 Playground
  2. On the left navbar, select the YouTube Data API v3 -> https://www.googleapis.com/auth/youtube.upload scope
  3. Click on Authorize APIs
  4. Login / select your Google account and allow the app to access your YouTube account
  5. Once redirected back to the playground, click on "Exchange authorization code for tokens" button
  6. Copy the Access token string. (You might need renavigate to the Step 2 tab to see the access token)

Once you have an access token, set it as the environment variable OAUTH_TOKEN.

Running the App

Download the latest release from the releases page or development build via commit workflows.

If you are on Mac / Linux, allow the app to be run by chmod +x vod-squirrel.

Run the app with the VOD ID / URL you want to archive as an argument

$ ./vod-squirrel https://twitch.tv/videos/123456789

Important

Archiving a long video might fail due to error Too many files open. You can fix this by increasing your system's ulimit for the maximum number of open files (ulimit -n 10240).

You might want to check the OS' global maximum number of open files before setting the ulimit value above (cat /proc/sys/fs/file-max).

You can use the --help flag to get a list of all available options:

$ ./vod-squirrel --help
Downloads a Twitch.tv Video (VOD) and uploads it to YouTube for archival purposes

Usage: vod-squirrel [OPTIONS] <VOD>

Arguments:
  <VOD>  Twitch video ID / URL to process

Options:
  -c, --cleanup                    Cleanups the remnant of the clips afterward [default: true]
  -p, --parallelism <PARALLELISM>  The amount of parallel downloads [default: 20]
      --temp-dir <TEMP_DIR>        Directory where videos are processed (defaults to system's temporary directory)
  -h, --help                       Print help
  -V, --version                    Print version

Monitor Mode

Work in progress.

Building

This project uses Rust and Cargo.

You do not need to have OpenSSL installed to build the project as the project uses the rustls crate to provide TLS support.

To build the project, clone the repository and run cargo build --release.

git clone https://github.com/angeloanan/vod-squirrel.git
cd vod-squirrel
cargo build --release

Motivation

About

🐿️ | Automatically download and archive your favorite Twitch.tv streams to YouTube

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages