: add peertube source video file

This commit is contained in:
VC
2024-05-13 22:18:58 +02:00
parent bf622d6989
commit 982dc8b954
8 changed files with 435 additions and 136 deletions

View File

@@ -13,6 +13,7 @@ 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
* if you register the app into your PeerTube instance (optional), you can retrieve the latest video source instead of the highest quality encoded video
* 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)
@@ -46,6 +47,15 @@ Create your `tootube.toml` config file:
```toml
[peertube]
base_url="https://p.nintendojo.fr"
# optional
# allows you to delete the original video source file once its uploaded to YouTube
delete_video_source_after_transfer=true # this option is only available if you have Administrator privileges
# optional
# everything below is given by the register command with --peertube option
[peertube.oauth2]
client_id="<YOUR CLIENT_ID>"
client_secret="<YOUR CLIENT_SECRET"
refresh_token="/var/lib/tootube/refresh_token" # refresh_token are single use only in PeerTube so we need to store it in a separate file
[youtube]
refresh_token="" # leave empty for now
@@ -56,7 +66,19 @@ client_secret="<YOUR CLIENT_SECRET>"
Then run:
```bash
tootube register --config <PATH TO YOUR TOOTUBE.TOML FILE>
tootube register --youtube --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.
If you wish to register `tootube` on PeerTube, you can do so by using:
```bash
tootube register --peertube --config <PATH TO YOUR TOOTUBE.TOML FILE>
```
It will require your username/password (beware that 2FA is not supported for this feature as of now) and generate a first `refresh_token` that you will put inside the aformentioned file:
```bash
echo -n '<REFRESH_TOKEN>' > /var/lib/tootube/refresh_token
```