Through my experience running live streams in Indiana and PNW over the last 4 years, I have worked to streamline the streaming and archiving process as much as possible. One of the biggest bottlenecks in the process has been the tedious process of uploading matches to YouTube, which consumes at least one volunteer’s day and leaves everybody wondering why a computer can’t do it. For the longest time we have just had someone do it by copying the information from a text file for every form field.
I got fed up with that and have developed a Python tool that automatically uploads videos to youtube with relevant information including playlists, tags, description, and custom thumbnails. The tool is also integrated with TBA to add alliance members and scores to the description, as well as adding videos to the respective matches on the event’s TBA page.
I have been developing this tool for the past few months and after testing at two Indiana events it is time to move to a closed beta test with the goal of a finished product before the 2017 competition season. I am looking for a few events who would be interested in testing the software in the coming weeks. The only requirement is that the event have a method to capture individual match videos and save them to local media. For example, PNW and Indiana use Blackmagic Design’s H.264 Encoder and Media Express to do this because they can specify the filename and automatically increment the match number.
If you would like to participate drop me a PM and we can discuss getting it setup for your event.
Otherwise, feel free to ask questions and look over the code. If anyone has experience packaging for pip let me know cause I could really use some help with that.
V2.1 (October 17th, 2016):
- New extra script to update old descriptions with TBA match info (Thanks to Hallry for giving me the idea).
- Fix bug that was preventing qf4m1, qf4m2, sf2m1, and sf2m2 from being uploaded.
V2.0 (October 16th, 2016):
-Save form data between uses in case of crashes
Thanks for the support. Be sure to let me know when you use it, I want to try to keep track of every event that makes use of it. If you have any special requests to adapt the program for your schema message me and I can fix it up for you.
Neat looking tool, might have to take a look at it for our event.
It reminds me a lot of the FRC Video Splitter tool that got posted a while back (minus the video splitting part) which also had the ability to upload to YouTube automatically
I’m pretty sure FiM coordinated with TBA this past year to format all of the video titles in such a way that TBA could grab them automatically from the FiM YouTube channel. Might be something to ask the TBA admins about.
It was a bit inspired by Ty’s tool, I liked how he put the match data in the description, so I added that in as a feature (as well as a way to retroactively do it to a playlist). But the rest of it was built almost specifically with how PNW (and thus Indiana) setup their titles, descriptions, tags, and such. Especially the part where we upload as the event is happening.
Interesting, I never heard about that. I guess there is the title matching code that could be used to find matches that used the default schema, but I might have to rewrite it to accept TBA’s format for match_codes. Either way I implemented TBA’s trusted API to write the YouTube links immediately which is probably far more efficient.
This seems really helpful for events. How does it connect to a specific YouTube channel? Does someone have to press submit each time they want to upload a new match or does a script handle this? Is there anything in place to prevent duplicate uploads of the same video?
You can pick any YouTube channel that a Google Account has access to. Google’s OAuth2.0 authentication flow gives you page when you first run the script to pick which channel to upload all videos to.
The program could handle doing that, but I don’t want it to. A measure of human initiation keeps it from unintentionally screwing up. The batch uploading feature does not require human intervention for the set of matches you wish to upload. For example, setting Match Number to 8 and Last Match Number to 12 will upload matches 8, 9, 10, 11, and 12. It will then reset Last Match Number to the default string and update Match Number to Last Match Number + 1, 13 in this case.
There is no way to prevent duplicate uploads other than making sure all your videos are properly named and not using the same settings twice. YouTube only lets a channel know about a duplicate after processing, which the API doesn’t give a response object for.
I have already arranged for the program to be used at Girls Gen. Plus I thought you didn’t do AV.
A bunch of changes have happened since I first posted this thread, so quick change log:
Bug fixes for uploading with TBA integration. There still might be problems because I haven’t had time or files to test with.
Pick the location of match files (currently only current folder and parent folder with full custom location in the works)
Check for file exists before uploading (one problem, the web page still updates if the file doesn’t exist because I never programmed it with this in mind)
THREADED UPLOADS, non-blocking web server. Now the webpage updates even faster at the expense of being able to tell when an upload is finished based on the state of the page. Might revert this change based on the responses I get.
Speed increases, now only takes about 33 seconds to upload a match once you hit submit (tested over a gigabit connection with a 500MB-700MB files)
If you have any problems during your event, please PM me a screenshot of your console immediately so I can get the problems sorted out.