#! /usr/local/bin/perl

print "Content-type: vod/mps\n\n";

($server,$fname,$file_off,$enc,$len,$st_fr,$en_fr,$st_of,$en_of,$foff,$fr_st)=split(/\&/,$ENV{'QUERY_STRING'});

($dummy, $url, $rest)=split (/\:/, $foff);
$url = substr($url,2);
$rest =~ /^(\d+)(.*)/;
($port, $path)=($1, $2);



$file_off .= $st_of unless ($file_off);  #if fileoffset not specified then 
###### output ######
print "$server\n";              # server name
print "$fname\n";               # filename
print "$file_off\n";            # offset
print "$url $port $path\n";	# url with the file offsets
print "$len\n";			# length of the clip
#print "$st_fr\n";		# starting frame 
