Solved

cgi script sending a smil document

Posted on 1999-01-25
3
171 Views
Last Modified: 2013-12-25
I'm writing a cgi-script that is to take in what realvideo's you want to play in sequence and then creates a SMIL file of the clips so that the browser can call real player which will use the SMIL file to paly the specified clips in sequence.  I have written the code which outputs the correct SMIL file to the browser but it just returns an empty page.  When I view the source I see the SMIL file is being sent correctly.  I have checked the MIME types both in the script and on my web server(IIS 4).  Any ideas?

here is the script:

print "Content type: application/smil\n\n";

print "<smil>\n";
print "<head>\n";
print "<meta name=\"base\" content=\"rtsp://fellini.media.mit.edu/\"/>\n";
print "</head>\n";
print "<body>\n";
print "<seq>\n";

if($ENV{REQUEST_METHOD} eq 'GET'){
      $buffer=$ENV{'QUERY_STRING'};
}
else {
      read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
}      

foreach $pair (split(/&/, $buffer)){
      $pair =~ tr/+//;
      ($name, $value) = split(/=/, $pair);
      print "<video src=\"$value\"/>\n";
}


print "</seq>\n";
print "</body>\n";
print "</smil>\n";



Vikas Sodhani
vsodhani@mit.edu
0
Comment
Question by:vsodhani
3 Comments
 

Author Comment

by:vsodhani
Comment Utility
Edited text of question
0
 

Expert Comment

by:andropov
Comment Utility
What happens if you change the "Content-type" to "text/html"???
0
 
LVL 11

Accepted Solution

by:
mouatts earned 200 total points
Comment Utility
Firstly I thought the mime-type should be application/x-smil as I don't believe that this is a standardised mime-type (but I stand to be corrected).

Secondly is this mime-type registered on your system (ie for the browsers benefit). Check in Explorer|view|options|file types and ensure that a program is associated with the mime type.

Thirdly try using the embed tag within HTML just to ensure that all the components are talking correctly.

Lastly are you certain that the rtsp server is actually outputing what you expect.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
The viewer will learn how to count occurrences of each item in an array.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now