Updated readme with initial how-to and initial QDN.json structure required for each subfolder's QDN.json file.
2.8 KiB
QDN-automation-scripts
This repo is full of automation scripts for QDN. First script is 're-encode-publish-Q-Tube.py' - a script that publishes folders of videos, after re-encoding if necessary.
###Re-Encode and Publish with 're-encode-publish-Q-Tube.py' python script
what it does is: Re-encodes if necessary, then PUBLISHES entire folders of videos to QDN. Automatically.
- you place the script in a folder (in the folder will be either folders of videos, or videos themselves, or both.
so you can have
folder -QDN.json(optional, adds full automation for each subfolder of videos) -video -video --SUBFOLDER -QDN.json(optional - for automation) -video -video -video
in each folder/subfolder you will have a 'QDN.json' (if you want, if not, it will prompt you to input information about each video...)
QDN.json will contain 'metadata' about the video/publishing....
structured like this... MAKE SURE YOU USE YOUR QORTAL NAME AND INPUT WHATEVER 'CODE' YOU WANT, SHORT IDENTIFIER CODE
{
"title": "Copyright Free Website Videos",
"fullDescription": "Videos for use on web/app development, free of any unnecessary copyright issues.",
"htmlDescription": "<p>This is a <strong>copyright free</strong> set of videos for use in development. Enjoy!</p>",
"category": "DESIGN",
"subcategory": "",
"fee": "01000000",
"preview": "false",
"code": "cfreev",
"videoReference": {
"name": "Q-Video-Service"
},
"codec": "h264",
"use_nvidia": true
}
- You then run the script
python3 re-encode-publish-QDN.py
The script will:
-
Go through the folders/subfolders
-
Look for QDN.json in each folder/subfolder
-
Find videos
-
ask whether you would like to use QDN.json if found
- if you say YES it will use it, if you say NO it will ask you to input the required metadata for each video (time-consuming, but fine if you only have a small number of videos.)
-
If you use QDN.json it is fully automated.
-
it will prompt you for base58 private key (which you can obtain via
Base58.encode(reduxStore.getState().app.selectedAddress.seed)
in the browser console, after logging in to the legacy UI via http://localhost:12388 -
script prompts for private key, paste private key it will then ask you about the QDN.json, say YES, and it will be automated the rest of the way. Going through each subfolder and re-encoding IF NECESSARY, then PUBLISHING ALL VIDEOS.
The Script will end up with a folder called 'ORIGINALS' in each sub-folder of videos, the original videos will be placed there.
You do NOT need to keep them, you do NOT need to keep the re-encoded videos nor the image files the script creates either. As once you have published to QDN, the videos are still on your computer whether you remove the originals or not.