Solved

cgi script sending a smil document

Posted on 1999-01-25
3
180 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
ID: 1832392
Edited text of question
0
 

Expert Comment

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

Accepted Solution

by:
mouatts earned 200 total points
ID: 1832394
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

808 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