Mar 142012

This is just a quick and dirty script to delete MythTV recordings that had been previously transcoded and moved to the stream directory, but have since been autoexpired out of MythTV. This is an issue because trying to pull data outta the MythTV recording database about a recording that has been deleted causes an error because the entry isn’t there anymore. All it does is loop through each file in the stream directory and if it doesn’t exist in /var/lib/mythtv/recordings/ it gets deleted.

Contents of:
/usr/local/bin/ Continue reading »

Mar 142012

Since I’m already transcoding the recordings to h.264, might as well make them easily accessible to my iPhone or Boxee Box or Miro. Since the filenames are more likely to be seen, might as well make them more human readable. The biggest advantage to this renaming a season of a recorded show for archiving using filebot. If you want to get fancy, could use tversity to stream the rss feed to a playstation 3 or an xbox 360, but I still think the Roku is the easiest frontend for previously transcoded material.

Disclaimer: I’ve removed a few things specific to my oddball setup so I can’t guarantee I didn’t break anything.

Contents of:
/usr/local/bin/ Continue reading »

Mar 142012

Once the files have been created, will need to create an XML file the brightscript program on the Roku DVP can parse to display show data. This bit of perl reads the stream directory, sorts by file creation date, picks out the .mp4 files, uses the MythTV bindings to pull out show data, smashes it into some XML and writes it to a file.

Contents of:
/usr/local/bin/ Continue reading »

Nov 262011

I was wondering what the signal really does at the cable modem, so I’m scraping it with perl and WWW::Curl::Easy

Modem Information:
Cox Communications
Motorola Surfboard SB5101

All I’m doing is grabbing the signal status page from the modem and pulling out the signal quality data using perl.

If you have this page, you’re probably good –

Just rename the download, adjust the line endings, if needed, change the logging file, and set up a cron job to run however often you’re interested. The output is tab separated text file, perfect for importing into Excel.

Nov 202011

One of my first experiences with mythtv was restoring a recording and a dump of the MySQL database before I could buy my own tuner card. It was cool to see recordings populated and get a feel for the UI, but it was ultimately pretty pointless. Anyhoo, I bork’d my mythbuntu setup and needed to migrate my previous recordings to another installation. Come to find out, this has gotten so much simpler than ever before! Continue reading »

Mar 302010

What good is it to run a service if you don’t know how much it’s being used? I’m all about making my workstation earn its keep. I’m running Windows XP Pro (Volume License). I like Apache, I like AWStats, and AWStats will handle streaming media server logs!

Xampp (Awesome-ness for installing a webserver on a windows workstation)

Xampp + AWStats

AWStats + Media Services

Scheduled tasks does the interesting things here…. It runs under my credentials, I have it run multiple times per day, copy the log files from the media server (which my username has administrative rights to, but isn’t required if the log folder is shared) and update AWStats.

copy /y \mediaserverc$WINDOWSsystem32LogFilesWMSMountPoint*.log C:wms
C:xamppperlbinperl.exe -config=mediaconfigname -update > C:awstatsmediaupdatelog.txt

Mar 242010

I wanted to get the current number of connected users and used bandwidth of a publishing point on windows streaming media services. I had been watching this with the performance monitor, but I wanted something I could manipulate.

Sample code follows.

Continue reading »

Jul 042009

The attic was hot. Mounting a large fan in the vent seemed to help, but it was drawing 5.5A continuously, which is too much for the thermostat/humidistat my roommate bought. He left it on all the time, which is quite a bit of wasted power. I’ve seen 1wire devices online for quite a while and I’ve always wanted to play with them. The easiest way I can afford to connect sensors to computer is with 1wire. I’ve found my excuse.

Continue reading »

Jan 112009

Project Requirements
At work we needed a time lapse camera of our new student center construction project. It needs to run continuously for entire length of construction project – approx 18 months. It should run mostly unattended.

It captures 1 picture every 5 minutes. Storage capacity is cheap, so after using excel to make some projections, this worked out to be a reasonable rate for our resources. After some more research, I came to the conclusion that flash video has compatibility with most visitors while being relatively bandwidth efficient, but other codecs could be used. I originally got the idea from but it wasn’t quite awesome enough, so I rewrote using Perl and expanded upon it. Continue reading »