Skip to main content
Known Participant
October 27, 2010
Question

FMS Multicast streaming

  • October 27, 2010
  • 4 replies
  • 4480 views

Guys,

1) Can FMS do multicast streaming through internet rather than only LAN?

2) Can we create multicasting of recorded video files stored on the server rather than LIVE video multicasting?

Any help or pointers will be appreciated.

    This topic has been closed for replies.

    4 replies

    Participating Frequently
    October 18, 2011

    Number 2, yes it's posible and very easy I used Vcam is a virtual cam software and open almost any file and with adobe encoder instead of choosing your PC web cam you chose Vcam as a video source and that will let you brocast recorded video like you are broacasting life... hope it's help you.

    Participant
    July 29, 2011

    Hi,

    We're probably just not looking at the problem definition in the same way.  Fundimentally we are attempting to have (A) one FMS application begin the looped playback of a video stream into (B) a seperate multicast application (the FMS server canned multicast application).  Amit does have the right idea but there's a typo in his example.  Note below a quick example.

    /* 

      Description: Server side looped playback of a single video reel into a multicast.

      Author:      Gilbert Flamino (www.newnetwork.cc)

    */

    var stream;

    application.onAppStart = function() {

      var loopPlayback = true;

      var sourceFileName = "vte2";

      stream = Stream.get("liveStream");

      playStream(sourceFileName);

      stream.onStatus = function(info) {

        switch (info.code)

        {

        case "NetStream.Play.Stop":

          if (loopPlayback) {

            trace("[Restarting video]");

            playStream(sourceFileName);

          }

          break;

          default:

        }

      }

    // Connect to canned multicaster 

      nc = new NetConnection();

      nc.connect("rtmfp://localhost/multicast/");

      ns = new NetStream(nc);

      ns.bufferTime = 5;

      ns.attach(stream);

      ns.publish("vte2?fms.multicast.type=2&fms.multicast.groupspec=G%3A010121055e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8010d160e666d732e6d756c7469636173742e6578616d706c6500070ae00000fe7530091570617373776f7264&fms.multicast.address=224.0.0.254%3A30000&fms.ipMulticastMemberUpdatesEnabled=true");

    }

    // Play a stream

    function playStream(streamName)

    {

      stream.play(streamName, 0, -1);

    }

    The source video file should live beneath the applications in a '[app]/streams/_definst_' folder.  The multicast definition stuff is just a cut-and-paste from the mulitcast configurator that comes with the FMS server.  To run this example successfully you will need to update the multicast parameters and provide a source video file!

    Thank you again Amit for getting us going!

    Participant
    July 13, 2011

    Is there a full example script, tutorial, or other reference that demonstrates this method that you know of?  Could you post an example main.asc?

    Adobe Employee
    July 14, 2011

    Place your video file under "streams" folder of your application i.e. say "recordedStream.flv" under  <FMS root>/applications/myApp/streams/_definst_
    Now write following code in your main.asc file (this file would be under <FMS root>/applications/myApp )

    var mystream;
    application.onAppStart = function(){
         mystream = Stream.get("recordedStream");
         mystream.play("livestream",0,-1);
    }

    Above server side script publishes recorded file as livestream.

    Participant
    July 14, 2011

    Thank you for the reply!

    This is a fine example but I guess what went unsaid is that this appears to be a method of *Unicasting* a stream.  Unless I am completely misunderstanding; using this method, client players will connect to this FMS _application_ and see the playback, but each individual client will be consuming its own stream. 

    I was hoping the example would illustrate how one might feed the playback of a recorded video into a (native ip) multicast - sort of how one (using FMLE) injects encoded live video into the multicast application that comes canned with FMS 4.

    Adobe Employee
    October 28, 2010

    1. I dont think it is possible. As multicast is distributed over the network using network routing capabilities. It mostly works in internal, enterprise, VPN or LAN networks - basically in closed networks, which supports that.

    2. Yes I think it can be done but not sure.

    Regards,

    Amit

    Asa_-_FMS
    Adobe Employee
    Adobe Employee
    October 28, 2010

    Number 2 can be done.  You're going to want to check out the FMS 4 documentation and samples for this, but essentially you're going to be publishing from FMS into the RTMFP group and your source of playback stream will be a VOD asset that FMS is playing back.  So it's equivalent to the live sourcing operation.


    Asa

    Participant
    December 20, 2010

    Is there some step-by-step somewhere on how to publish a file as a live stream?