Jump to content

The Movie Channel


Recommended Posts


A while back, Episode #8 I think, There was discussion about connecting your computer to the coax line in your house to watch IPTV on TV. Thought the Idea was grand so I took it and ran. I have been building a Movie channel for my fraternity house for the past few weeks.

The Setup requires...

1x old crappy computer that can handle running a small web server(WOS/Mowes portable) running super special software (php, bat, VB script, VLC, Flash Projector), can play Standard definition Divix-Avi files, and has video out.

1x "special" agile RF modulator( this was something very important that I felt was left out of the original hak5 segment.)

The modulator must be "agile". This means that when it broadcasts its signal there is limited degradation of signal of near by channels. This is the one that I purchased.

If you use a normal RF modulator you will kill all channels from 1- to about 40 depending on the modulator.

1x CA tv combiner, You cant just use a normal splitter in reverse. (i've tried, looks line trying to pick up tv ftom 500 miles away with rabbit ears.) This is the one that I purchased.

1x CAtv Notch filter. This filter removes the signal/interference from your incoming cable lines on the channel that you select. If you dont do this your cable will over power your modulator. Here are two different models 64-70, 75-80

Thats it for parts, aside for a few coax cables and a few audio video lines to connect the pc to the modulator.

For hookup here is the wiring diagram that i created for our house


Yours will be different as our house has 4 CAtv lines from the street (because were just that cool).

After everything is wired up test it out with a video iPod/Zune or something that dosent require any time to setup to see if everything is working. If it is awesome!

Next is the computer.

FIRST THING, format it. Install whatever, I chose windows because part is programmed in bat (because i'm lazy, and this project was originally kinda hacked together)

Next is get some space. Find all the IDE hard-drives in the tri-county area, or get an external terabyte as I did.

After that is the software. Since i'm away from home I don't have the source code with me but I can share with you the general concept.

Starts at the web server. PHP asks the database what is the 5 least played movies so far. Selects one of those 5 and flags it as the most recently played movie. Generate a bat file that tells VLC to play the Movie, then runs a program called 'Intermission' then run this php script all over again. One it creates this bat php runs a simple VB script command that allows the execution of the bat without php needing to wait for its completion. So php quits and the Bat is run. The bat plays the movie in vlc and waits for it to finish. Vlc auto closes and the Bat runs 'Intermission'

Intermission is an executable Flash Projector that displays important upcoming events, news, and other stuff pertinent to our fraternity. (it's modeled after adult swim).

After a quick quote Intermission quits and the batch executes the php file then quits, And the process repeats.



Thats the Whole Shabang.

Things to keep in mind, My movie channel is not 100% setup, because i'm not at home right now. But the programs works, and the CAtv wiring is setup and tested working. The two halves haven't met yet.

I know many of you are going to say, why use php and my SQL!!

Two reasons,

1) php.

2) This project is always being constantly improved and I felt that php would give the most room to do so with the ideas that I want to add. The next major add-on once everything us up and running is text message voting. The Intermission program will give you 4-6 movies that could be played next and you get to vote on them by sending the server a text message (ends up being an e-mail) that php will pop3 then read and decide what to play next. Also Users will be able to locally log into the web server and select movies that should be up for vote next time around. Another addition is the ability to administrate the movie channel from any computer. I can login and change what text is displayed in between movies, skip movies from the browser, or add mew movies from anywhere in the house without ever needing to go in the basement.

So far this project has been a blast! And a slight drain on the wallet. I did get funding for the external HD, but the adapters, agile RF, CAtv Notch filter, and combiner were unforeseen expenses that I shelled out for. (college budget) But apart from that it has given me a chance to do things with mostly web languages(php and Flash actionsctipt) that there not normally intended for. It has really expanded my mind on what you can do with these languages.

Link to comment
Share on other sites

I have been building a Movie channel for my fraternity house for the past few weeks.

It sounds like you have a pretty slick setup coming together, very nice! Thanks for the detailed writeup and links, your tips can save the rest of us a lot of time. :)

The Agile RF Modulator you bought, can you select which tv channel it is using, or is it fixed to only one channel? I am curious about using multiple rf modulators to have multiple channels.

Link to comment
Share on other sites

The Agile RF Modulator you bought, can you select which tv channel it is using, or is it fixed to only one channel? I am curious about using multiple rf modulators to have multiple channels.

It can select any channel from 2-95 and 100~125 for CAtv. It also can display channels 14~64 on broadcast (UHF)

Those numbers are not exact, but yes you can use a bunch of channels. Also a thing to keep in mind, I wasn't having much luck broadcasting over an existing channel, thats why we use channel 123.

Link to comment
Share on other sites

That is bloody interesting and a fantastic idea.

