diff --git a/README.md b/README.md index 2be7b5a..57b4d3e 100644 --- a/README.md +++ b/README.md @@ -13,13 +13,58 @@ Search in your package manager, otherwise use ``pip install --upgrade`` - python-magic - requests-toolbelt +## Configuration + +Edit peertube_secret and youtube_secret.json with your credentials. + +### Peertube +Set your credentials, peertube server URL. +You can set ``OAUTHLIB_INSECURE_TRANSPORT`` to 1 if you do not use https (not recommended) + +### Youtube +Youtube uses combination of oauth and API access to identify. + +**Credentials** +The first time you connect, prismedia will open your browser to as you to authenticate to +Youtube and allow the app to use your Youtube channel. +**It is here you choose which channel you will upload to**. +Once authenticated, the token is stored inside the file ``.youtube_credentials.json``. +Prismedia will try to use this file at each launch, and re-ask for authentication if it does not exist. + +**Oauth**: +The default youtube_secret.json should allow you to upload some videos. +If you plan an larger usage, please consider creating your own youtube_secret file: + +- Go to the [Google console](https://console.developers.google.com/). +- Create project. +- Side menu: APIs & auth -> APIs +- Top menu: Enabled API(s): Enable all Youtube APIs. +- Side menu: APIs & auth -> Credentials. +- Create a Client ID: Add credentials -> OAuth 2.0 Client ID -> Other -> Name: prismedia1 -> Create -> OK +- Download JSON: Under the section "OAuth 2.0 client IDs". Save the file to your local system. +- Save this JSON as your youtube_secret.json file. + ## How To Currently in heavy development -Support only mp4 for cross compatibily between Youtube and Peertube +Support only mp4 for cross compatibility between Youtube and Peertube + +Simply upload a video: + +``` +./prismedia_upload.py --file="yourvideo.mp4" +``` + +Specify description and tags: + +``` +./prismedia_upload.py --file="yourvideo.mp4" -d "My supa description" -t "tag1,tag2,foo" +``` + +Use --help to get all available options: ``` -./prismedia_upload.py -h +./prismedia_upload.py --help prismedia_upload - tool to upload videos to Peertube and Youtube Usage: @@ -31,7 +76,7 @@ Options: --name=NAME Name of the video to upload. [default: video filename] -d, --description=STRING Description of the video. [default: default description] -t, --tags=STRING Tags for the video. comma separated - -c, --category=STRING Category for the videos, see below. [ default: Films] + -c, --category=STRING Category for the videos, see below. [default: Films] --cca License should be CreativeCommon Attribution (affects Youtube upload only) -p, --privacy=STRING Choose between public, unlisted or private. [default: private] --disable-comments Disable comments (Peertube only) [default: comments are enabled]