Set Length of Time Recording in Windows 7 (Kworld DVD Maker
Posted: 22 Sep 2012 01:21
Hi All,
I thought that this piece of code may be of use
If anyone has a better way to do it please let me know, as this is my first try and it worked
It uses a "Kworld DVD Maker 2 (USB Device)".
It will record "dshow" for a desired period of time (in minutes) and reboot.
The code as is will not display the Video or Play Audio so it is ideal for setting off a recording and going to bed
The 2nd piece of code will display Video and Audio via the GUI.
To just shutdown the machine change "shutdown /r /t %sec%" to "shutdown /t %sec%"
Each recording is given a unique file name by using DATE and TIME EG....
"VLC_ 2012-09-22 80049.49.ts" by "g:\vlc\VLC_%date:~10,4%-%date:~7,2%-%date:~4,2% %TIME::=%.ts"
It assumes DATE is in the following format "Sat 22/09/2012" you may have to alter the above substringing to get
the ISO date format. The ISO date format is Ideal for sorting
I have yet to work on the TIME portion to cater for single digit HOURS
The Code.....
To enable Video and Audio use this Code....
Regards,
Mark
(God help me be the person my dog thinks I am)
I thought that this piece of code may be of use
If anyone has a better way to do it please let me know, as this is my first try and it worked
It uses a "Kworld DVD Maker 2 (USB Device)".
It will record "dshow" for a desired period of time (in minutes) and reboot.
The code as is will not display the Video or Play Audio so it is ideal for setting off a recording and going to bed
The 2nd piece of code will display Video and Audio via the GUI.
To just shutdown the machine change "shutdown /r /t %sec%" to "shutdown /t %sec%"
Each recording is given a unique file name by using DATE and TIME EG....
"VLC_ 2012-09-22 80049.49.ts" by "g:\vlc\VLC_%date:~10,4%-%date:~7,2%-%date:~4,2% %TIME::=%.ts"
It assumes DATE is in the following format "Sat 22/09/2012" you may have to alter the above substringing to get
the ISO date format. The ISO date format is Ideal for sorting
I have yet to work on the TIME portion to cater for single digit HOURS
The Code.....
Code: Select all
@ECHO OFF
set vlc="C:\Program Files\VideoLAN\VLC\vlc.exe"
SET /P min=Please enter the time to record:
IF "%min%"=="" GOTO Error
SET /A sec = 60 * %min%
ECHO Shutdown will happen in %min% Minutes
shutdown /r /t %sec%
%VLC% dshow:// :dshow-vdev="USB 2861 Device" :dshow-adev="Line (2- USB 2861 Device)" :dshow-aspect-ratio=16\:9 :sout=#transcode{vcodec=mp2v,vb=9000,scale=1,fps=25,width=720,height=576,acodec=mpga,ab=320,channels=2,samplerate=48000}:duplicate{dst=file{dst="g:\vlc\VLC_%date:~10,4%-%date:~7,2%-%date:~4,2% %TIME::=%.ts"}} :sout-all :sout-keep --qt-start-minimized
EXIT
:Error
ECHO You did not enter a time in minutes! Bye bye!!
PAUSE
:End
Code: Select all
@ECHO OFF
set vlc="C:\Program Files\VideoLAN\VLC\vlc.exe"
SET /P min=Please enter the time to record:
IF "%min%"=="" GOTO Error
SET /A sec = 60 * %min%
ECHO Shutdown will happen in %min% Minutes
shutdown /r /t %sec%
%vlc% dshow:// :dshow-vdev="USB 2861 Device" :dshow-adev="Line (2- USB 2861 Device)" :dshow-aspect-ratio=16\:9 :sout=#transcode{vcodec=mp2v,vb=9000,scale=1,fps=25,width=720,height=576,acodec=mpga,ab=320,channels=2,samplerate=48000}:duplicate{dst=file{dst="g:\vlc\VLC_%date:~10,4%-%date:~7,2%-%date:~4,2% %TIME::=%.ts"},dst=display} :sout-all :sout-keep
EXIT
:Error
ECHO You did not enter a time in minutes! Bye bye!!
PAUSE
:End
EXIT
Mark
(God help me be the person my dog thinks I am)