Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

cgi script sending a smil document

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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

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…
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…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

610 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