diff --git a/README.md b/README.md index b63daf6..18a0c6e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,68 @@ # 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. \ No newline at end of file +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. + +1. 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** + +```json +{ + "title": "Copyright Free Website Videos", + "fullDescription": "Videos for use on web/app development, free of any unnecessary copyright issues.", + "htmlDescription": "
This is a copyright free set of videos for use in development. Enjoy!
", + "category": "DESIGN", + "subcategory": "", + "fee": "01000000", + "preview": "false", + "code": "cfreev", + "videoReference": { + "name": "Q-Video-Service" + }, + "codec": "h264", + "use_nvidia": true +} + +``` + +2. 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. \ No newline at end of file