FRC Video Splitter (Beta)

I’m proud to announce a little project I’ve been working on the past few days called FRC Video Splitter. *( Download the .zip file and run setup.exe to install it on your computer.

Video Splitter is a simple interface for batching the splitting of a large file into many smaller ones, specifically aimed at FRC match video. The aim is to make it easier for people to split an entire day of recording into individual match videos. At it’s core, it’s simply a GUI for generating ffmpeg commands.

Instructions for use:

  1. **Enter the title of the event. **

(“2015 Granite State District Event”)

  1. Browse to the location of the large video file you want to split.

  2. Browse to the folder you want to save the match videos to.

  3. **Enter qualification match information. **
    If the video includes qualification matches, set the numbers of the first and last qualification matches in the large video.

  4. **Enter playoff / elimination match information. **
    If the video includes qualification matches, enter their names (QF#, SF#, F#, SF1-2, etc).

  5. If desired, override the default video length.
    This is set to 3 minutes to give a little wiggle room when inputting the time stamps.

  6. **Click the “Generate Timestamp Table” button. **
    Video Splitter will generate a table of all the matches you indicated on the right.

  7. **Enter time stamp information. **
    This is the part I couldn’t automate. You’ll have to scrub through your video and enter the start time of each match in the HH:MM:SS format. It’s not too painful. I’m able to scrub through an entire day of matches in about 20 min.

  8. Click "SPLIT VIDEOS"
    and sit back and watch the magic.


  • This currently only works in windows. I wrote it in C# because I’m not very good with python GUIs yet.

  • You’ll need to have FFmpeg installed and located at C:\ffmpeg.exe. (Download here)

  • Make sure you have enough disk space on the drive you’re saving videos to.

  • This is in beta.

This looks awesome and really useful!

If you want a basis from cross-platform support, I’ve got a command line python script that does basically the same thing on my GitHub. It works almost exactly the same way - read the time data from a csv file, send ffmpeg commands to split it, upload to youtube, add to a playlist, and generate a CSV file to copy/paste into the TBA Video Spreadsheet.

Cool tool!

On speeding up the time stamping process:
You might be able to pull use an excel sheet, and say the Match Timestamps from

If you get your recording computer clock lined up with the FMS computer…

Does the new FMS Api report timestamps in seconds?

Or use recognition of the match sounds…

That’s what I was gonna suggest since the sound of the transition from Auton to Teleop has a “unique” sound signature that should be easily identifiable. Or maybe not I’ve never done anything related to analyzing audio. Let us know if it works out if you attempt it.

I’ll definitely use it for this year. It’s going to be crazy driving, and directing my little freshman video crew I trained earlier this year. So anything with organizing video will help. When I do it myself it’s easy to know which one is which because I make mental notes. When there’s 4 other kids using my equipment I don’t know what file is which and these kind of programs help. I’ll use this in conjunction with plural eyes to organize everything.

I tried installing this but I got an error when running the setup, I’ve included a copy of the error log file below. Not sure if it’s the program or if I installed ffmpeg wrong (dragged the executable into “C:”).

	Windows 			: 6.1.7601.65536 (Win32NT)
	Common Language Runtime 	: 4.0.30319.34209
	System.Deployment.dll 		: 4.0.30319.34244 built by: FX452RTMGDR
	clr.dll 			: 4.0.30319.34209 built by: FX452RTMGDR
	dfdll.dll 			: 4.0.30319.34244 built by: FX452RTMGDR
	dfshim.dll 			: 4.0.41209.0 (Main.041209-0000)

	Deployment url			: file:///C:/Users/*MyUsername*/Downloads/FRC-Video-Splitter-master/FRC-Video-Splitter-master/FRCVideoSplitter.application
	Application url			: file:///C:/Users/*MyUsername*/Downloads/FRC-Video-Splitter-master/FRC-Video-Splitter-master/Application%20Files/FRCVideoSplitter_1_0_0_0/FRCVideoSplitter.exe.manifest

	Deployment Identity		: FRCVideoSplitter.application, Version=, Culture=neutral, PublicKeyToken=6f52f40a19a9655d, processorArchitecture=msil

	* Installable application.

	Below is a summary of the errors, details of these errors are listed later in the log.
	* Activation of C:\Users\*MyUsername*\Downloads\FRC-Video-Splitter-master\FRC-Video-Splitter-master\FRCVideoSplitter.application resulted in exception. Following failure messages were detected:
		+ Application manifest has either a different computed hash than the one specified or no hash specified at all. 
		+ File, FRCVideoSplitter.exe.manifest, has a different computed hash than specified in manifest.

	No transaction error was detected.

	There were no warnings during this operation.

	* [3/3/2015 11:38:11 PM] : Activation of C:\Users\*MyUsername*\Downloads\FRC-Video-Splitter-master\FRC-Video-Splitter-master\FRCVideoSplitter.application has started.
	* [3/3/2015 11:38:11 PM] : Processing of deployment manifest has successfully completed.
	* [3/3/2015 11:38:11 PM] : Installation of the application has started.

	Following errors were detected during this operation.
	* [3/3/2015 11:38:11 PM] System.Deployment.Application.InvalidDeploymentException (HashValidation)
		- Application manifest has either a different computed hash than the one specified or no hash specified at all. 
		- Source: System.Deployment
		- Stack trace:
			at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath)
			at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, Uri& appSourceUri, String& appManifestPath)
			at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
			at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
			at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
			at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
		--- Inner Exception ---
		System.Deployment.Application.InvalidDeploymentException (HashValidation)
		- File, FRCVideoSplitter.exe.manifest, has a different computed hash than specified in manifest.
		- Source: System.Deployment
		- Stack trace:
			at System.Deployment.Application.ComponentVerifier.VerifyFileHash(String filePath, Hash hash)
			at System.Deployment.Application.ComponentVerifier.VerifyFileHash(String filePath, HashCollection hashCollection)
			at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath)

	No transaction information is available.

