VIDEO ON DEMAND

Video on Demand Computer.
A computer to record Local TV shows and post to web, rename with date, reformat to .wmv windows media files for the web, auto FTP to FTP server or VOD media server and move local files to a storage folder. Tasks must be automatic as possible.

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.

Install:
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.

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 admend 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 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. You can see it here http://www.wtjr.org/video2/

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. Again using the Limited FTP http://www.wtjr.org/video2/help.html

Its up and  running as of Jan 2009. (revised July 7th 2010 still going).

Below is data and notes:
Video on Demand

Scheduled tasks

Batch Files

renamebydate.bat
Times: 9:34pm
Days: All

High_quality_Convert.bat
Times: 9:52pm, 3:00am
Days: All

movefiles.bat
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:
_____________________________

Folders:

C:WME
C:WMERaw
C:WMEstoreroom
C:WMEConverted
C:WMELog
C:WMEholding
C:WMEApp

Files:
VOD Files zipped

Help with auto encode files here
http://www.tech-recipes.com/rx/2699/windows_media_encoder_9_batch_file_encoding_videos_from_mpg_avi_asf_to_wmv/