Skip to main content
Participating Frequently
March 21, 2011
Question

Pure IP multicast

  • March 21, 2011
  • 1 reply
  • 2294 views

I'm developping a video player for Pure IP multicast video.

1.- I'm using the Multicast Configurator provided with FMS 4 for generating the configuration. This is the manifest file generated:

<manifest xmlns="http://ns.adobe.com/f4m/1.0">

  <id>Multicast_IP_Multicast</id>

  <streamType>live</streamType>

  <duration>0</duration>

  <media url="rtmfp:" rtmfpGroupspec="G:0101210558cc3408e77326e2fa1c53c52697d73e1b02182c358c57075cd9a58ed1a25241010d160e666d732e6d756c7469636173742e6578616d706c65210e8555a813f0c73cd8f5384e0fba657163ab87e76c25b6f82be9b94777b2d52cfe00070aefff00fe7530" rtmfpStreamName="livestream"/>

</manifest>

2.- I'm publishing a live video from FMLE in FMS 4.

3.- I tested the video with the multicastplayer provided with FMS and It works properly.

4.- Then, I'm developping my own video player, I'm not using OSMF libraries, I prefer programming it by myself. This is the code I'm using:

                var groupspec:GroupSpecifier = new GroupSpecifier(GROUP);

                groupspec.peerToPeerDisabled = true;

                groupspec.multicastEnabled = true;

                groupspec.addIPMulticastAddress(MULTICAST_IP);

                stream = new NetStream(netConnection,groupspec.groupspecWithAuthorizations());

                stream.addEventListener(NetStatusEvent.NET_STATUS, netStatus);

// .....................
                case "NetStream.Connect.Success":   
                        stream.play(STREAM);
                        video.attachNetStream(stream);
                break;
Where:

            private const SERVER:String = "rtmfp:";
            private const MULTICAST_IP:String = "239.255.0.254:30000";
            //private const GROUP:String = "com.adobe.pureIPMulticastGroup";
           private const GROUP:String = "G:0101210558cc3408e77326e2fa1c53c52697d73e1b02182c358c57075cd9a58ed1a25241010d160e666d732e6d756c7469636173742e6578616d706c65210e8555a813f0c73cd8f5384e0fba657163ab87e76c25b6f82be9b94777b2d52cfe00070aefff00fe7530";
            private const STREAM:String = "livestream";
That's not working. And I have several doubts about it:

1.- It's not working, and I don't know where is the error. I'm not sure what I should add as parameter in GroupSpecifier constructor? GroupSpecs from manifest file?? "com.adobe.pureIPMulticastGroup"??

2.- I've been watching the multicast.as application in FMS4. The only way of publishing multicast streams in FMS4 is using the configurarion from Multicast Config Tool?? Is it possible publishing a stream without the GroupsSpec generated by the Config Tool?

3.- If It's mandatory using the config tools for managinf the pure ip multicast. I would like to integrate the Multicast Config Tool in my platform. Is there any place where I could get the code of Multicast Config Tool?? Any documentation about how to build it?? This component have any flashvars or callbacks that could allow me integrate it in my platform?

Thank you very much,

Iván

    This topic has been closed for replies.

    1 reply

    March 25, 2011

    Hi,

    The multicast config tool (configurator) is part of a publishing workflow.  It's used to generate the manifest file for the client and a publish stream name + query string that is required by the default "multicast" server-side application that ships with FMS.  If you intend to use the "multicast" server-side app that ships with FMS, then at a minimum you will need to supply the app with a properly formatted stream name. Otherwise it will reject the publish.  The app expects the following parameters:
    fms.multicast.type =  1,2, or 3 where 1=Fusion, 2=IP Multicast, 3=App Multicast only
    fms.multicast.groupspec = the groupspec string with authorizations
    fms.multicast.address = the multicast address you're publishing to, required if IP multicast or Fusion, optional if you're using app-level multicast only

    The assembled streamname would look something like:
    livestream?fms.multicast.type=2&fms.multicast.groupspec=G%3A0101...&fms.multicast.address=224.0.0.254%3A30000

    From what I can tell, you are not generating the same groupspec in your app that you are publishing with.  You will need to call groupspec.setPublishPassword in your code with the same password you are using in the config tool if you're trying to match a publish string generated in the config tool.  The group's name and multicast addresses should also match.

    The config tool is not required for publishing a multicast stream.  It's merely to aid with creating groupspecs and generating the proper stream names for the server-side app.  The source for the config tool will be included with a future release of FMS.

    The actual groupspec generation, which accounts for about 2% of the code, is about 8 lines.  The rest is all UI, etc....
    Here are the (pseudo) lines:
    var groupspec = new GroupSpecifier(group name)
    groupspec.multicastEnabled = true
    groupspec.setPublishPassword(publish password)
    groupspec.serverChannelEnabled = true if Fusion or P2P, false if IP Multicast
    groupspec.ipMulticastMemberUpdatesEnabled = true if Fusion or P2P, false if IP multicast
    groupspec.peerToPeerDisabled = true if IP Multicast, false otherwise
    groupspec.addIPMulticastAddress(multicast address and port)
    groupspec.makeUnique() if that option is selected, you wouldn't use this if you're creating groupspecs in two different apps as this adds randomness to the groupspec string

    It's simply a matter of generating the groupspec with or without authorizations then depending on where you intend the groupspec to be used.

    Hope this helps,

    - brad

    ivangetaAuthor
    Participating Frequently
    March 25, 2011

    Hi,

    First of all thank you for the response about the Multicast Config Tool. Now It's clear for creating it, really simple.

    About the multicast player, I don't understand it yet. From what I can understand:

    - The manifest.f4m file generated by the Config Tool is enought for the multicast cast example player provided with FMS4 for playing properly the stream. So I don't understand why you tell I should add the password in my player code.

    - So, the point is. The manifest.f4m file generated from the config tool, has 3 parameters that should be enought for playing the stream (because the example player do it):

    url="rtmfp:"

    rtmfpGroupspec="G:0101210558cc3408e77326e2fa1c53c52697d73e1b02182c358c57075cd9a58ed1a25241010d160e666d732e6d756c7469636173742e6578616d706c65210e8555a813f0c73cd8f5384e0fba657163ab87e76c25b6f82be9b94777b2d52cfe00070aefff00fe7530"

    rtmfpStreamName="livestream"

    But I don't know how to set them in GroupSpec, NetConnection and NetStream for making it work. Could you help me with that?

    Thank you very much,
    Iván

    ivangetaAuthor
    Participating Frequently
    March 25, 2011

    Going deeply in OSMF code I just found the answer.

    So, If I have the group spec string, I don't need to use the GroupSpec object. I only have to do this:

               private const SERVER:String = "rtmfp:";
               private const GROUP_SPEC:String = "G:0101210558cc3408e77326e2fa1c53c52697d73e1b02182c358c57075cd9a58ed1 a25241010d160e666d732e6d756c7469636173742e6578616d706c65210e8555a813f0 c73cd8f5384e0fba657163ab87e76c25b6f82be9b94777b2d52cfe00070aefff00fe75 30";
              private const STREAM:String = "livestream";

                  stream = new NetStream(netConnection, GROUP_SPEC);

                  stream.addEventListener(NetStatusEvent.NET_STATUS, netStatus);

    // .....................

                    case "NetStream.Connect.Success":  
                            stream.play(STREAM);
                            video.attachNetStream(stream);
                    break;
    Thank you;
    Iván