Video on Demand revised 2012

word version Video on Demand




The need: Anytime anywhere local shows, local because of Copyright. Hosts and guests out of state or not watching at time program airs have made good use of this at WTJR. VOD is in addition to You Tube postings as you tube is much more labor intensive and with a multiple of weekly show your YouTube channel gets flooded with same content .


Video on Demand Computer.

A computer to record Locally produced TV shows and post to web, rename with date, reformat to .wmv windows media files for the web (or what format is required by medis server), auto FTP to FTP server or VOD media server and move local files to a storage folder. Tasks must be automatic as possible with the least operator time after programming. In addition cost is to be kept down.


Where to start:

Windows xp computer trimmed of all fat such as auto update, desktop clean up, screen saver, power savers, and all none essential start ups must be striped out. Set up the computer to log on with a password so windows scheduler will work later. This computer will be used for VOD only and it does not have to be a member of  domain.



Hauppauge WinTV PVR-150 PCI (video recording card)

Windows media encoder 9 software

Windows media batch convert files

Dimension 4 time sync program software

Auto FTP program (SyncBack works good and its freeware)

TightVNC for remote control


Create the following .bat file listed at end of this article. (Files on wtjr website)

Summary of tasks outline: Program all recording events , set up your recording quality, renaming batch file, recoding batch file, move batch file  and Auto-FTP.  After all that, shows should start appearing in your media server. (You need a FTP media server account or a regular website account). Set up VOD page on website and list the files to be served, allow for downloads and you are up and running.


Discussion: I am using audio and composite video as the program source. The video/audio is the main program out of our master control room. I had to use Video/Audio Hum eliminators as the computer is around 100? away and I had hum bars. The eliminators worked best on the source side of the wiring. I really don’t need a TV tuner card but the PVR150 is a good card for scheduling recordings and has hardware MPEG 2 encoding.  I have settled on around 500 meg per half hour recording quality , You can record at a higher quality but I found this level to look nice and save recoding time, this file will have to be recoded to windows media 9 for the web, and will be deleted later anyway.


After setting up the PVR card and testing quality levels, go into WinTV scheduler and setup the record schedule of programs. The time sync D4 program is to sync your computer time so recorded shows are on time. If a time offset is needed to compensate for delay, the program  Analog X Atomic Time Sync  allows offsets by seconds to your VOD computer.


WinTV does not admen a date to the recorded file name.

This is a problem as when the show is listed on the VOD server, is is very helpful to have the date the show aired (or was recorded) in the file name. To solve this install a rename .bat file to rename recording with date amended. Set up the batch file to execute automatically using windows scheduler at a time after your recordings.


The shows are now being recorded in high quality MPEG file format around 500meg per 1/2 hour. That is to large for the Internet. So windows media encoder 9 is installed to covert the file to .wmv at 60meg per 1/2 hour. A batch file does this and moves to a folder called converted, and deletes source files. This batch file is a separate download and must be set up on your computer. The one setup and use has a folder called “raw” and “converted” . Anything in the raw folder is recoded with the batch file and stored in the converted folder. This batch file is executed at times scheduled with windows scheduler. The encoding levels are set by editing the encoding profile. The converted folder is auto FTPed to the media server. Another batch file moves the files locally to a storage folder.


Listing files on Website:

After the service is up and running the next problem is to list all the files on the Media server so you do not have to update the links manually each week each week. I am running the webpage on a Apache PHP server. The media server is windows. I constructed a PHP webpage to fetch the file names and display as links with the mms:// heading. In order to do this a limited FTP account had to be setup to allow downloads only. This page gets it information using the limited FTP account.

I used PHP programming but if you are on a Microsoft web server you should be able to use ASP code.

The second problem is downloading. So a Java FTP client was added to allow people to download to there local computer.  This proved troublesome over the years so a direct limited FTP HTML link is used with the link hidden for some security.

Its up and  running as of Jan 2009. (revised Nov 29th 2012 still going)



Video on Demand Programs:

Wintv sceduled recordings

windows Media encoder 9

windows media profile editor .prx file

auto bat file for high quality convert to wmv

auto bat file rename by date

auto bat file move to storeroom

Syncback auto ftp to load files to media server

Dimension 4 timesync program

Tight VNC




PVR-150 record settings

Path: c:WMERaw

Video output stream X Program

Video Rate Details X variable , 1600 bitrate to 2000k bps, GOP’s 15 , Video size 352 x 480 Audio Stereo, Mpeg1 layer2, 32 kHz 128 bit  (CRC off)


windows media encoder output settings

320 x 240 482K bps


Scheduled tasks

Batch Files


Times: 9:34pm

Days: All


Times: 9:52pm, 3:00am

Days: All


Times: 8:00am

Days: All

Auto FTP

Times: 6:30am – 7:50am

Days: All

WinTV record shows

Times: 430am to 9:00pm

Days: All

Files .bat:












Other Notes in reagrads to an always on computer:

*AUTO BOOT Shut Down, Restart, COMPUTER  Log Off XP Using A Batch File – Undocumented feature for XP

(Ok use this to create a .bat point windows scheduler to it once a week or 2 weeks or whatever this is optional but I include here because most computers need rebooted once in a while, you must do an autolog on hack so you do not see login screen, yet you still need a password, try it first if need do hack to logon. The follow is for a remote reboot in our case the remote is windows scheduler )



Auto Logon

Here is more then you want to know about the subject most likely but knowledge is power as they say. Remember Windows Scheduler Requires a password so be careful and test this otherwise you may disable windows scheduler kind of the domino effect.


In conclusion;

If all you want is auto restart and reboot on power outage (make sure you set computer bios to always on) you do not need to use widows scheduler and any of the auto log on methods would work.  You just manually reboot once in a while in that case. Or if you are not concerned about that just use the auto restart script.

So what if you are on a domain? The streamer or VOD computer for that matter does not have to join the domain, the mount points will work use VNC for remote connect. If you just have to join domain, (why?)  ignore auto logon part or experiment with it use auto reconnect script above at min.


All the data is posted here for the idea of a computer running all the time with a min of intervention. Needless to say strip it of all software not needed including AV, and windows update, never let it go to sleep or stand by and so on, but that is the topic of another post at


In His Service,

Jim W