Solved

cgi script sending a smil document

Posted on 1999-01-25
3
202 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
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…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

705 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