Git Product home page Git Product logo

youtube-upload-cli's Introduction

YouTube Upload CLI

Docker Build

Wrapper for https://github.com/porjo/youtubeuploader to upload videos to YouTube via the CLI in a docker container.

Prerequisites

Install the following:

How to use

The example below is a PowerShell command.

docker run --rm -it `
    -v <folder to video file>:/mnt/ `
    -v <folder to client_secrets.json>:/home/ytuploader/.config/youtubeuploader/ `
    ghcr.io/jo-hoe/youtube-upload-cli:latest `
    -filename "/mnt/test.mp4" `
    -title "My Title" `
    -description "My description" `
    -tags "tag1,tag2,tag3"

And below is the same command in bash.

docker run --rm -it \
    -v <directory to video file>:/mnt/ \
    -v <directory to client_secrets.json>:/home/ytuploader/.config/youtubeuploader/ \
    ghcr.io/jo-hoe/youtube-upload-cli:latest \
    -filename "/mnt/test.mp4" \
    -title "My Title" \
    -description "My description" \
    -tags "tag1,tag2,tag3"

First run

When running this for the first time, you need the client_secrets.json file. How to create it is outlined here.

You must perform your OAuth authentication if you do not yet have the request.token file. To create it, you should expose the port 8080. This can be done by adding -p 8080:8080 to the command above. After that, you can access http://localhost:8080 to perform the authentication.

The example be below bind the request.token to the same folder as the client_secrets.json ensure you can cache the token.

For PowerShell:

docker run --rm -it `
    -v <folder to video file>:/mnt/ `
    -v <folder to client_secrets.json>:/home/ytuploader/.config/youtubeuploader/ `
    -p 8080:8080 `
    ghcr.io/jo-hoe/youtube-upload-cli:latest `
    -filename "/mnt/test.mp4" `
    -title "My Title" `
    -description "My description" `
    -tags "tag1,tag2,tag3" `
    -cache "/home/ytuploader/.config/youtubeuploader/request.token"

And for bash:

docker run --rm -it \
    -v <directory to video file>:/mnt/ \
    -v <directory to client_secrets.json>:/home/ytuploader/.config/youtubeuploader/ \
    -p 8080:8080 \
    ghcr.io/jo-hoe/youtube-upload-cli:latest \
    -filename "/mnt/test.mp4" \
    -title "My Title" \
    -description "My description" \
    -tags "tag1,tag2,tag3" \
    -cache "/home/ytuploader/.config/youtubeuploader/request.token"

CLI Commands

For the complete list of commands, see https://github.com/porjo/youtubeuploader/tree/cfb08f55fffb6d19f1d49f8c8a8804d7bc0366a9#usage

Caveats

Youtube Visibility Default

If you use this code the default visibility for your video is private. This will be the default for any video uploaded via API. You can change this by completing an audit by Youtube.

Youtube Upload Limit

Youtube limits the amount of calls you can do per day. One upload counts for 1.600 credit. And the default quota is 10.000 credits. It works out to ~6 video uploads per day. You can checkout your current quota here. One may apply for a quota increase here.

youtube-upload-cli's People

Contributors

jo-hoe avatar

Stargazers

KenWu avatar

Watchers

 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.