https://github.com/tokland/youtube-upload

Hay también otra alternativa pero no hablaremos de esa en este tutorial: Otra Alternativa: https://github.com/porjo/youtubeuploader

Desde el readme.md: sudo pip install --upgrade google-api-python-client oauth2client progressbar2

wget https://github.com/tokland/youtube-upload/archive/master.zip
unzip master.zip
cd youtube-upload-master
sudo python setup.py install
cd youtube-upload-master
PYTHONPATH=. python bin/youtube-upload ...

O en arch: yay -S youtube-upload


Ahora tenés que crear una aplicación de tipo Desktop, no funciona más crearla como Web Application y no hace falta agregar authorized redirect URI. Solo necesitás client_secrets.txt no el archivo de credentials.

Create an account on the Google Developers Console
Create a new project for this app
Enable the Youtube API (APIs & Services -> Enable APIs and Services -> Click 'ENABLE APIS AND SERVICES' top right). Select 'YouTube Data API v3'
Create OAuth consent screen (APIs & Services -> OAuth Consent Screen)
Add a test user. This can be any Google User account but it should correspond with the Youtube account where videos will be uploaded.
NOOOOOOOOO (No tenés que crear una aplicación web sino un Desktop app): Create Credentials (APIs & Services -> Credentials -> click 'CREATE CREDENTIALS'), select 'OAuth client ID', select 'Web application'
No hace falta agregar URI de callback en un Desktop App: Add an 'Authorized redirect URI' of 'http://localhost:8080/oauth2callback'
Download the client secrets JSON file (click download icon next to newly created client ID) and save it as file client_secrets.json in the same directory as the utility e.g.

Está bien la parte de agregar test users pero no existe más OAuth 2.0 -> Other tenés que agregar un OAuth client pero de aplicación de escritorio (Desktop App)

  • Abrí la consola de Google.
  • Creá un proyecto.
  • Ingresá a APIs & auth -> APIs
  • En menú de arriba: Activá (Enabled) API(s): Enable all Youtube APIs.
  • APIs & auth -> Credentials.
  • Configurá OAuth consent screen
  • Creá un Client ID: Agregá credentials -> OAuth 2.0 Client ID -> Other -> Name: youtube-upload -> Crear -> OK
  • Andá a OAuth consent screen y debajo de Test users dale a agregar usuarios.
  • Descargá el JSON desde “OAuth 2.0 client IDs”. Guardá el archivo.
  • Usá ese JSON como tu archivo de credenciales:
$ youtube-upload \
  --title="A.S. Mutter" \
  --description="A.S. Mutter plays Beethoven" \
  --category="Music" \
  --tags="mutter, beethoven" \
  --recording-date="2011-03-10T15:32:17.0Z" \
  --default-language="en" \
  --default-audio-language="en" \
  --client-secrets="my_client_secrets.json" \
  --playlist="My favorite music" \
  --embeddable=True|False \
  anne_sophie_mutter.flv
tx2Zb-145Yz
--privacy (public | unlisted | private)  
--publish-at (YYYY-MM-DDThh:mm:ss.sZ)  
--location (latitude=VAL,longitude=VAL[,altitude=VAL])  
--thumbnail (string)