clxxiii / autovod

Automatically upload Twitch VODS in realtime to Youtube. With no video stored on the disk.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AutoVOD Icon

AutoVOD

Releases

This script lets you automatically record and upload broadcasts from Twitch and upload it directly to YouTube. Broadcasts are downloaded in the best quality available, no transcoding, and sent directly to YouTube, meaning no video is stored on the disk and the stream is directly sent back to YouTube.

The script checks every minute if the selected streamer is live, if the streamer is; it starts immediately sending/uploading the stream to YouTube. After the stream is finished, the video gets processed by YouTube and made public.

Table of contents

Standalone Installation

Automatic Installation

sh -c "$(curl -fsSL https://raw.githubusercontent.com/jenslys/autovod/master/install.sh)"

Manual Installation

PM2

apt-get install npm
npm install pm2 -g
pm2 startup

Streamlink

apt-get install python3-pip tar
pip3 install --upgrade streamlink

YouTubeUploader

wget https://github.com/porjo/youtubeuploader/releases/download/22.03/youtubeuploader_22.03_Linux_x86_64.tar.gz
tar -xvf youtubeuploader_22.03_Linux_x86_64.tar.gz && rm youtubeuploader_22.03_Linux_x86_64.tar.gz
mv youtubeuploader_22.03_Linux_x86_64 /usr/local/bin/youtubeuploader

AutoVOD

git clone https://github.com/jenslys/autovod.git
cd autovod

Sample video

wget -c -O sample.mp4 https://download.samplelib.com/mp4/sample-5s.mp4

Setup

Set up your credentials to allow YouTubeUploader to upload videos to YouTube.

  1. Create an account on Google Developers Console
  2. Create a new project
  3. Enable the YouTube Data API (APIs & Auth -> Libary)
  4. Go to the Consent Screen section, setup an external application, fill in your information and add the user/s that are going to be using the app (Channel/s you are uploading videos to). Enable the ".../auth/youtube.upload" scope. Then save.
  5. Go to the Credentials section, click "Create credentials" and select "OAuth client ID", select Application Type 'Web Application'. Add a 'Authorised redirect URI' of http://localhost:8080/oauth2callback
  6. Once created click the download (JSON) button in the list and saving it as client_secrets.json
  7. Getting token from YouTube:
    1. Due to recent changes to the Google TOS, if you are running this utility for the first time and want to run it on a Headless server, you have to first run the tool on your local machine (Somewhere with a web browser)

      youtubeuploader -filename sample.mp4
    2. and then simply copy the token file along with youtubeuploader and client_secrets.json to the remote host.

Note To be able to upload videos as either "Unlisted or Public", you will have to request an API audit from YouTube for your project. Without an audit your videos will be locked as private.

Usage

Define the Twitch Username

This is the name of the Twitch user whose broadcast will be automatically uploaded to YouTube.

export TWITCH_USER=username

Start AutoVOD

pm2 start AutoVOD.sh --name $TWITCH_USER
pm2 save

Check status

pm2 status

Credit

About

Automatically upload Twitch VODS in realtime to Youtube. With no video stored on the disk.


Languages

Language:Shell 100.0%