Skip to main content
Participant
May 10, 2007
Question

Beginners guide to integrating Flash Media Server 2?

  • May 10, 2007
  • 6 replies
  • 421 views
I'm a newbit to Flasha dn flash media server and need some help with integrating the two products. We've just purchased Flash Media Server 2 to stream user created videos to a website. Idealy we would like to use the FlvPlayBack component placed on the stage to display the FLV file from the media server, but cannont get the component to access the FLV file.

Media Server Configuration:
On the Media Server we created an application (testapp) with an default instance (_definst_). The directory path for the Appliation looks like this W:\MediaApps\testapp\streams\_definst_\

The name of the server is MediaServer

The application and instance are appearing in the Media Server Admin manager.

I've placed an FLV file (Movie.flv) In the _devinst_ directory.

Flash FLA file
Placed FLVPlayback component on the stage
Set contentpath= rtmp:\\MediaServer\testapp\_definst_\Movie
Set islive=true
When I test publish the file, the video does not display?

Does anyone have any guidance on what I need to do? There seems to be a lack of documentation on integrating the media server. I looked a sample app called "SimplePB" that works, but does not use the FLVPlayback component.

Any help would be appreciated.

Thank you,

John Wallwork

    This topic has been closed for replies.

    6 replies

    May 11, 2007
    John,
    Glad to be of assistance...

    Bill
    John39Author
    Participant
    May 10, 2007
    Found the problem. The FlvPlayback componenent needed the islive property set to "false". Guess this property is only set to true when the stream is a live feed and not just being streamed.

    Thanks B_Shack for your help.

    John
    John39Author
    Participant
    May 10, 2007
    I've done all described without success.

    the only way I've gotten at stream to show is with the following code, Vid1 is a Video object on the stage:

    var VideoStream:NetStream;
    var client_nc:NetConnection = new NetConnection();

    client_nc.connect("rtmp://MediaServer/testapp");

    VideoStream = new NetStream(client_nc);
    Vid1.attachVideo(VideoStream);
    VideoStream.play("Movie");
    May 10, 2007
    John,
    For an FLV to stream from FMS, it must be placed in the streams/_definst_ directory...

    applications/myApplication/streams/_definst_/myFlv.flv

    Then you would type in the rtmp connection information in the contentPath of the FLVPlayback component like this

    rtmp://myRTMPConnectionInfo/myApplication/myFlv

    without the flv extension.

    The documentation comes from the FMS components when you install them.

    Here it is...

    To set up your FCS for streaming FLV files:
    Create a folder in your FCS application folder, and give it a name such as my_application.
    Copy the main.asc file into the my_application folder.
    Create a folder named streams in the my_application folder.
    Create a folder named _definst_ inside the streams folder.
    Place your FLV files in the _definst_ folder.
    To access your FLV files on the Flash Communication Server, use a URL such as rtmp://my_servername/my_application/stream.flv.

    For more information on administering the Flash Communication Server, including how to set up a live stream, see the FCS documentation at www.macromedia.com/support/documentation/en/flashcom/. When playing a live stream with FCS, you need to set the FLVPlayback property isLive to true. For more information, see FLVPlayback.isLive.

    Regards,
    Bill
    John39Author
    Participant
    May 10, 2007
    I tried both ways, copying the main.asc from the tutorial, and pasting the code in the response without success.

    Don't we need to establish a connection to the media server in the FLA webserver client?

    BTW, which part of the documentation are you refering to. All I can find in the Flash IDE mentions the main.asc copying and setting the content path to an XML file for server feeds.

    Thanks,

    John
    May 10, 2007
    John,
    A little documented comment regarding connecting FLVPlayback to FMS exists in the documentation. For the FLVPlayback to play from FMS, you must place a specific client.call in the onConnect.

    You can look at the folder Samples and Tutorials\Samples\Components\FLVPlayback in your installation directory for the main.asc file. Alternaltely, if you are not checking for bandwidth, just put this bit of code in the main.asc file in your application folder.

    application.onConnect = function(client)
    {
    this.acceptConnection(client);
    client.call("onBWDone");
    }

    The last line of the onConenct function calls the onBWDone metod of the FLVPlayback to play the FLV.

    Regards,
    Shack