Skip to main content
October 11, 2006
Question

Why is this so difficult ?

  • October 11, 2006
  • 2 replies
  • 402 views
We've just installed Flash Media Server, and we're trying to get a Flash 8 movie to get a stream of it.

Server Configuration
Standard default installation, nothing here has been changed apart from the location of the applications onto another physical disk.

The Admin Console shows a version number of 2.0.3 r68.

Test Application
The following folder structure was created under the applications folder
Test -> Streams -> _definst_ ->

In the _definst_ folder we have placed 4 flv files:
2 files encoded with flash video encoder, 1x flv7 and 1 x flv8
2 files encoded with sorenson squeeze.

Also tried creating an instance folder called 150k.

After every change the server and/or application was restart/reloaded.

We have added / updated / changed a file called main.asc that was placed at the same level as the streams folder. This file was taken from the Samples that comes as part of the Flash installation.

Issues experienced

1. When trying to import a video using functionality within Flash 8 and connected to the server, it failed to find the file. Here we have tried all possible combinations of the URL

rtmp:/127.0.0.1/test/stream/_definst_/flv8.flv
rtmp:/127.0.0.1/test/_definst_/flv8.flv
rtmp:/127.0.0.1/test/flv8.flv
(and again with two //)


2. When we try and get a stream from the server using ActionScript to establish the connection and retrieve the stream, we are only getting audio and not video. When we put the server into debug and click the play stream button we can see the stream being played with both audio and video.

We noticed that the Server was using Flash Player 9 to show the stream, so we updated our flash players to the same vesion, but we still only get the audio and no video.

We have loaded the flv files into a flash movie by getting them of the harddisk and they show fine.

We have tried installing the Server on two different computers and we get the same issues.
We have tried accessing the server from half a dozen computers with the same issues.
We have developed the flash movie on two different machine with

Does anyone have any ideas regarding solving these issues.

Thanks
    This topic has been closed for replies.

    2 replies

    October 11, 2006
    The flv playback component is not a video object... it's a component. Try this:

    From the library, create a new video object (right click on the library and choose new video... keep the "video" radio button selected). Then drag an instance of the video object onto your stage, and name it my_video . That should fix the missing video issue.
    October 11, 2006
    We did as you suggested.

    Now we can see what we believe is the first frame of the video.

    I'm no flash expert, so this might sound like a stupid question, but do I have to add controls to allow the rest of the video to be played?
    October 11, 2006
    OK sorted this we needed a ns.stop() line in there as it was continously hitting the server and just showing the first frame.

    So why can't we use the flv playback component? All the examples that I've see say that we should be using this now.

    Thanks again
    October 11, 2006
    Although I've not used the video import wizard in Flash (I typically code my connections manually), I think I see your problems.

    First, your directory structure should look like this:

    applications/appname/streams/instancename (streams should not be capitalized)

    1. Although the flv files are within the streams directory, you don't want to use the full path to them. Assuming you are running your .swf on the local FMS machine (and assuming your flv files are in the streams/_definst_ dir), try using one of the following as your rtmp string:

    rtmp:/localhost:1935/test/somevideo.flv

    if it doesn't like that one, try leaving off the .flv extension, like so:

    rtmp:/localhost:1935/test/somevideo

    2. This problem would typically be caused by the stream video not being attached to a video object in the .swf. Can you post the code you are using for connecting to and playing your netstream?
    October 11, 2006
    Thanks for the response.

    The directory structure on the server looks like this applications\test\streams\_definst_\flv8.flv . This is on windows 2003 server.


    I have just tried entering rtmp:/localhost/test/flv8.flv and rtmp:/locahost/test/flv8 as part of the Import video wizard and it claimed it could not find the file.

    When we don't use the Import Video wizard we are using the following code

    nc = new NetConnection();
    nc.connect("rtmp://127.0.0.1/test");

    ns = new NetStream(nc);
    my_video.attachVideo(ns);
    ns.setBufferTime(0);
    ns.play("flv8");

    Where 'my_video' is a FLVPlayback component. Using this method we can get audio but no video.

    Any further pointers or suggestions would be gratefully received