Dreamstime

Friday 23 November 2012

TV Captures On-Demand - An Easier Way

One Touch Recording or OTR. A function on my old VCR that enables me to record a TV program immediately without delay. And with the ability to set a countdown timer, the VCR will shut off once the countdown reaches zero.

I wanted something similar to OTR on my PC for my TV recordings with VirtualDub. There are times when I wanted to start recording a TV program immediately without scheduling a task in V2CRS. Task scheduling is easy with V2CRS but it takes time keying in the parameters. Consequently, there is an undesirable delay when I want to start recording immediately.

Batch Files To The Rescue

The easiest method that I could think of in creating an OTR like function on my PC is to use Windows batch files, that will in turn call the V2CRS program "Scheduler.exe". VirtualDub capturing will start almost immediately plus I will get a countdown timer, courtesy of V2CRS.

A command for immediately capturing TV1 (channel 6 in my case) into the file name "TV1" in the directory "F:\RecordedTVPrograms" for a length of 30 minutes will look like this:

C:\V2CRS_122c_bin\Scheduler.exe -channel "6" -filename "F:\RecordedTVPrograms\TV1" -duration "30"

If I want the PC to shutdown after capturing, I just include the option -shutdown "2". But to me, I prefer setting the "After Task" option via the V2CRS icon on the Windows "Taskbar" after launching.

"Schedule Task" Dialog Box

Note: This command is actually generated by V2CRS. All I have to do is to create a new task in V2CRS, save it and then just copy it from the "Scheduled Task" Window for the selected task (Start -> Programs -> Accessories -> System Tools) under the "Run" field in the "Task" tab. Then I just adjust the command line parameters for "Scheduler.exe". I do use VirtualDub filters for some channels like I have described in "Extending V2CRS - Enabling VirtualDub Filters". In this case, the command will be a little longer:

C:\V2CRS_122c_bin\Scheduler.exe -channel "28" -filename "F:\RecordedTVPrograms\TV8" -duration "121" -preaction "<Actions><Action><Type>ActionExecuteAndWait</Type><FileName>C:\VirtualDub-1.9.11\scripts\SetDenoiseFilter.bat</FileName><Parameters></Parameters></Action></Actions>" -postaction "<Actions><Action><Type>ActionExecuteAndWait</Type><FileName>C:\VirtualDub-1.9.11\scripts\SetNoFilter.bat</FileName><Parameters></Parameters></Action></Actions>"

Organizing My Batch Files

I organized my Windows batch files by creating a folder/directory called "TVCaptureNow" at the top level. I then created a shortcut for this folder on the Windows Desktop for easier and quicker access. Fumbling around in Windows Explorer is not something that I would want to do when I want to start capturing immediately.

I also created 3 sub-folders under "TVCaptureNow" called "30Min", "60Min" and "120Min". The name of these sub-folders corresponds to the typical length of most TV programmes that I regularly watch. In each of these 3 sub-folders, there will be one Windows batch file each for each of the TV channel that I want to capture. I set the time duration in each Windows batch file according to the directory name in which the batch file is located, and the channel number according to the name of the batch file.

To start capturing immediately, I just double-click on the "TVCaptureNow" shortcut on the Windows desktop that I have created previously, double-click on the directory corresponding to the duration of the TV programme that I want to capture and then I just double-click on the Windows batch file with its name corresponding to the TV channel that I want. Windows will launch VirtualDub almost immediately - there will also be two "C:\WINDOWS\system32\cmd.exe" windows created in the process.

0 comments:

Post a Comment