Go to Post Patience, grasshopper. They'll get to it. - Rick TYler [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 14 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 03-03-2015, 16:17
Ty Tremblay's Avatar
Ty Tremblay Ty Tremblay is online now
Robotics Engineer
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2004
Location: Alton NH
Posts: 840
Ty Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond repute
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.
__________________
Reply With Quote
  #2   Spotlight this post!  
Unread 03-03-2015, 16:54
plnyyanks's Avatar
plnyyanks plnyyanks is online now
Data wins arguments.
AKA: Phil Lopreiato
FRC #1124 (The ÜberBots), FRC #2900 (The Mighty Penguins)
Team Role: College Student
 
Join Date: Apr 2010
Rookie Year: 2010
Location: NYC/Washington, DC
Posts: 1,114
plnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond repute
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.
__________________
Phil Lopreiato - "It's a hardware problem"
Team 1124 (2010 - 2013), Team 1418 (2014), Team 2900 (2016)
FRC Notebook The Blue Alliance for Android
Reply With Quote
  #3   Spotlight this post!  
Unread 03-03-2015, 17:23
Conor Ryan Conor Ryan is offline
I'm parking robot yacht club.
FRC #4571 (Robot Yacht Club)
Team Role: Mentor
 
Join Date: Nov 2004
Rookie Year: 2004
Location: Midtown, NYC
Posts: 1,895
Conor Ryan has a reputation beyond reputeConor Ryan has a reputation beyond reputeConor Ryan has a reputation beyond reputeConor Ryan has a reputation beyond reputeConor Ryan has a reputation beyond reputeConor Ryan has a reputation beyond reputeConor Ryan has a reputation beyond reputeConor Ryan has a reputation beyond reputeConor Ryan has a reputation beyond reputeConor Ryan has a reputation beyond reputeConor Ryan has a reputation beyond repute
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?
Reply With Quote
  #4   Spotlight this post!  
Unread 03-03-2015, 18:29
MikeE's Avatar
MikeE MikeE is offline
Wrecking nice beaches since 1990
no team (Volunteer)
Team Role: Engineer
 
Join Date: Nov 2008
Rookie Year: 2008
Location: New England -> Alaska
Posts: 381
MikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond repute
Re: FRC Video Splitter (Beta)

Quote:
Originally Posted by Conor Ryan View Post
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...
__________________
no stranger to the working end of a pencil
Reply With Quote
  #5   Spotlight this post!  
Unread 03-03-2015, 19:11
Bluman56's Avatar
Bluman56 Bluman56 is online now
Mentor Without Borders
AKA: Nikita
FRC #2579
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Brooklyn
Posts: 151
Bluman56 is a jewel in the roughBluman56 is a jewel in the roughBluman56 is a jewel in the roughBluman56 is a jewel in the rough
Re: FRC Video Splitter (Beta)

Quote:
Originally Posted by MikeE View Post
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.
Reply With Quote
  #6   Spotlight this post!  
Unread 03-03-2015, 19:24
Sperkowsky's Avatar
Sperkowsky Sperkowsky is offline
Professional Multitasker
AKA: Samuel Perkowsky
FRC #2869 (Regal Eagles)
Team Role: Leadership
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Bethpage, NY
Posts: 1,904
Sperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond repute
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.
Reply With Quote
  #7   Spotlight this post!  
Unread 04-03-2015, 00:47
cbale2000's Avatar
cbale2000 cbale2000 is offline
Registered User
AKA: Chris Bale
FRC #5712 (Gray Matter)
Team Role: Mentor
 
Join Date: Apr 2006
Rookie Year: 2004
Location: Saginaw, MI
Posts: 947
cbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond repute
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.
Reply With Quote
  #8   Spotlight this post!  
Unread 04-03-2015, 01:07
Eugene Fang's Avatar
Eugene Fang Eugene Fang is offline
The Blue Alliance
no team
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Bay Area, CA -> Pittsburgh, PA
Posts: 771
Eugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond repute
Re: FRC Video Splitter (Beta)

Quote:
Originally Posted by MikeE View Post
Or use recognition of the match sounds...
And then use computer vision to automatically detect which match it is.
#automation
__________________
Eugene Fang
2010 Silicon Valley Regional Dean's List Finalist

Various FLL Teams - Student (2000-2006), Mentor (2007-2010)
FRC Team 604 - Student (2007-2010), Mentor/Remote Advisor (2011-2015)
FRC Team 1323 - Mentor/Remote Advisor (2011-2014)

The Blue Alliance | TBA GameDay | TBA Android App
Reply With Quote
  #9   Spotlight this post!  
Unread 04-03-2015, 07:10
Ty Tremblay's Avatar
Ty Tremblay Ty Tremblay is online now
Robotics Engineer
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2004
Location: Alton NH
Posts: 840
Ty Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond repute
Re: FRC Video Splitter (Beta)

Ah. I've had that hash issue on other programs. I'll work on the fix.
__________________
Reply With Quote
  #10   Spotlight this post!  
Unread 04-03-2015, 09:22
Ty Tremblay's Avatar
Ty Tremblay Ty Tremblay is online now
Robotics Engineer
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2004
Location: Alton NH
Posts: 840
Ty Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond repute
Re: FRC Video Splitter (Beta)

Quote:
Originally Posted by cbale2000 View Post
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.
__________________
Reply With Quote
  #11   Spotlight this post!  
Unread 05-03-2015, 10:41
Ty Tremblay's Avatar
Ty Tremblay Ty Tremblay is online now
Robotics Engineer
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2004
Location: Alton NH
Posts: 840
Ty Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond repute
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!
__________________
Reply With Quote
  #12   Spotlight this post!  
Unread 09-03-2015, 08:42
Alex_Miller's Avatar
Alex_Miller Alex_Miller is offline
2175 College Mentor
AKA: Alex Miller
FRC #2175 (The Fighting Calculators)
Team Role: College Student
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Minnesota
Posts: 78
Alex_Miller is an unknown quantity at this point
Send a message via AIM to Alex_Miller Send a message via MSN to Alex_Miller
Re: FRC Video Splitter (Beta)

Quote:
Originally Posted by Eugene Fang View Post
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.
__________________
Reply With Quote
  #13   Spotlight this post!  
Unread 09-03-2015, 10:13
Ty Tremblay's Avatar
Ty Tremblay Ty Tremblay is online now
Robotics Engineer
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2004
Location: Alton NH
Posts: 840
Ty Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond repute
Re: FRC Video Splitter (Beta)

Quote:
Originally Posted by Alex_Miller View Post
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.
__________________
Reply With Quote
  #14   Spotlight this post!  
Unread 09-03-2015, 13:47
Alex_Miller's Avatar
Alex_Miller Alex_Miller is offline
2175 College Mentor
AKA: Alex Miller
FRC #2175 (The Fighting Calculators)
Team Role: College Student
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Minnesota
Posts: 78
Alex_Miller is an unknown quantity at this point
Send a message via AIM to Alex_Miller Send a message via MSN to Alex_Miller
Re: FRC Video Splitter (Beta)

Quote:
Originally Posted by Ty Tremblay View Post
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...
__________________
Reply With Quote
  #15   Spotlight this post!  
Unread 09-03-2015, 14:29
cbale2000's Avatar
cbale2000 cbale2000 is offline
Registered User
AKA: Chris Bale
FRC #5712 (Gray Matter)
Team Role: Mentor
 
Join Date: Apr 2006
Rookie Year: 2004
Location: Saginaw, MI
Posts: 947
cbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond reputecbale2000 has a reputation beyond repute
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.

Last edited by cbale2000 : 09-03-2015 at 14:31.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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