?
Solved

cgi script sending a smil document

Posted on 1999-01-25
3
Medium Priority
?
207 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 400 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

TCP/IP Network Protocol Cheat Sheet

TCP/IP is a set of network protocols which is best known for connecting the machines that make up the Internet. The truth is that TCP/IP is one of the oldest network protocols and its survival is mainly based on its simplicity and universality.

Question has a verified solution.

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

This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Suggested Courses

752 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