Groups | Blog | Home
all groups > macromedia flash flashcom > march 2006 >

macromedia flash flashcom : New FMS server setup? Can't stream .flv videos to .swf


gcgaudette
3/31/2006 7:57:14 PM
Hi, I hope someone can help me stream .flv videos to a .swf file embedded in a
Web page for my first time. My FMS 2 is newly installed on a Redhat Enterprise
Linux 4 server. When I try to view the video in the client Web page, there is
no video or audio (not even the skin, which is in a 2nd .swf file).

I see the following evidence of a connection:

1) doing netstat -a on my client PC shows an established connection to the
server on port 1935
2) looking at /opt/macromedia/fms/logs/access.00.log shows entries like:

session connect-pending 2006-03-31 14:09:01 4987 128.197.24.50 6146 6146 - -
- --
session connect 2006-03-31 14:09:01 4987 128.197.24.50 6146 6350 - - - --
stream play 2006-03-31 14:09:01 4987 128.197.24.50 6209 6424 flashtest 0 -- -

3) Admin console shows clients and (idle) streams in the "View Applications"
panel, little spikes for network traffic, etc., when I request the client page

My .flv file and main.asc are located here:

/opt/macromedia/fms/applications/flashtest/main.asc
/opt/macromedia/fms/applications/flashtest/flashtest.flv
(I have tried dropping the .flv extension too)

I don't have any other files or subdirectories in the applications dir.

My web page, the .swf file, and another .swf file for the skin are on my Web
server, which is a different host on the same domain.

For FMS administration, I haven't done anything other than to load the
application "flashtest." When I do, I am prompted to choose an instance name,
and I accept the default, _definst_. Sometimes, after loading the application I
see the following in the "View Applications > LiveLog" panel:

Sending error message: Method not found (_error:139968120).

For FMS configuration, I haven't done anything other than allow some specific
IP addresses to access the admin panel. I checked the Vhost.xml file, and the
config for allowing other servers to access applications is set to "all," which
is the default. (I have no need to set up v-hosts, but this seems to be the
only place where one can specify what Web servers can host the .swf files
successfully - am I missing something?)

For OS configuration, I have punched holes in iptables to let anybody connect
on port 1935.

I created the .flv file using Flash Media Encoder 8.

To create the .swf and .asc files, I used Dreamweaver 8 (Insert > Media >
Flash Video) and chose "Streaming Video". Interesting things happen in this
wizard: When I specify the URI and click a button to detect the dimensions of
the video, DW reports that the dimensions can't be detected. But the FMS admin
console adds 1 to the number of connections to the application, etc., and
sometime I see onConnect listed in the LiveLog. Nothing more. (My gut says that
when I can detect dimensions, I will also be able to stream the video --
documentation says the server requests a response, and waits until it gets one
or else gets a command to close the connection.) Here is what I give for the
location of the application, instance, and stream in the DW wizard:

Server URI: rtmp://flashserver.bu.edu/flashtest/_definst_
Stream Name: flashtest.flv (I understand the extension is optional here)

DW will not accept the URI if I give http as the protocol or drop the instance
name.

I've also tried using Flash Professional 8 to create the .swf files. It also
wants a URL and what I give it returns errors.

My questions:

1) Anything look wrong here?

2) Specifically, can someone please confirm or refute that I have all the
files and subdirs that I need inside the applications directory, and if not,
what else should I add, and where things go?
(The documentation wasn't helpful to me in determining whether I should add a
subdir named _definst_, or one named streams, and if so, where the .flv file
goes. So I've tried all kinds of combinations with no luck.)

3) Am I giving Dreamweaver the correct info for Server URI and Stream Name?

4) I'm not creating the .swf files with Flash 8 Professional, so am I correct
in assuming this tech note doesn't apply?

http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=d244749e


I really hope someone can help as I am stuck at WTF? right now.

-George
JayCharles
4/1/2006 3:43:55 AM
I don't use the prebuilt Macromedia components, so I can't offer help that is
specific to them.

One thing is do see is that your streams are not in the right place. Try
placing them like so:

opt/macromedia/fms/applications/flashtest/streams/_definst_/flashtest.flv
gcgaudette
4/1/2006 6:20:52 PM
Jay, thank you so much. The relocation of the .flv file did the trick, although
instead of _definst_ I used "video", so putting files as follows is what worked:

/opt/macromedia/fms/applications/flashtest/streams/video/flashtest.flv
/opt/macromedia/fms/applications/main.asc

Not yet sure if naming the subdir "video" made a difference.

I was not able to get Dreamweaver to detect the size of the remote file when
using DW to create my client-side files, but that doesn't matter right now as
long as the video plays!

Thank you again for taking the time to respond.
JayCharles
4/1/2006 6:31:49 PM
By renaming the directory to "video" and adding that to your rtmp string, what
you've actually done is created a new instance of you application.

One of the nice things about FMs is that you can have multiple instances of
the same application running. For example, let's say you have a chat
application, but you want to have more than one chatroom at a time. Instead of
creating a whole bunch of separate application directories, you can just create
new instances of a single chat application. So, the rtmp strings would look
like this:

rtmp://myserver.com/chat/room1
rtmp://myserver.com/chat/room2
rtmp://myserver.com/chat/room3

... and so on. "room1", "room2", and "room3" are the instance names. Any time
there are streams involved in an application (like your video application), FMS
will look for the videos in the streams directory of the same name as the
application instance. The streams/_definst_ directory is where FMS looks for
video when an instance name is not supplied in the rtmp string.


AddThis Social Bookmark Button