Just another weblog

Archive for January, 2009

Roll your own YouTube (mirror)

Posted by onlydarksets on January 29, 2009

A while back I found a good post (via FlashInsider) that detailed how to create a video sharing site, but when I went to look at it recently, it was replaced by a placeholder page written in German.  Thanks to Google cache, here is a mirror of it, including comments.  I’m not planning on hosting a YouTube site, but the FLV/FlowPlayer stuff is interesting.

UPDATE: It’s back now, but I’m leaving this here anyway.

Read the rest of this entry »

Posted in ffmpeg | 6 Comments »

Increasing PHP upload limits

Posted by onlydarksets on January 29, 2009

My hosting provider has the default limits for uploading files via PHP set pretty low (2MB).  To get around that, they allow custom php.ini files, but they don’t tell you where to put them or what to put in them.

Create a text file called “php.ini” and place it in the directory where the script is going to run.  I read that it a custom php.ini file is applied to subdirectories, but that was not the case in my setup.  The custom php.ini should have the following:


Posted in Uncategorized | Leave a Comment »

Importing archived WMV videos into SageTV’s “My TV”

Posted by onlydarksets on January 12, 2009

I have a ton of archived TV shows recorded in Vista Media Center that I processed with DVRMSToolbox (i.e., removed commercials, converted to WMV, and copied over all of the metadata), but they didn’t fit in well in Sage’s “Videos” structure.  After converting a few shows using SageMC, I realized that you can have pretty much any video file type show up in “My TV”, so I spent some time figuring out how to migrate all of these shows using a VB script.

Turns out you can access most of Windows Media Player via WSH, so that made it pretty easy to grab all of the metadata once everything was loaded into WMP – you just have to know where to look.  The XML layout for the Sage Webserver is pretty well documented, although the source code to Andy’s excellent MigrateMCtoSage utility made it much easier to figure out the bare minimums.  The hardest part was actually finding the XML writer for WSH.

Note that this should also work for AVIs, which is the other main container format supported by WMP.  However, AVI tagging is pretty abysmal in WMP, mostly because it doesn’t write the tags back to the file.  I have found a couple of apps to do this, but nothing I would wholeheartedly recommend.

Backup you wiz.bin file before proceeding – you need to shut down the Sage service to do this properly.

  1. Download and unzip CreateVideoXML.vbs
    Optional: Open in a text editor and edit the output and temp files
  2. Import your videos into WMP and clean up the metadata
  3. Run CreateVideoXML.vbs
  4. Open Sage Webserver and import the resulting XML file (by default: C:\Playlist.xml)
    1. Check the Import TV files box
    2. Check the Overwrite Existing Show Information box
    3. Check the Overwrite Existing Sage TV File Information box
    4. Check the Use imported Airing data to determine startTime option (THIS IS VERY IMPORTANT)
    5. Uncheck everything else

After import, your videos will show up under “My TV”.

Posted in SageTV, Windows Media Center | 2 Comments »

Creating an XML document in WSH

Posted by onlydarksets on January 12, 2009

This took forever to find, but I was hoping XmlTextWriter would work in Windows Scripting Host (I thought I found an example), but I couldn’t get it to work.  This is the only structured way I could find to create an XML document in WSH:

(OK – found the problem.  XmlTextWriter is .NET only, and WSH is not .NET.  It’s been a while for me.)

Posted in Uncategorized | 1 Comment »

Watching Blu-ray discs on the Sage extender

Posted by onlydarksets on January 11, 2009

I picked up a Blu-ray drive for the Sage server and a couple of BR discs.  I don’t use the Sage server as a client – I have a HD-100 extender for viewing (with a HD-200 in the pipeline).  Since I don’t have a stand-alone player, the only way to watch the movies I have bought is to rip them.

After going through this thread and all of its suggestions, I have found that some discs work with no modification, while for others the audio won’t work unless manipulated first.  Generally, if the first audio stream is AC3, it will work. So, I have come up with the following workflow for getting the movies to play on the extender.  Basically, I start with the easiest method first, and work my down through successive steps as necessary:

  1. Play the m2ts file as it was ripped from the BR disc.  With many discs, this just works.
  2. Delete all streams from the m2ts file except the main video and audio streams.
  3. Demux the main video and audio streams from the m2ts file, downmix the DTS-HD stream to AC3, and remux in a MKV container.

In each case, there is no converting of the video stream, so there is no quality loss and the processing time is relatively minimal.  Details after the break.

Read the rest of this entry »

Posted in SageTV | Leave a Comment »

Media Center and Vista need a divorce

Posted by onlydarksets on January 5, 2009

Long Zheng posted a link on his blog to a Microsoft-produced retrospective of the last decade of Media Center versions (also posted by Brent at GeekTonic, which reminded me to write on this).  It’s time for Microsoft to uncouple Media Center from the OS.

I jumped ship from Vista Media Center almost 6 months ago, and one of the biggest reasons was a  persistent bug with an identified cause resulted in many of my recordings having an incorrect duration, which made it difficult (although not impossible) to use the files.  To date, the problem has still not been resolved, because Media Center updates are tied to the OS release schedule, which does not permit quick release patches for non-critical bugs.  If they get it wrong, it’s a whole new cycle before they can send out another patch.

Microsoft already realizes that baking everything into the OS is not always the best idea, because it creates a bloated OS and reduces flexibility and limits the options for the individual apps (see here, here, and here).  Given the much richer experience I have had with SageTV since August, I think that applies to Media Center, as well.

Posted in Media Center PCs, Microsoft, Windows 7, Windows Media Center, Windows Vista | Leave a Comment »

Converting SageTV recordings to Zune/iPod/iPhone, version 2.0

Posted by onlydarksets on January 2, 2009

I posted a method for converting SageTV files to iPod/iPhone compliant files a while back, but a number of the files weren’t converting properly.  I also had problems with mencoder cutting commercials out of the files.  So, I retooled the approach, and I am now getting 100% success, using the approach outlined below.

Read the rest of this entry »

Posted in DVRMSToolbox, HowTo, iPhone, SageTV, Windows Mobile, Zune 2 | 6 Comments »

How to increase blog traffic 20x in one day with three easy steps

Posted by onlydarksets on January 1, 2009

  1. Blog about a relatively obscure fix for a consumer electronics device.
  2. Wait until a catastrophic bug requires everyone to utilize that fix, and Google sends ’em your way.
  3. Ka-ching!


Disclaimer: Results generally good for one day only…

Posted in Fuzzy Concepts | Leave a Comment »