A Youtube Uploader with FRC in mind.
Python HTML
Permalink
Failed to load latest commit information.
Thumbnails
webpage
.gitignore
.travis.yml
LICENSE.md
README.md
TBA.py
addTBAToDescription.py
addtoplaylist.py
client_secrets.json
form_values.csv
requirements.txt
start.py
start.py-oauth2-spreadsheet.json
tbaAPI.py
test.py
updatePlaylistThumbnails.py
updateThumbnail.py
youtubeAuthenticate.py
youtubeup.py

README.md

FRC-CLI-YouTube-Uploader

Build Status

A YouTube Uploader with FRC Matches in mind.

Current Feature Set:

  • Asynchronous Upload Videos (single or batch uploads possible)
  • Add to a YouTube Playlist
  • Include match results from TBA in description
  • Add videos links to The Blue Alliance automatically
  • Mostly Automated, Non-Blocking Web Interface
  • Saves and Reads form values to and from CSV

How to Setup

  1. Install Python 2.7 for your OS with the PATH added and make sure there are no other versions of python.
  2. Clone this repository into the folder that will contain the videos
  3. Install the requirements for the script with pip install -r /path/to/requirements.txt
  4. Add the thumbnail to the same folder as thumbnail.png
  5. Make your recording program follow this naming scheme: [EVENT_NAME] - [MATCH TYPE] ex. 2016 Indiana State Championship - Qualification Match 1. Also use the Tiebreaker scheme when necessary.
  6. Start the program by running start.py and navigating to localhost:8080 in your browser
  7. Add in the necessary info.
  8. Hit submit everytime a match finishes. No need to update Match Number unless you are entering eliminations.
  9. Enjoy not having to deal with YouTube's front end 🎉

Web UI Breakdown

alt text

I focused on simplicty and usability. All the necessary details fit into one small space allowing you to easily place this anywhere on your screen without needing to see all of it.

Match File Locations

You can now pick whether the match files are in the same folder as the scripts or the one above. Default is one above.

Production Team/Facebook Name/Twitter Handle/Website Link

Constants that used to be in the script it self, you can now edit them as you see fit without going into the code.

Event Name

You can name this as you wish, but it should also be used at the start of every video filename. Generally includes [YEAR] [NAME OF EVENT]

Event Code

Find this at TheBlueAlliance in the address bar of the event page. It generally follows [YEAR][EVENT_CODE] format such as 2016arc or 2016incmp.

Playlist ID

You can find the playlist ID on the playlist page's web address. Every playlist ID starts with PL making them easy to identify.

TBA Event ID/Secret

Both of these must be obtained by contacting TBA at contact@thebluealliance.com for the keys to your event. If your event is not on TBA I suggest you just uncheck the Use The Blue Alliance checkbox and not worry.

Video Description

The description used in the program is fairly lengthy, but adds a lot of info that can be nice to have. The usual description is found in youtubeup.py

Match Number

Fairly self-explanatory, just remember to reset the value when you go into each stage of playoffs. This value will increment each time you press "Submit" so you can forget about updating it after every match.

Last Match Number

If you want to batch upload a number of files you can do so with this. Every match between Match Number and this number inclusive will be uploaded and added to TBA. It will then replace this textbox with the original string and update Match Number to the last match uploaded + 1.

If you are still in need of assistance, feel free to contact me.

Credits

  • Google - Authentication and Video Uploading
  • Phil Lopreiato - TBA Integration
  • Wes Jordan - Python TBA API Layer (https://github.com/Thing342/pyTBA)
  • Stack Exchange - Bug Fixes

Extra Scripts

updatePlaylistThumbnails.py

This script expects two inputs, a playlist ID (--pID) and a thumbnail file name (--tnail). It will then update every the thumbnails of every video in that playlist to the one you provide. This makes it simple to update older playlists with a new thumbnail so you can keep your look consistent.

addTBAToDescription.py

addTBA will add match information to the video description retroactively. This script runs similarly to start.py. You start it with python addTBAToDescription.py and navigate to localhost:8080 to use to script. You have to provide the video url, event code, and match code. Future goal is to add title to this

These scripts are not used within start.py