Skip to content

zekro-archive/youtube-upload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

~ youtube-upload ~

An node.js script uploading YouTube videos with the Google YouTube API


Setup

Upload Server

Of course, you need the full installation of Node.js and NPM on your system.
(For best results, Node.js >= 8.4 and NPM >= 5.5.1)

  1. Download this repository as zip or clone it with
    $ git clone https://github.com/zekroTJA/youtube-upload.git

  2. You need to install following packages via NPM:
    $ npm i googleapis google-auth-library --save

  3. Now, place the 'client_secrets.json' (Take a look below how to get it) in the same directory as the scripts

  4. Now, insert your location, where the videos will be placed later to upload, if you don't want to place them in the root directory of the scipts.

  5. Now, just place some videos in the configured direcotry and start the script with
    $ node main.js

First time you started sthe script, you need to open the shown path to chose the YouTUbe account you want to upload to, copy the key and enter it into the console.

Then, there will be generated a file named 'google-apis-nodejs-quickstart.json' where those settings are saved for the next startup. IF you want to clear those settings, just delete the file or start the script as following:
$ node main.js clear

  1. Now, all videos in the configured folder will be uploaded to the youtube channel.

Local Client

If you want to use a VPS to upload your videos, you can uplaod multiple videos to the upload server with the upload script in client\copy.sh.

  1. Copy both scripts, client/chipergen.sh and client/copy.sh to your local client (for example a Raspberry Pi).
  2. Create a ssh chipper for automated uploading videos to the VPS:
    $ sh chipergen.sh username@adress
  3. Now, start the copy script and follow the instructions:
    $ sh copy.sh

Of course, the chosen folder on the VPS should be the same like set in the config of the node.js script!


Get Google Credentials File

  1. Go to the Google Api Console
  2. Create a new project in the top left corner nexto the logo
  3. Search for 'YouTube Data API v3' and chose it
  4. Now, click on 'Enable API'
  5. Go to 'Credential' -> 'Create' -> 'OAuth client ID'
  6. Chose 'Other', enter a name and klick 'Create'
  7. Then download the json file with the download button on the right, rename it to client_secrets.json

About

Node.js script to upload videos to youtube

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published