Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   General Forum (http://www.chiefdelphi.com/forums/forumdisplay.php?f=16)
-   -   FRC Video Splitter (Beta) (http://www.chiefdelphi.com/forums/showthread.php?t=135417)

Ty Tremblay 03-03-2015 16:17

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. I've hosted the code on GitHub. 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")
  2. Browse to the location of the large video file you want to split.
  3. Browse to the folder you want to save the match videos to.
  4. Enter qualification match information. If the video includes qualification matches, set the numbers of the first and last qualification matches in the large video.
  5. Enter playoff / elimination match information. If the video includes qualification matches, enter their names (QF#, SF#, F#, SF1-2, etc).
  6. If desired, override the default video length. This is set to 3 minutes to give a little wiggle room when inputting the time stamps.
  7. Click the "Generate Timestamp Table" button. Video Splitter will generate a table of all the matches you indicated on the right.
  8. 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.
  9. Click "SPLIT VIDEOS" and sit back and watch the magic.

Notes:
  • 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.

plnyyanks 03-03-2015 16:54

Re: FRC Video Splitter (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.

Conor Ryan 03-03-2015 17:23

Re: FRC Video Splitter (Beta)
 
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 http://frc-events.usfirst.org/2015/FLFO/qualifications

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

Does the new FMS Api report timestamps in seconds?

MikeE 03-03-2015 18:29

Re: FRC Video Splitter (Beta)
 
Quote:

Originally Posted by Conor Ryan (Post 1452966)
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 http://frc-events.usfirst.org/2015/FLFO/qualifications

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...

Bluman56 03-03-2015 19:11

Re: FRC Video Splitter (Beta)
 
Quote:

Originally Posted by MikeE (Post 1453021)
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.

Sperkowsky 03-03-2015 19:24

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.

cbale2000 04-03-2015 00:47

Re: FRC Video Splitter (Beta)
 
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:\").


Code:

PLATFORM VERSION INFO
        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)

SOURCES
        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

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

APPLICATION SUMMARY
        * Installable application.

ERROR SUMMARY
        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.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
        No transaction error was detected.

WARNINGS
        There were no warnings during this operation.

OPERATION PROGRESS STATUS
        * [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.

ERROR DETAILS
        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)

COMPONENT STORE TRANSACTION DETAILS
        No transaction information is available.


Eugene Fang 04-03-2015 01:07

Re: FRC Video Splitter (Beta)
 
Quote:

Originally Posted by MikeE (Post 1453021)
Or use recognition of the match sounds...

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

Ty Tremblay 04-03-2015 07:10

Re: FRC Video Splitter (Beta)
 
Ah. I've had that hash issue on other programs. I'll work on the fix.

Ty Tremblay 04-03-2015 09:22

Re: FRC Video Splitter (Beta)
 
Quote:

Originally Posted by cbale2000 (Post 1453199)
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:\").

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.

Ty Tremblay 05-03-2015 10:41

Re: FRC Video Splitter (Beta)
 
Hi all,

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

Alex_Miller 09-03-2015 08:42

Re: FRC Video Splitter (Beta)
 
Quote:

Originally Posted by Eugene Fang (Post 1453214)
And then use computer vision to automatically detect which match it is.
#automation



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.

Ty Tremblay 09-03-2015 10:13

Re: FRC Video Splitter (Beta)
 
Quote:

Originally Posted by Alex_Miller (Post 1455378)
I've seen archived matches where they don't show the final score.

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.

Alex_Miller 09-03-2015 13:47

Re: FRC Video Splitter (Beta)
 
Quote:

Originally Posted by Ty Tremblay (Post 1455410)
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...

cbale2000 09-03-2015 14:29

Re: FRC Video Splitter (Beta)
 
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.


All times are GMT -5. The time now is 21:48.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi