How to set up streaming TV on your Windows Mobile device

Thu, Nov 18, 2004 @ 8:24 PM - Josh Einstein

In a previous post, I talked about how I overcame the storage limitations of my new Audiovox SMT5600 by setting up a streaming Windows Media server. In this post, I will describe in detail the steps to set it up and create content. Although this document does not describe how to stream live TV, it does tell you how to stream recorded TV or DVDs.

What you will need:

Steps to create the content:

This is the part where I have to ask you to be responsible. I am describing the steps to do this for your own personal use on your Windows Mobile device. Please be responsible and do not violate the licensing terms of the content you are using. For example, broadcasting a football game to the public is definitely a violation.

  1. Download and install Windows Media Encoder 9.
  2. Install Intervideo WinDVD. Other DVD decoders may work, but I have only tried Intervideo's and I have heard indications in newsgroups that this may be the only DVD decoder that works.
  3. Download and install DVD Shrink. This program allows you to create hard disk backups of your DVDs and TV on DVD episodes.
  4. Find a DVD to back up. Although I don't have it yet (because it isn't out) let's pretend that the DVD is Seinfeld Season 1. Put the DVD in the drive and fire up DVD Shrink.
  5. Click “Open Disc“ on the DVD Shrink toolbar and select your DVD drive. Let it analyze the disc.
  6. Click the “Reauthor“ button on the toolbar which allows you to create a custom DVD backup.
  7. Select only the main titles. You should be able to tell which titles are episodes by the length. Most TV shows are about 20-22 minutes long. Drag them to the pane on the left.
  8. Go to the “Compression Settings“ tab and highlight all of the entries in the left pane that you dragged over. On the Compression Settings tab, set the Video Compression to “No Compression“. There's no need to re-compress since we're going to do that with Windows Media Encoder.
  9. Uncheck all of the audio options except 2 channel english or whatever audio track you want to preserve.
  10. Click the “Backup!“ button on the toolbar. The backup target should be “Hard Disk Folder“ and find a place to store them. Hit the OK button and DVD Shrink will start copying the DVD's .VOB files to the target folder.
  11. When the copy is complete, close DVD Shrink and browse to the folder where you saved the VOB files.
  12. Create a new text file named “encode.cmd“ in the directory with the VOB files. Paste the following text into the file exactly.
    FOR /R %%F IN (*.VOB) DO @CSCRIPT "C:\Program Files\Windows Media Components\Encoder\WMCmd.vbs" -input "%%F" -output "%%F.wmv" -profile av32
  13. Double click the encode.cmd file to start encoding using Windows Media Encoder.
  14. This process can take a very long time. The end result will be a bunch of .WMV files with the same name as the VOB file. So if you have a VOB file called VTS_01_1.VOB then you will also have a small WMV file called VTS_01_1.VOB.WMV. These WMV files are the ones you're going to stream so keep them handy. If everything has gone okay, you can delete the VOB files as you won't be needing them anymore.

Steps to set up the server:

I am not going to go into a whole lot of detail for the individual steps such as installing Windows. There are plenty of resources out there to help you along here.

  1. Install Windows 2003 Server on some type of capable hardware.
  2. Install the Windows Media Server option from Add/Remove programs.
  3. Open “C:\wmpub\wmroot“ and create a subdirectory here. I called mine “TV“ and inside there, I created several subdirectories for the individual TV shows. For the sake of example, lets say the full path is “C:\wmpub\wmroot\TV\Seinfeld“.
  4. Copy the content files that you already generated to this new folder that you created. You can organize them further into subdirectories if you choose but this is not necessary.
  5. Open the Windows Media Services tool from Administrative Tools. Expand your server name and expand the Publishing Points node. Right click on the Publishing Points node and choose “Add Publishing Point (Wizard)...“.
  6. Click Next and then give your publishing point a name. In this case, name it “Seinfeld“.
  7. Click Next and then choose the type of content. In this case, we'll choose Files (digital media)... etc. This will allow us to stream previously encoded files (WMV files).
  8. Click Next and then choose the type of publishing point. In this case, we'll choose Broadcast Publishing Point because I like to tune into a stream and have no control over what is playing. This “feels“ more like live TV to me. This way I don't have to choose an episode and I can join an episode halfway through. If you prefer to control the stream, then you can choose the On Demand publishing point type.
  9. Click Next and then you will be prompted for the location of the content. Type or browse to the location of the content that we copied in Step 4. No need to specify filenames here, just the folder will do.
  10. Click Next and then optionally choose Loop or Shuffle. I would recommend checking both if you want a TV experience.
  11. Click Next and leave unchecked the logging option.
  12. Click Next and leave checked “Start Publishing Point when wizard finishes“ and leave unchecked “Start archiving when publishing point starts“
  13. Click Next and uncheck the box that says “After the wizard finishes:“. I'll tell you the URL to the stream later and you can create your own HTML pages.
  14. Click Finish and now you are streaming media to the internet!

If your publishing point is red, it may be stopped for some reason. Maybe the folder name is invalid or there are some other problems starting the stream. You can check the event log to look for error details.

Testing out your streaming media:

Now that you have your media server up and running and streaming TV episodes, you will want to test it. The URL for your media stream looks like the following:

mms://servername/Seinfeld

The server name is the IP address or hostname of your media server and the /Seinfeld is the publishing point name. If you called it something else, for example, SouthPark, then you would replace that part.

You can test the stream in Windows Media Player for the PC by clicking File -> Open Url and then typing in the MMS url to your stream. The quality will be crappy on a PC but it's sufficient for a Windows Mobile device. The av32 profile that we used to encode also will stream over T-Mobile's GPRS network. I have tested this scenario and I am able to stream video over T-Mobile GPRS with no stopping to buffer (unless I lose a signal or something).

Conclusion

I know this isn't extremely detailed and I have not covered ANY of the possible problems you can encounter but if you have problems, feel free to email me or post a comment here and I'll try to help you out.