RaceReplay video clip montage

Discussions on race preparation, race management, sound effects, and other race related software. This includes freeware, shareware and commercially available software.
Post Reply
kyoo
Journeyman
Journeyman
Posts: 30
Joined: Mon Jan 30, 2012 2:38 pm
Location: Austin, TX

RaceReplay video clip montage

Post by kyoo » Mon Mar 24, 2014 9:53 am

I spent the time to figure it out a few months ago.. I used it again after our derby this weekend.. within an hour, I had all of our derby clips turned into a 7 minute youtube movie..

Here is how to make one of these:


You need ffmpeg.. this script below will take a input filename, and output filename (I just launch it towards a "clips" subdirectory).. then it yanks out just the last 4 seconds of the video.. if you want more or less time, just edit the line:
set /A starttime = VIDEO_LENGTH_S - 4

cut.cmd:

Code: Select all

rem @echo off
set input=%1
set output=%2

ffmpeg -i "%input%" 2> output.tmp

rem search "  Duration: HH:MM:SS.mm, start: NNNN.NNNN, bitrate: xxxx kb/s"
for /F "tokens=1,2,3,4,5,6 delims=:., " %%i in (output.tmp) do (
    if "%%i"=="Duration" call :calcLength %%j %%k %%l %%m
)
goto :EOF

:calcLength
set Var=%3
FOR /F "tokens=* delims=0" %%A IN ("%Var%") DO SET Var=%%A
set /A s=%Var%
set /A s=s+%2*60
set /A s=s+%1*60*60
set /A VIDEO_LENGTH_S = s
set /A VIDEO_LENGTH_MS = s*1000 + %4
echo Video duration %1:%2:%3.%4 = %VIDEO_LENGTH_MS%ms = %VIDEO_LENGTH_S%s

rem ** 2:00 for the start, 4:00 from the end
set /A starttime = VIDEO_LENGTH_S - 4
set /A stoptime = VIDEO_LENGTH_S 
set /A duration = stoptime - starttime
rem --stop-time %stoptime% 
c:\util\ffmpeg -i "%input%" -ss %starttime% -c copy "%output%"
rem "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" -vvv --start-time %starttime% "%input%" --sout=#transcode{vcodec=h264,vb=1200,acodec=mp3,ab=128}:standard{access=file,dst=%output%} vlc://quit
This file is a wrapper around the cut.cmd.. it will process all .avi files in the current directory..
loop.cmd:

Code: Select all

md snips
for %%f in (*.avi) do (
            echo %%~nf
            cut.cmd %%~nf.avi snips\%%~nf.avi
)
A method of manual snipping, should you not want the last 4 seconds of a particular video:

Code: Select all

sample command line to fix non-standard ones:

-ss (starttime)
-t (duration)

ffmpeg -i Outlaws_Round1_Heat3.avi -ss 8 -t 3.2  -c copy snips\Outlaws_Round1_Heat3.avi
Then I used Picasa and point it at the clips directory.. order the clips in the whatever order pleases you.. "Edit the Folder Description" by right clicking on it in Picasa.. then select all the clips and did a Tools->Movie->From Selection.. I set the transition style to "Cut" and Dimensions to 1024x768, and clicked the YouTube button..
Once it processed and uploaded, I went to youtube, and added some ad sponsored audio to it..

Wahlah..

I'd love to see other's videos.. maybe my camera angle isn't the best.. ;)
Last edited by kyoo on Mon Mar 24, 2014 9:08 pm, edited 4 times in total.



Speedster
Pine Head Legend
Pine Head Legend
Posts: 1335
Joined: Sat Feb 18, 2012 2:48 pm
Location: Toledo, Ohio

Re: RaceReplay video clip montage

Post by Speedster » Mon Mar 24, 2014 10:10 am

Very Impressive filming. Nice looking cars.



User avatar
gpraceman
Site Admin
Site Admin
Posts: 4607
Joined: Fri Jun 20, 2003 12:46 am
Location: Highlands Ranch, CO
Contact:

Re: RaceReplay video clip montage

Post by gpraceman » Mon Mar 24, 2014 10:30 am

A couple of things that I noticed from your video. The camera angle was pretty shallow, so it was a bit hard to see how the cars finished. I recommend mounting the camera a bit higher, like below.



Secondly, I noticed a scout at the end of the track waving his hand over the finish sensors. With a Fast Track timer, that is unnecessary. If you are using the mechanical start switch with that timer, you can simply close the start gate. That will get the timer to stop timing and send the results. You just don't want to raise the gate until all cars that will finish, have finished. The other option is to hit the Escape key on the computer keyboard.


Randy Lisano
Romans 5:8

Awana Grand Prix and Pinewood Derby racing - Where a child, an adult and a small block of wood combine for a lot of fun and memories.

kyoo
Journeyman
Journeyman
Posts: 30
Joined: Mon Jan 30, 2012 2:38 pm
Location: Austin, TX

Re: RaceReplay video clip montage

Post by kyoo » Mon Mar 24, 2014 9:14 pm

Thanks for the tip.. I like to be able to see the cars come to a stop.. OR NOT.. some hit the stopper at an angle and go tumbling.. wonder if I can work both angles in somehow.. I'll have to play with that next year..

I noticed your video has audio.. all of my clips are silent.. did I miss an audio setting somewhere? I had plenty of microphone options in my set up.. I just never saw where I could choose one in RR..

And thank you for the tips on the FT timer.. I had forgotten about the ESC option.. that's something I have control over from my seat.. I should have done that!



mfwade
Apprentice
Apprentice
Posts: 1
Joined: Sat Feb 21, 2015 5:59 am
Location: Hagerstown, MD

Re: RaceReplay video clip montage

Post by mfwade » Sun Mar 01, 2015 11:03 am

kyoo, I am wondering the same. I have lots of video all of which do not contain any sound. I am curious what gpraceman uses (make/model of camera, usb interface/converter device, etc.).

The only thing I can think of is to re-route the audio portion away from the video input device (USB to Video) and connect to the microphone port on the laptop. Will wait of gpraceman though as he is the ultimate expert on this :)

-Marvin



User avatar
gpraceman
Site Admin
Site Admin
Posts: 4607
Joined: Fri Jun 20, 2003 12:46 am
Location: Highlands Ranch, CO
Contact:

Re: RaceReplay video clip montage

Post by gpraceman » Mon Mar 02, 2015 6:03 pm

If the video source provides an audio feed, RR will use that while recording the video. The sample videos that we have done have either been using a video capture device that provides an audio input from the camera or were done with a DV video camera with a FireWire connection.

The webcams that I have tested do not provide an audio feed. The microphone for the webcam may act as a direct feed into the microphone input for the computer. That is not something that RR currently looks for, but that is something that we can look at incorporating into the next version of RR.


Randy Lisano
Romans 5:8

Awana Grand Prix and Pinewood Derby racing - Where a child, an adult and a small block of wood combine for a lot of fun and memories.

Post Reply