VC bf0b1c4e3f Merge branch 'refactor_dl_url' into 'master'
refactor: regroup now_kiss and get_dl_video_stream functions

See merge request veretcle/tootube!14
2023-10-17 11:57:48 +00:00
2023-09-29 17:16:47 +02:00
2023-10-03 15:33:41 +02:00
2023-10-03 15:49:57 +02:00
2023-10-16 21:36:41 +02:00

What is it?

This program takes the very last video published on a PeerTube instance and pushes it to a corresponding YouTube channel.

What the status of this?

This is an early prototype not really suited for production purposes for now:

  • it still relies way too much on pre-determined value to upload the video to YouTube
  • it cannot determine the recording date (believe me, I tried!)

So consider this a work in progress that will slowly get better with time.

What does it do exactly?

  • it retrieves the latest PeerTube video download URL from an instance
  • it creates a resumable upload into the target YouTube account
  • it downloads/uploads the latest PeerTube video to YouTube without using a cache (stream-to-stream)

What doesnt it do exactly?

  • it doesnt retrieve ALL the original PeerTube video properties like licences, languages, categories, etc… again: early prototype

Howtos

General usage

Once you fill your tootube.toml config file (see below), you can run tootube like this:

tootube --config tootube.toml --playlist playlist_1 "Things You Might Like"

You can turn on debug using env var RUST_LOG.

Obtain Authorization Token from Google

The complicated part:

  • create an OAuth2.0 application with authorization for Youtube DATA Api v3 Upload and Youtube DATA Api v3 (generally referenced as ../auth/youtube.upload and ../auth/youtube)
  • create a OAuth2.0 client with Desktop client

Youll need:

  • the client_id from your OAuth2.0 client
  • the client_secret from you OAuth2.0 client

Create your tootube.toml config file:

[peertube]
base_url="https://p.nintendojo.fr"

[youtube]
refresh_token="" # leave empty for now
client_id="<YOUR CLIENT_ID>"
client_secret="<YOUR CLIENT_SECRET>"

Then run:

tootube register --config <PATH TO YOUR TOOTUBE.TOML FILE>

Youll be then prompted with all the necessary information to register tootube. Youll end with a refresh_token that you can now paste inside your tootube configuration.

Description
No description provided
Readme WTFPL 140 KiB
Languages
Rust 100%