Slightly dynamic .ram files in IIS?
August 22, 2008 6:36 AM   Subscribe

Slightly dynamic .ram files in IIS?

I have inherited the maintenance and upkeep of a fairly large video archive, with a few dozen videos added every week. It is all in Real.

The way Real works is you point a link at a .ram file, which is just a little text file that contains another link (looks like: "rtsp://cia.gov/company_picnic.rm"). The .rm file is the actual video.

This system has been up and running for many years with hundreds of pages linking to thousands of .ram pointer files in hundreds of dated, nested folders on an external webserver pointing to thousands of .rm video files in hundreds of dated, nested folders on a separate machine. That machine, the one that has the video files, is being replaced by two machines. One machine for internet and one for intranet.

My conundrum: I'd rather not make and maintain a separate set of all these goddamn .ram and pages to serve the video internally (or externally). I'd much prefer to make the .ram files dynamically decide whether they say "rtsp://internal.cia.gov/company_picnic.rm" or "rtsp://external.cia.gov/company_picnic.rm" based on whether you are inside or outside. This would be a breeze, except the .ram files don't render .asp.

So, is it possible to tell ISS to process .asp in .ram files? If so, what do I need to tell the surly server people who will be making this change?

Is there a different solution that I am not seeing?

ps: Thanks for reminding me how bad of a choice Real/IIS is but know that it is neither my choice nor negotiable - it is what it is. Also, I have control over the pages, .ram and .rm but I do not have any administrative control over these servers.
posted by dirtdirt to Computers & Internet (5 answers total)
 
Best answer: You could probably just use .asp files and make them return the correct MIME type (audio/x-pn-realaudio?) for .ram files. Or, ideally, set up IIS to rewrite URLs so that the URLs look like static .ram files but the requests are directed to a single ASP script behind the scenes.
Any reasonably competent web developer should be able to put something workable together very easily, but the exact coding & configuration required will depend upon the details of your setup.
posted by malevolent at 7:07 AM on August 22, 2008


Best answer: Assuming you've got access to a developer, you can absolutely do this in .NET by changing, as malevolent says, the mime type of the header:


Response.ContentType = "audio/vnd.rn-realaudio";
Response.AddHeader("Content-Disposition", "attachment; filename=\"audiocontent.ram\"");


You'd need to configure IIS to process .ram files (you do this by selecting the top directory's Properties, then the "Configure" button.

Now, the hitch here is that you'll need to index your existing .ram files and store the references in a database or an XML file, which will change how your users navigate to individual items. Of course, you can probably do some URL rewriting to redirect /path/to/file.ram to /dynamicrealaudiofile.ram?ref=/path/to/file.ram, where dynamicrealaudiofile.ram is actually a VB/C# file that just spits out your dynamic .ram file with whatever is passed in the url.
posted by mkultra at 7:20 AM on August 22, 2008


Best answer: Moving forward, you might consider what we did. I created a small asp file called play.asp that sensed whether a person was internal or external using server variables and then formed the URL based on that. I.e. they hit http://externalserver/play.asp?company_picnic.rm and where fed rtsp://internalorexternalserver/companypicnic.rm as a result. Assuming the browser is configured to handle rtsp links it works fine.

The other path we took was embedding the video in a simple HTML page that loaded the file using the same trick.
posted by jwells at 9:01 AM on August 22, 2008


(small note on my comment: I'd actually skip the Content-Disposition header, and keep it all inline)
posted by mkultra at 10:14 AM on August 22, 2008


Response by poster: Nice! I've got a little script built that determines where you are and what you are asking for and writes out an appropriate .ram file. I'll either rebuild the archive of links to reflect this change, or write another script to trap the url and feed it to that first script.

Thanks everyone!
posted by dirtdirt at 10:32 AM on August 22, 2008


« Older Getting to the SF Amtrak Station?   |   building a life Newer »
This thread is closed to new comments.