11 Replies Latest reply on Apr 28, 2010 8:53 PM by Michael Thornburgh

    Integration of Java Screen Capture into Stratus

    rombooth1 Level 1

      Dear all

       

      I try to implement a Screen Sharing application and want to make use of the P2P functionality of Flash Player 10.1. I am able to create a RTMP stream out of Java and send it to a RTMP server.

       

      How would the setup look like if I want to make use of the new P2P system? I think it should work like this:

      1) capture in java on local computer

      2) send to Flex application on same local computer

      3) publish as multicast.

       

      I do not see how to code the second point. There is a Merapi bridge out there, connecting Air and java. Is this the right way? Do other solutions exisit? I preferably would like to be able to stream inside flex webapplication as well.

       

      Or is this the right approach:

      1) capture in java on local computer

      2) send it from java to a Content delivery network

      3) attach to the same stream, but out from flex

      4) make a p2p muliticast out from flex

       

      with this second approach I would be able to use bandwidth only for one client and not for all clients. It would not be pure P2P though.

       

      Any help would be greatly appreciated!

       

      Thanks,

      Marc

        • 1. Re: Integration of Java Screen Capture into Stratus
          Michael Thornburgh Adobe Employee

          at this time, you can only do a P2P multicast publish of your local camera and microphone (and NetStream.send()s) from Flash Player.  your screen capture would have to appear to Flash Player as a system camera.

           

          you can't play a stream from a server and republish it into a P2P group with Flash Player.

          • 2. Re: Integration of Java Screen Capture into Stratus
            rombooth1 Level 1

            Hi Michael

             

            I did a test here and have a question: Attaching a (virtual/emulated) camera triggers a security question. Is it possible to suppress this dialog? Or is it possible to do a entry in the trusted websites in a kind of one time setup routine?

             

            From my eperience privacy settings of flash player are not widely known, and asking during a desktop sharing session for camera access when it is a virtual camera for the desktop could be confusing.

             

            Thanks and regards,

            Marc

            • 3. Re: Integration of Java Screen Capture into Stratus
              Michael Thornburgh Adobe Employee

              the security question can't be suppressed.  this is a feature.

               

              users can permanently allow (or deny) a domain access to the camera/microphone using the settings manager:

               

                 http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager.html

              • 4. Re: Integration of Java Screen Capture into Stratus
                rombooth1 Level 1

                Hi Michael

                 

                I am looking for a working multicast sample that demonstrate its functionalities as well as a useful webcast introduction fully dedicated to multicasting. I browsed the web and could not find any.

                 

                Another thing: I read somewere that you could use flash players p2p functionality without the stratus server - just do a NetConnection.connect("rtmfp:"). I guess flashplayer will works in conjunction with the NetGroup.addNeighbor function. This is made for small groups, correct?

                 

                A last thing: Joining a group gives another security dialog to pop up. Will / is there be a feature like a trusted group that can be set so the security dialog will not pop up every time you join a group?

                 

                Thanks for your time,

                Marc

                • 5. Re: Integration of Java Screen Capture into Stratus
                  Michael Thornburgh Adobe Employee

                  you can make a "serverless RTMFP NetConnection" by doing NetConnection.connect("rtmfp:").  these special NetConnections can be used for P2P Groups (multicast, posting, directed routing, object replication) *only* on the LAN -- peers use IP multicast on the LAN to find each other.  NetGroup.addNeighbor() won't work without a server.

                   

                  these special NetConnections can also be used for NetStreams that receive a pure IP multicast stream (no P2P).  in this very special case, you can suppress the "Peer Assisted Networking" permission box if you set GroupSpecifier.peerToPeerDisabled=true.

                   

                  the "Peer Assisted Networking" permission dialog has a "Remember" box for the user to remember his choice.  this is per-domain.

                   

                  the only cases where the permission dialog won't pop up are: the user has remembered a choice for the domain, or P2P is disabled for the group.

                   

                  regarding a working multicast sample: please see my MAX 2009 materials; i posted them in this thread:

                   

                     http://forums.adobe.com/message/2423240#2423240

                  • 6. Re: Integration of Java Screen Capture into Stratus
                    rombooth1 Level 1

                    Hi Michael

                     

                    One idea I had while watching Matthew Kaufmanns Max presentation: Using Object Replication for desktop sharing. Matthew mentioned a whiteboard as a usecase, so perhaps a desktop sharing could be a usecase as well? This depends on the latency of object replication. Do you have any experience with this usecase in Object Replication?

                     

                    Your documentation and example: Thanks! I worked through the docs and runned the example on my machine. One thing I wonder is that there is a delay/latency of a few seconds on the same machine. Any reasons for this? I was expecting no delay or perhaps a few fractions of a second of delay.

                     

                    Security dialogs: I understand the need of adding a security dialog for cameras and microphones / joining a group. I think from user perspective to be confronted with two dialogs one after the other is confusing - I would think it would be better to have ONE combined dialog if you do both: Join a group and attach a microphone/camera.

                     

                    Regarding examples: you have an example that is that nice like the one you gave me for direct routing and one for object replication?

                     

                    Thanks agian for your time!

                    Marc

                    • 7. Re: Integration of Java Screen Capture into Stratus
                      Michael Thornburgh Adobe Employee

                      we don't have samples for directed routing or object replication at this time.

                       

                      the P2P multicast system necessarily involves a delay (up to the NetStream.multicastWindowDuration); this is a window of time during which each peer will try to obtain the pieces of the multicast stream and reassemble them into the continuous stream for playback.  the delay can be shorter, but that reduces the opportunities to get all the pieces, which can decrease the playback quality (artifacts, missing frames, glitches, etc).  there will be a delay even on your local machine as the stream starts because the two Flash Player instances are starting from scratch and creating the push spanning trees slowly/carefully (there are no special cases for "same computer" peers).

                      • 8. Re: Integration of Java Screen Capture into Stratus
                        rombooth1 Level 1

                        Hi Michael

                         

                        regarding security dialogs you wrote: "the "Peer Assisted Networking" permission dialog has a "Remember" box  for the user to remember his choice.  this is per-domain."

                         

                        Is this the setting that gets saved in the http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager06.htm l webprivacy settings? Like this access to microphone/camera are suppressed so I guess it will be the same for the Peer Assisted Networking dialog. Correct?

                         

                        Thanks,

                        Marc

                        • 9. Re: Integration of Java Screen Capture into Stratus
                          Michael Thornburgh Adobe Employee

                          the remembered setting for Peer Assisted Networking will be accessible in a similar settings page once Flash Player 10.1 ships.  until it ships, the new global settings panels will not be available, unfortunately.

                          • 10. Re: Integration of Java Screen Capture into Stratus
                            rombooth1 Level 1

                            Hi Michael

                             

                            thanks. I played today with the multicast example and created a rtmp example. The latency there is very low in a LAN - 0.5 to 1second. With flash P2P I had about 5 to 8 seconds. Is this the latency that I have to expect from P2P mulitcast when the final version is released?

                             

                            Regards,

                            Marc

                             

                            P.S: I was not able to change the settings of NetStream.multicastWindowDuration - all settings did not apply - there was no change in latency. I tried it with the viewer and publisher.

                            • 11. Re: Integration of Java Screen Capture into Stratus
                              Michael Thornburgh Adobe Employee

                              5 to 8 seconds is not unreasonable for P2P multicast.

                               

                              the NetStream.multicastWindowDuration should be set on the publishing NetStream *before* you issue the publish() call.  once you call NetStream.publish(), the stream parameters as they were at that time will become the defaults at all of the subscribers.  if you change the parameters later on the publisher, they will only affect the publisher.  local overrides at subscribers must be reapplied each time you receive a NetStream.MulticastStream.Reset NetStatusEvent.