I would love to set something like this up myself but money would be a major issue (don't you just love the shitty-ness of being a student).

I am not much of a coder but once you get back be sure to chuck up your scripts.

Thanks for the share, this is bloody awesome

Link to comment
Share on other sites

money would be a major issue (don't you just love the shitty-ness of being a student).

One of the positives of living in a fraternity or a hack house; The Terabyte was voted in by the house, So everyone has $4.75 added onto there bill, instead of shelling the $1XX my self for it.

Also the old computer was a Frankenstein. Case from a kodac print thing, Compaq mobo+processor, old ATI videocard that I bought for $5 off facebook market place, pc ram I found in randome desk in the basement, and I donated the second DVD drive from my computer for installing the software and for Ripping DVD's to divix movies using "Xilisoft DVD to DivX Converter" or the free program "Freez DVD Ripper".

But yah, all of the other components have rely added up. I have spend about $112 personally buring parts and shipping them 1 by 1. If I would have knows ahead of time I could have saven allot on money shipping all of the stuff at once.

I'll try to get some one upstate to e-mail the code so I can share it. (And clean it up)


I've uploaded the Intermission program to Google code, you can download the program and the source fla file HERE


I forgot to mention the CATV filter, Updated origional post

Link to comment
Share on other sites

Finally got some one to e-mail me the source code!

All of this goes into the root of your webserver (I perfer wos / mowes portable)




//  Connects to the database and selects one of the least played movies
//  Fuzzy number adjustes how close to the end of the least played list
//  ie: a valie of 1 will play the last movie
//       but a number of 5 will randomally chose one of the last 5 movies on the list
//       recomend chosing a mumber that is about 15-25% of the number of movies
$fuzzy = 5;

// Connect the database
$con = mysql_connect("localhost","TheMovieChannel","thepass");
if (!$con)
  die('Could not connect: ' . mysql_error());

// select database
mysql_select_db("channel", $con);

//Generate a list of movies with the lest played first
$result = mysql_query("SELECT * FROM movie ORDER BY Count DESC");

// the "fuzzy" range
$rnds = rand(0,$fuzzy);

//count down the list randomally
for ( $counter = 0; $counter <= $rnds; $counter ++) {
    $row = mysql_fetch_array($result);

//place database valuse in varaiables
$theTitle = $row['Title'];
$thePath = $row['Path'];
$theCount = $row['Count'];

//generate the batch file contense
//executes the movie
//then runs this program again after movie compleats
$progs = 'cd "C:\Program Files\VideoLAN\VLC\
vlc.exe "C:\Documents and Settings\Movie\My Documents\My Videos\\' . $thePath . '" -f
cd "C:\Documents and Settings\Movie\Local Settings\Application Data\Google\Chrome\Application\
chrome.exe ""';

//add one to all the count value of all movies
mysql_query("UPDATE movie SET Count=Count+1");

//set the current playing movie to a count value of zero
mysql_query("UPDATE movie SET Count = '0'
WHERE Path = '" . $thePath . "' AND Title = '" . $theTitle . "'");

//finish database commands

//save the bat program
$myFile = "run.bat";
$fh = fopen($myFile, 'w') or die("can't open file");
fwrite($fh, $progs);

//Run the executer that initlizes the bat without waiting for the bat to finish

<script language="JavaScript">
function closeWin(thetime) {
setTimeout("window.close()", thetime);
<body bgcolor="#000000" text="#FFFFFF" onLoad="closeWin('20')">


Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.run "%comspec% /c run.bat",0
Set WshShell = Nothing


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

<form id="form1" name="form1" method="post" action="save.php">
  <table width="220" border="1">
      <td width="92">Title</td>
      <td width="112">
        <input type="text" name="title" id="title" />
      <td><input type="text" name="path" id="path" /></td>
  <input type="submit" name="submit" id="submit" value="Submit" />



$title = $_POST["title"];
$path = $_POST["path"];

$con = mysql_connect("localhost","PhiKap","1138");
if (!$con)
  die('Could not connect: ' . mysql_error());
mysql_select_db("channel", $con);

$sql = "INSERT INTO movie
 (Title, Path, Count) 
VALUES ('" . $title . "', '" . $path . "', '0')";
echo $sql;

This code needs some major updating (and spell checking), I'll be working on it this weekend.

ALSO, This code requires Google chrome to be installed on the computer( but you could change with a few edits)

Link to comment
Share on other sites

  • 2 weeks later...

This is a pretty cool project, Ive always wanted to do this in my home but have never really seen any great guides on this. You displayed all of your information very well.

You should make video of this or take some shots to show it in action, especially for the "Adult Swim"-like intermissions.

Awesome mod!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...