None of this stuff would work without these apps.  Props to the authors.

Sleep.exe - http://www.computerhope.com/dutil.htm

waitdirchg.exe and WaitfileComplete.exe - http://www.gdps.dk

ffmpeg - http://www.ffmpeg.org

h264 parameters shamelessly borrowed from the great WinFF program