twitchvod-youtube
v2.0.9
Published
> Download any public vod from Twitch and automatically upload at YouTube <br /> from 144p to 1080p
Downloads
6
Maintainers
Readme
vodtwitch + YoutubeUploader
Download any public vod from Twitch and automatically upload at YouTube from 144p to 1080p
Install
npm install twitchvod-youtube
# yarn add twitchvod-youtube
Setup YoutubeUploader
install
- Download for your OS from releases.
- Extract it to a directory and add the directory to
PATH
.
get client id
- Create an [account] on [Google Cloud Platform].
- Create a [new project], and select it.
- Enable [YouTube Data API] for the project.
- Add [credentials] to your project.
- Which API are you using?
YouTube Data API v3
. - Where will you be calling the API from?
Web server
. - What data will you be accessing?
User data
. - Select
What credentials do I need?
. - Create an OAuth 2.0 client ID.
- Name:
youtubeuploader
(your choice). - Authorized JavaScript origins:
http://localhost:8080
. - Authorized redirect URIs:
http://localhost:8080/oauth2callback
. - Select
Create OAuth client ID
. - Set up the OAuth 2.0 consent screen.
- Email address: (it should be correct).
- Product name shown to users:
youtubeuploader
(your choice). - Select
Continue
. - Download credentials.
- Select
Download
, thenDone
. - Copy downloaded file (
client_id.json
) to a directory.
get client token
- Open [console] in the above directory.
- Run
youtubeuploader -v client_id.json
. - OAuth page will be opened in browser.
- Choose an account, videos will be uploaded here.
youtubeuploader
wants to access your Google Account.- Select
Allow
, and close browser window. client_token.json
should be created.
reference
youtubeuploader [options]
# --help: show help
# --version: show version
# -l, --log: enable log
# -i, --id: set video id (for update)
# -v, --video: set input video file/URL
# -t, --thumbnail: set input thumbnail file/URL
# -c, --caption: set input caption file/URL
# -m, --meta: set input meta file
# -d, --descriptionpath: set input description file
# -ci, --client_id: set client id credentials path (client_id.json)
# -ct, --client_token: set client token credentials path (client_token.json)
# -ot, --title: set title (video)
# -od, --description: set description (video)
# -ok, --tags: set tags/keywords
# -ol, --language: set language (en)
# -oc, --category: set category (people and blobd)
# -op, --privacystatus: set privacy status (public)
# -oe, --embeddable: enable to be embeddable
# -ol, --license: set license (standard)
# -os, --publicstatsviewable: enable public stats to be viewable
# -opa, --publishat: set publish time
# -ord, --recordingdate: set recording date
# -opi, --playlistids: set playlist ids
# -opt, --playlisttitles: set playlist titles
# -ola, --location_latitude: set latitude coordinate
# -olo, --location_longitude: set longitude coordinate
# -old, --locationdescription: set location description
# -uc, --upload_chunk: set upload chunk size in bytes (8388608)
# -ur, --upload_rate: set upload rate limit in kbps (no limit)
# -ut, --upload_time: set upload time limit ex- "10:00-14:00"
# -ap, --auth_port: set OAuth request port (8080)
# -ah, --auth_headless: enable browserless OAuth process
Usage
It will save to your current directory as {vodID}.mp4
.
NodeJS
const twitchvod = require("twitchvod-youtube");
twitchvod({vodID}, {privacystatus: 'public', log: true, title: `Test title`, description: 'Test description'});
Information
twitchvod-youtube is based on VodTwitch❤️