Skip to main content
February 21, 2010
Answered

Broadcast recorded video

  • February 21, 2010
  • 1 reply
  • 4734 views

Hello,

I have tried to stream live video from webcam and it goes very well. Now I would like to know how to broadcast video that I've been stored in server and make it live (as what happened with the webcam) to client? I want the client to view the video at the same point as the other client does.. Can anyone help me how make this?

    This topic has been closed for replies.
    Correct answer SE_0208

    Hai there. Thanks a lot. I have tried create the folder as u mentioned above and save the "sample.flv" file under _definst_ folder as figure below.

    I also have created "main.asc" document under test folder using your above code. I also changed the time to 5PM (as the time here).

    Then for Flowplayer coding I made as below:

    $f("fms", "flowplayer-3.1.5.swf", {
                    clip: {
                        url: 'mylive',
                        provider: 'rtmp',
                        autoPlay : true,
                        live: true
                    },
                    plugins: {
                        rtmp: {
                            url: 'flowplayer.rtmp-3.1.3.swf',
                            netConnectionUrl: 'rtmp://myIPaddress/test/streams/_definst_/'
                        }
                    }
                });

    Except for the flowplayer coding, was everthing I have done above is correct?? If correct then it must be something that I need to change inside the flowplayer coding.


    Just make one change:

    Instead of this : netConnectionUrl: 'rtmp://myIPaddress/test/streams/_definst_/'  use 'rtmp://myIPaddress/test"

    Please let me know if this works.

    Also if possible , try without date logic, see if it plainly works. Then we can work on date logic once we know that play is working fine.

    1 reply

    Participating Frequently
    February 22, 2010

    Its very simple. You just need to use Stream API on server-side to achieve this:

    Say you have recorded filed named "sample.flv" and want to stream it as live: So you need to have following server-side code:

    var myStream;

    application.onAppStart = function(){

         myStream = Stream.get("mylive");

         myStream.onStatus = function(info){

              trace("Stream status:"+ info.code);

         }

         myStream.play("sample",0,-1,true);

    }

    Client needs to subscribe to "mylive" - ns.play("mylive",-1,-1,true);

    Above is bare minimum code , if you need any more help do let us know.

    February 22, 2010

    Thanks for the reply. Im still new into this. I am doing web development using PHP MySQL. How can i include this code into <html>? Do u have any sample page that I can refer with?

    Participating Frequently
    February 22, 2010

    Wait a minute, are you trying to stream recorded content from client end i.e. via Flash Player. I don't think that's possible. What solution i gave you server-side solution. You just need to load the application and automatically the server-side code would get triggered and it will broadcast the recorded file. But the file needs to at server-end. So you first need to copy all your media files at server end.