This little Batch script is one of my favorites, I work with alot of different people that are non-technical and cannot reproduce issues on demand. This nifty little VLC script captures everything in a tiny tiny file and on average records about 6 hours of screen time in only 40MB of data. Not bad eh! 🙂

setlocal REM set path=%path%;%ProgramFiles%\VideoLAN\VLC\;%ProgramFiles(x86)%\VideoLAN\VLC\

eventcreate /ID 1 /L APPLICATION /T INFORMATION  /SO PROVISION /D "Starting Provision"
eventcreate /ID 1 /L APPLICATION /T INFORMATION  /SO PROVISION /D "Current Directory %CD%"
eventcreate /ID 1 /L APPLICATION /T INFORMATION  /SO PROVISION /D %~dp0
eventcreate /ID 1 /L APPLICATION /T INFORMATION  /SO PROVISION /D "%*"
eventcreate /ID 1 /L APPLICATION /T INFORMATION  /SO PROVISION /D ""%*""

for /f "tokens=2 delims==" %%I in ('wmic os get localdatetime /format:list') do set datetime=%%I
echo %datetime:~0,8%-%datetime:~8,6%

start /min ffmpeg -f dshow -i video="screen-capture-recorder" -c:v libx264 -qp 0 c:\videos\Provision_%datetime:~0,8%-%datetime:~8,6%.flv

REM start vlc screen:// -I rc --one-instance --qt-start-minimized --screen-follow-mouse --screen-fps 20 :sout=#transcode{vcodec=h264,vb=1800,scale=1}:std{access=file,mux=asf,dst=c:\\videos\\Recording_%datetime:~0,8%-%datetime:~8,6%.mp4}
REM vlc screen://  -I rc --screen-follow-mouse --screen-fps 3 :sout=#transcode{vcodec=WMV2,vb=1800,scale=1}:std{access=file,mux=asf,dst=c:\Videos\%datetime:~0,8%-%datetime:~8,6%.wmv}

pushd "%~dp0"
call RecordedProcess.bat %*
popd

REM vlc --one-instance vlc://stop && taskkill /f /im vlc.exe
REM vlc vlc://quit 

taskkill /f /im ffmpeg.exe

eventcreate /ID 1 /L APPLICATION /T INFORMATION  /SO PROVISION /D "Ending Recording task"

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax