Skip to main content
Known Participant
June 11, 2010
Answered

How to do live streaming using Flash Media Server?

  • June 11, 2010
  • 3 replies
  • 3042 views

Hello evrybody,

  I m a begginer with FMS. I have a licenced version of FMS and I want to stream a live video from the Localhost or another machine with camera. And then then I should broadcast it to many clients. I don't know how to begin

Please help me

    This topic has been closed for replies.
    Correct answer Janaki Lakshmikanthan

    salma_salma wrote:

    Thanks Janaki but how can I add a new application? I tried to do it using Flash Media Administration Console but it doesn't work

    Hi Salma,

    To add an application to FMS follow the below steps

    1. Create a folder "my_app" under "$InstallRoot\applications" directory.

    2. For simple server side code... add "main.asc" file inside "$InstallRoot\applications\my_app" directory which has the content like

    application.onConnect = function(clientObj){

         trace('onConnect function");

         return true;

    }

    3. To add streams to the application, creates 'streams' folder inside "$InstallRoot\applications\my_app" directory, within that create '_definst_' folder and then place your FMS supported streams within the directory. So your streams for the 'my_app' application will be at "$InstallRoot\applications\my_app\streams\_definst_\mystream.flv".

    You can connect to this application using the url "rtmp://your_server_name/my_app". To play the stream mystream.flv using video player, use the url "rtmp://your_server_name/my_app/mystream.flv".

    Regards,

    Janaki L

    3 replies

    Known Participant
    June 21, 2010

    hello

    I have another question:

    How can Isubscribe to the live stream that I'm publishing and how can html page containing the live stream be served to many users

    thanks

    Janaki Lakshmikanthan
    Adobe Employee
    Adobe Employee
    June 22, 2010

    salma_salma wrote:

    hello

    I have another question:

    How can Isubscribe to the live stream that I'm publishing and how can html page containing the live stream be served to many users

    thanks

    Use the videoPlayer.html page which has got the swf file embedded into the html page. Any browser that has got the right flash player installed will be able to play the stream. you will have to host the html in your webserver which will be served for other clients. FMS comes with apache server.

    Regards,

    Janaki L

    Known Participant
    June 22, 2010

    hello thanks for replying

    the problem is that when I put the embedded code into a html page and I host this page in the webserver (I use wamp) It will display nothing.  But when I put this html page in the webroot folder (C:\Program Files\Adobe\Flash Media Server 3.5\webroot) it display the live stream.

    I don't know how to move this page to my webserver

    Known Participant
    June 18, 2010

    hello

    In the videoplayer.html I don't find the Stream Play Button. Where can I find it?

    June 18, 2010

    You can mouse over the various controls that you see on the GUI. For the play button you will get the "play" text as tool tip.

    Regards

    Mamata

    Known Participant
    June 18, 2010

    In fact FMS is on a distant server. So I connect with ssh to this server in order to open videoplayer.html. When I put the stream url (rtmp://servername/live/livestream) and I check the Live box nothing happens and I have not a button to validate this url. Even the text below don't change and when I copy and paste the correspondant  code into an HTML file it displays nothing. I don't undertand the problem!!!

    Janaki Lakshmikanthan
    Adobe Employee
    Adobe Employee
    June 11, 2010

    Its very simple.

    1. Live application:

    First of all you need to have an application at the server side to which the publisher can publish and that can be served to subscribers. FMS installs an application called "live" inside $InstallRoot\applications\live. This will serve your purpose.

    2. Publisher:

    You can use Flash Media Live Encoder to publish your camera or use any other custom application. Say your connection url is "rtmp://server_name/app_name" and the stream you are publishing is "my_live_stream".

    3. Subscriber:

    You can use any client application to subscribe to your live application. FMS has got a sample video player which you can use. It is located at $InstallRoot\samples\videoPlayer\videoplayer.html. Here key in your url as "rtmp://server_name/app_name/my_live_stream" and select LIVE check box. Then hit Play Stream button. you can subscribe to the live stream that you are publishing. This html page can be served to many users so that you can get them to view the stream that you are publishing.

    Revert if you have more queries

    Regards,

    Janaki L

    Known Participant
    June 11, 2010

    Thanks Janaki but how can I add a new application? I tried to do it using Flash Media Administration Console but it doesn't work

    Janaki Lakshmikanthan
    Adobe Employee
    Janaki LakshmikanthanCorrect answer
    Adobe Employee
    June 22, 2010

    salma_salma wrote:

    Thanks Janaki but how can I add a new application? I tried to do it using Flash Media Administration Console but it doesn't work

    Hi Salma,

    To add an application to FMS follow the below steps

    1. Create a folder "my_app" under "$InstallRoot\applications" directory.

    2. For simple server side code... add "main.asc" file inside "$InstallRoot\applications\my_app" directory which has the content like

    application.onConnect = function(clientObj){

         trace('onConnect function");

         return true;

    }

    3. To add streams to the application, creates 'streams' folder inside "$InstallRoot\applications\my_app" directory, within that create '_definst_' folder and then place your FMS supported streams within the directory. So your streams for the 'my_app' application will be at "$InstallRoot\applications\my_app\streams\_definst_\mystream.flv".

    You can connect to this application using the url "rtmp://your_server_name/my_app". To play the stream mystream.flv using video player, use the url "rtmp://your_server_name/my_app/mystream.flv".

    Regards,

    Janaki L