And then use computer vision to automatically detect which match it is.

Ah. I’ve had that hash issue on other programs. I’ll work on the fix.

I think I fixed the manifest hash error. Github was modifying the file during pushes which messed with the computed hash. I told git not to mess with those files.

Try downloading again and installing.

Hi all,

I figured out how to add ffmpeg.exe as a resource. You no longer need to download it!

I think using computer vision to show when to mark the end of a match would be good too. I’ve seen archived matches where they don’t show the final score.

If you can’t detect the beginning of a match sound I think that labeling the start of the match ‘X’ seconds before the unique auto/teleop sound would work well too.

This is a tough call. You want to show the final score, but sometimes there’s that 5-10 minute delay while the refs talk confer. You could cut that out, but that’s a lot of manual labor and would be a great target for automation.

Yes, cutting out the time when the refs/scorekeepers are doing their thing would be better. You could then automate it by saying match start = 10 seconds before noise, match end =2 minutes after noise (or whatever the correct timings are) and then if the difference between that and the scoreboard screen is larger than 20 seconds or so flag it for manual review or even automate it more to delete that time inbetween…

So I’ve finally had some time to play around with this and I must say I’m very impressed with the speed and simplicity of using this program. I’m even more happy (and a bit surprised) that it’s compatible with .flv files (the native output of our stream software).

One idea on the whole scoreboard discussion; can ffmpeg merge video clips? If it can, you could just add another (optional) timestamp column to the match list for scoreboard appearance times, then take like a 10 second video clip (or for that matter just a still image would work) from that point and tack it on to the end of the match video.

Just a thought.

Instead of getting crazy with sound or video recognition you could add in FRC or TBA API calls to get the match score, then generate a PNG or JPG image with all the info, then append that to the end of the match video as a still image slide for a few seconds.

This is a pretty great idea. The FRC API includes actual match start time in its Results endpoint (we’ll add it into TBA if this ever happens).

I bet you could manually sync the video with the actual times by entering them both for the first match, then have a script calculate the rest of match start times using the API, then cut out the next ~2:30.

This actually seems really feasible. If I get the chance today, I’ll try and integrate that into my python scripts

Is autoStartTime accurate to seconds?

And more!

➜  phil@fedora ~ frc-api\?tournamentLevel\=qual\&matchNumber\=1
{"Matches":{"autoStartTime":"2015-03-06T04:19:49.573","description":"Qualification 1","level":"Qualification","matchNumber":1,"scoreRedFinal":63,"scoreRedFoul":0,"scoreRedAuto":6,"scoreBlueFinal":122,"scoreBlueFoul":0,"scoreBlueAuto":6,"Teams":{"teamNumber":3949,"station":"Red1","dq":false},{"teamNumber":4001,"station":"Red2","dq":false},{"teamNumber":3360,"station":"Red3","dq":false},{"teamNumber":5580,"station":"Blue1","dq":false},{"teamNumber":4069,"station":"Blue2","dq":false},{"teamNumber":1114,"station":"Blue3","dq":false}]}]}% 

Precise, yes. Accurate, who knows. :stuck_out_tongue: