LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-02-2010, 04:44 AM   #1
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Rep: Reputation: 39
embedding flash to html pages for an rtmp stream


Hi,
I am having a streaming server Red5 running on localhost.
I have a few HTML pages which should be serving those streams.

I read documentation given here
http://www.longtailvideo.com/support...mbedding-flash


and

http://www.longtailvideo.com/support...mbedding-flash
and the swfobject.js and player.swf are on same directory where the test.html page I created is present.

Following is the HTML code
Red5 is working on localhost.
Please see if some one can point out the error in it.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<title>JW Player for Flash</title>

<style type="text/css">
  
  body { background-color: #fff; padding: 0 20px;
       color:#000; font: 13px/18px Arial, sans-serif; }
   a { color: #360; }
  h3 { padding-top: 20px; }
  ol { margin:5px 0 15px 16px; padding:0; list-style-type:square; }

</style>
<script type='text/javascript' src='swfobject.js'></script>

</head>
<body>

<div id='mediaspace'>This text will be replaced</div>
 
<script type='text/javascript'>
  var so = new SWFObject('player.swf','mpl','470','290','9');
  so.addParam('allowfullscreen','true');
  so.addParam('allowscriptaccess','always');
  so.addParam('wmode','opaque');
  so.addVariable('file','avatar.flv');
  so.addVariable('streamer','rtmp://localhost/oflaDemo');
  so.write('mediaspace');
</script>


</body>
</html>

Last edited by tkmsr; 08-02-2010 at 04:46 AM.
 
Old 08-02-2010, 11:38 AM   #2
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
Quote:
Please see if some one can point out the error in it.
Where did you get
Code:
so.addVariable('file','avatar.flv');
from ?

It's not mentioned on either the duplicate link that you posted or the link to version 5 from the page itself.
 
Old 08-02-2010, 12:43 PM   #3
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Original Poster
Rep: Reputation: 39
On this link they explained you need to have file and avatar.flv is a file which I have to stream.
I have avatar.flv in my streams folder (where all the videos are kept to stream)

Also on following link
http://www.longtailvideo.com/support...r-setup-wizard
there is a sample code generator.
I just gave the location of server on my lan in the second link above and it generated the script for me.
That player was able to play the flv on my Red5 installation on LAN.
You can also try if you do not have a installation of Red5 then on the second link for setup wizard they have given a dummy flv which is as an example and streams very well.
At the bottom you will get a code snippet that is what I had tried.
 
Old 08-02-2010, 01:17 PM   #4
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
In that case I suggest using the full http address to the file, even if that's only http://localhost/filename.flv

Last edited by smoker; 08-02-2010 at 01:18 PM.
 
Old 08-02-2010, 01:21 PM   #5
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Original Poster
Rep: Reputation: 39
Well now here comes the problem the files http address how do I determine that.
It is being served because of a Red5 application known as oflaDemo.
Please see this link
very clear explanation of what I am doing.
 
Old 08-02-2010, 01:39 PM   #6
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
And what is the error ? No flash showing, no page, simple error page ?
 
Old 08-02-2010, 02:33 PM   #7
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Original Poster
Rep: Reputation: 39
Quote:
Originally Posted by smoker View Post
And what is the error ? No flash showing, no page, simple error page ?
There is a black flash player embedded in the html page and there is a circle which keeps on rotating as if it were trying to connect to the rtmp at localhost
 
Old 08-02-2010, 02:54 PM   #8
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
According to one of the links you gave, the Red5 server comes with example flv files. Have you tried one of those instead of yours ?
Also, what happens if you follow the instructions in the second comment on this page (by joshhrob).
 
Old 08-02-2010, 03:11 PM   #9
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Original Poster
Rep: Reputation: 39
Quote:
Originally Posted by smoker View Post
According to one of the links you gave, the Red5 server comes with example flv files. Have you tried one of those instead of yours ?
Also, what happens if you follow the instructions in the second comment on this page (by joshhrob).
Yes I have tried the demo flv only.Infact I am trying that only.
And for the second comment I can see the desired flv.
 
Old 08-05-2010, 04:45 AM   #10
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Original Poster
Rep: Reputation: 39
I was able to solve this problem

The code on the first post of mine I have not kept it in Document Root of the webserver.
That was the only thing that was stopping things.
The website where I have to test all this is having heavy traffic so I could not disturb that web server I made a clone of entire setup and then this was the reason I had made all the html code in my home directory.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Publisher html pages for new web pages do not open in firefox, any suggestions?? Bwebman Linux - Newbie 3 06-13-2009 10:35 AM
Embedding GIF into HTML? waelaltaqi Linux - Software 7 02-07-2008 10:35 AM
Help embedding FLV flash video MicahCarrick Programming 3 07-24-2006 08:40 PM
Cookie Sharing Between CGI generated HTML pages and standard HTML pages rkwhited Linux - Newbie 5 08-15-2004 07:39 AM
konqueror displaying raw html. no khtml embedding HriBB Linux - Software 1 06-21-2004 09:16 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration