About Flash P2P live streaming from non-webcam sources

Hello, I am a university student. Our lab is attempting to work on a p2p live streaming using flash p2p features. The media source is not from a webcam but a file from a certain server, which is not directly supported by any of the 4 methods flash player offers(posting, direct routing , object replication,and multicast.) As some of the forum threads mentioned, our method is to use NetStream.publish() a stream and use send("callbackname", data)  to all subscribers that have joined in a NetGroup. So we can use p2p transmission. Now here are our questions:
1. We know from MAX 2009 that flash p2p camera video multicasting implements pull-push mechanism inside which makes full use of p2p features like buffer map exchange. If we use NetStream.send() API to send non-webcam source data, will it also make use of this pull-push mechanism to spread data among all peers(subscribers) with proper data exchange?
or more detailedly,
I saw the P2P Gaming Libs at flashrealtime.com. It uses DIRECT_CONNECTIONS when creating publish-used NetStream in order to send data with lowest latency. My question is if I do not use DIRECT_CONNECTIONS, than when the NetGroup grow large (1000), will those peers that are not direct neighbors to the publisher in the same group relay data to each other using pull-push via buffer map?
2. I have written a sample app and use send() to deliver data only (NetStream.bufferTime = 0) without camera video and audio. When the publisher sends the data  in a "for()" stantence for 20 times, the subscribers can only receive about 8 of them. But when I set a timer and periodically send them(e.g., 500ms), the subscribers can receive them correctly. My questions are: Is the packet loss caused by UDP unreliability? Can this be solved by setting the NetStream.dataReliable = ture? Can this totally be solved by setting a timer? How to set the delaytime property in timer? Are all data sent are orderedly received?
I'm very appreciated if you can answer my questions? thanks.

1. NetStream.send() data is delivered in the order it was sent, whether in client-server, DIRECT_CONNECTIONS, or multicast mode.
2. the lowest latency will be achieved with DIRECT_CONNECTIONS.  however, that isn't scalable to large numbers of recipients.  the P2P multicast system trades low latency for scalability.
3. there are no plans to support a natural NetStream streaming source that's not a camera/microphone.  Flash Media Server can perform that function.
4. you should never need to implement "bitmap exchange"; the object replication system handles all the communication needed to accomplish its function. typically you will divide a file into segments, giving each one an index number. object replication uses ranges internally, so the index numbers should be contiguous.  nodes that have indices use NetGroup.addHaveObjects().  nodes that want indices they don't have use NetGroup.addWantObjects().  nodes that have objects will send them to nodes that want the objects.  when a node receives an object, it's automatically removed from its "want" set; once the node decides the object is acceptable, it adds it to its "have" set, at which point it can answer requests from other nodes who still "want" it.  eventually every node will have all the pieces and not want any.  for an example, please see Tom Krcha's articles on using object replication:
   http://www.flashrealtime.com/file-share-object-replication-flash-p2p/
   http://www.flashrealtime.com/video-on-demand-over-p2p-in-flash-player-101-with-object-repl ication/
5. please see Tom Krcha's articles.  for VOD you will probably want to use the "LOWEST_FIRST" replication strategy, as that may allow you to start playing earlier.  for general file replication you'll get better sharing if you use RAREST_FIRST.

Similar Messages

  • Live Streaming from Video File

    Hi everyone,,, im newbie in programming streaming video with flash....ater reading documentations i tried the instructions on doc, i got a question that i've not been solved. How to make a "live streaming" from "video file". It likes a live streaming from camera but it uses video file  as the source.... many thanks

    Do you mean you have video file but you want to publish it as live stream , am i right? If yes following is the solution, but before that let me clarify you will need server to do it , i mean there is no way Flash client (i.e. .swf file running in Flash Player) can publish file from local disk.
    Now let me tell you how to do it from server:
    Place your video file under "streams" folder of your application i.e. say "myVideo.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("livestream");
         mystream.play("myVideo",0,-1,true);
    This will publish "myVideo" file as live stream under name of "livestream". Client would have to subscriber using NetStream and
    use ns.play("livestream",-1,-1)
    You might have to write some extra code if you want to loop same file else once play of recorded file gets over , live publish will automatically stop.
    let me know if this solves your problem

  • Live Streaming Using my Webcam As a secruity camera

    I'm lost here someone please help, : \ im trying to use my isight as a security camera over the internet so i can watch my dog i just got her.
    So the question is what software out there i can use to put my webcam as a camera ( again my powerbook is kinda old im still running on panther so i have 10.3.9 not 10.4 can i work anyway around this) where i can watch live.
    Can someone help me i know i need my ip address i have that but when i hook everythign else up where do i go when im somewhere else when i want to look at my live streaming from work to my house? please can someone help me thank you if you can. : )

    Hello, keith28
    Until we hear back from juanorfrankie, here is my suggestion for your question:
     I would like to access the isight using my iPhone.
     Can anyone make some suggestions?
    If iPhone will can support viewing a streaming webcam page, use EvoCam with your iSight to publish a webcam with streaming video. That would probably be the simplest way to do what you want, but, because I do not have iPhone, so I cannot test this.
    See the instructions and FAQs at EvoCam for system requirements and details on how to set up your webcam page.
    EZ Jim
    PowerBook 1.67 GHz   Mac OS X (10.4.10)    G5 DP 1.8  External iSight

  • Flash Media Live Encoder and 5 webcams

    Hi,
    Quick question - I need to stream live video from 5 webcams
    to the server. It's not a problem when I have just one, but don't
    have a clue how to do it with 5 different ones? I need to record
    flv at the same time as well.
    Can I do it using one computer or would I need to have
    different software ? I know there is a way to control streams using
    command line - will that help?
    What kind of machine I should get for that job? It would be
    standard 320x240 stream, no sound.
    Desperately waiting for quick reply.

    Please update us when FMLE OSX is deployed.  BTW, I get that the server market is dominated by LINUX/WINDOWS and this is a FMS add on. But, my shops creative workflow is Mac based for obvious reasons.  Encoding is part of our editing workflow and thus needs to be mac based.  Throw us a bone please.

  • Could you play a live stream from safari to apple tv without going through itunes?

    could you play a live stream from safari to apple tv without going through itunes?

    There is no way to stream Safari content, with or without iTunes, to your AppleTV.
    The only way would be to use a mirroring feature given that you have an AppleTV 2nd gen or newer and a 2011 or newer MBP running mountain lion.
    If not, some third party software like AirParrot can also gives you way to mirror your MBP display on the TV.

  • Capturing, timestamping and saving a video stream from a webcam ?

    Hello everybody,
    Glad to be in this forum.
    I got to do a program in java doing :
    - a capture of a video stream from a webcam
    - adding time and date on it
    - saving the video stream in a video format compatible with linux and windows
    Is it possible to do that in java (using JMF I guess) ?
    Could anyone help me to progress on my project ?
    thx a lot
    agussi

    Hi agussi, yes, it's possible to do that in Java using JMF.
    I'm not a JMF expert, but I've found this code very useful: http://forum.java.sun.com/thread.jspa?threadID=570463&tstart=50
    This piece of code shows the webcam stream and you can take snapshots with it. With a little tweak you can do what you are expecting.
    I hope this helps.
    Ivan

  • Problem playing remote live stream from FMS

    Hello all,
    I'm having problems playing remote live streams from FMS (server-side) that I can play with any other player (client-side)
    Example of server-side application which plays a remote live stream:
    nc = new NetConnection();
    nc.connect("rtmp://remoteserver/live");
    stream = Stream.get("localStream");
    stream.play("remoteStream.flv", -1, -1, true, nc);
    This code works only sometimes.
    Most of the times, FMS is able to connect to remote string and the localStream dispatches events:
       NetStream.Publish.Strart
       NetStream.Play.Reset
    In this case, FMS is publishing the local stream but it is not playing the remoteStrem on it.
    The rest of the times, localStream dispatches events:
       NetStream.Publish.Strart
       NetStream.Play.Reset
       NetStream.Play.Start
       NetStream.Data.Start
    In this case FMS plays the remoteStream correctly.
    Any hint to solve this issue?
    Regards.

    Thanks, I tried your code and it works when playing a remote live stream on another FMS.
    But the remote live stream is not on a FMS but on a Wowza Server which re-streams an RTSP stream over RTMP.
    With this code:
    var nc;
    var myStream;
    application.onAppStart = function(){
         nc = new NetConnection();
         myStream = Stream.get("localstream");
         myStream.onStatus= function(info){
               trace(info.code);
         nc.onStatus = function(info){
               trace (info.code);
               if(info.code == "NetConnection.Connect.Success" ){
                    myStream.play("remoteLive.sdp", -1, -1, true, nc);
         nc.connect("rtmp://remoteServer/live");
    Every live stream player I tried was able to play the remote stream "remoteLive.sdp", but FMS play it only sometimes. This is the output log of the FMS application:
    NetConnection.Connect.Success
    NetStream.Publish.Start
    NetStream.Play.Reset        <--------------------------------- Stuck there, stream won't play
    Unloaded application instance wowza4/_definst_ <--- Reload app
    NetConnection.Connect.Success
    NetStream.Publish.Start
    NetStream.Play.Reset        <--------------------------------- Stuck there, stream won't play
    Unloaded application instance wowza4/_definst_ <--- Reload app
    NetConnection.Connect.Success
    NetStream.Publish.Start
    NetStream.Play.Reset
    NetStream.Play.Start         <--------------------------------- Stream is playing just fine
    NetStream.Data.Start
    Unloaded application instance wowza4/_definst_ <--- Reload app
    NetConnection.Connect.Success
    NetStream.Publish.Start
    NetStream.Play.Reset       <--------------------------------- Stuck there, stream won't play
    Any idea? Why FMS won't play it everytime?
    Regards

  • How can I save to computer a live streaming from Ustream

    Hi
    That's the question.
    I want to save a live streaming from Ustream.
    any help?
    tnx.

    Install Livestramer (with all python dependencies)
    https://wiki.archlinux.org/index.php/Livestreamer
    livestreamer -p vlc https://www.ustream.tv/embed/9979779
    Found matching plugin ustreamtv for URL https://www.ustream.tv/embed/9979779
    Available streams: 240p, 240p_alt_akamai, 360p, 360p_alt_akamai, 480p, 480p_alt_akamai, 720p+ (best), 720p+_alt_akamai, mobile_240p (worst), mobile_360p, mobile_480p
    livestreamer -p vlc https://www.ustream.tv/embed/9979779 720p+
    same with mpv-Player

  • Live editing from 2 video sources on macbook pro

    Hi
    I want to edit live video from 2 input sources, HD camera and RGB out from a video projector. Can anyone suggest firstly the way I would get both sources into the macbook and secondly what software I would use to edit on the fly. Possibly not edit but have 2 windows showing simultaneously on screen.
    I know I can record the video onto the camera and record the rgb to the macbook then sync them later in final cut but I would like to do it realtime if possible to save time.
    thanks

    The source is a laptop showing a keynote presentation. I want to video the presenter and display the keynote in sync with each other on a split screen. As I said I can do this in post production but wanted to do it live to save editing as it is a process that I will be repeating many times.

  • Master Data cleansing and transformation from non-SAP source systems

    Hi all,
    Our client (Media)wants to cleanse and transform his master data from non-SAP source system to be uploaded into BW (no R/3 yet). If anybody has a document regarding this topic that i could use, i will appreciate if u sent it to me.
    thanks.

    Hi,
    https://websmp203.sap-ag.de/~sapidb/011000358700001965262003
    https://websmp203.sap-ag.de/~sapidb/011000358700006591612001
    https://websmp203.sap-ag.de/~sapidb/011000358700001971392004
    https://websmp203.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000471477&_OBJECT=011000358700008927932002E
    /manfred

  • Flash streaming from non-native websites not working on 10.1

    Note: I am running:
    Windows 7 64 bit
    Internet explorer 8 32 bit, Firefox 3.6.3 (32 bit)
    Flash player version: 10.1.53.64
    Graphics card: Nvidia GeForce GTS 240
    Graphics card driver: 257.21
    Hi, Adobe Flash 10.0 was working perfectly until I upgraded it to 10.1. When I upgraded it to 10.1 by uninstalling the old version and installing the new version, the streaming function partially stopped working. I also upgraded Firefox separately, and the streaming function is working perfectly. However, my streaming Pandora Gadget on my desktop is NOT working correctly, it shows only a teeny box with a couple of shapes & colors in it, no error message whatsoever. The same is true for when I try and use embedded Youtube videos (such as on the Yahoo! website) on Internet Explorer 32 bit, but the videos on youtube directly are working perfectly. When I go to the Flash Install screen, it says it installed itself correctly, and shows the animation. I tried disabling the Hardware Acceleration, but it still didn't work on the non-native websites & the Pandora Gadget. When use an administrator account, both Internet Explorer & the Pandora Gadget work, anything I could do to make flash run in a user account besides changing them to administrator?

    There are a number of posts in this forum regarding Flash Player 10.1 and non-Admin accounts not working correctly. So far there seems to be no solution apart from reverting back to 10.0

  • About Flash Media Live Encoder

    Please teach Flash Media Live Encoder.
    Are you preserved only in the local though provide the recording function in FME?
    It will be able to record directly in FMS.
    Does the recorded image preserve the image from the camera directly or is what has flowed by way of FMS preserved?

    Hi
    Flash Media Live Encoder is just like Windows media encoder.
          You can connect your device (example : webcam) then Open Flash Media Live Encoder then left side you will find the Video Device. Just select your your device name.
       Right side you will find 2 options
                                  1. Directly streaming into Media server (adobe)
                                  2. Store into hard drive

  • Sending Live Stream from one FMS to another FMS

    Hey,
    Here's what I would like to do:
    1. The Flash Media Encoder sends a live stream to FMS 1
    2. On FMS 1, a connection to FMS 2 is set up and the live
    stream is sent to FMS 2.
    3. Every second, a message with metadata is sent to FMS 2
    using Stream.send()
    4. A Client connecting to FMS 2 receives the stream and the
    metadata that was sent along with it.
    I know this sounds pretty confusing, but the main problem is,
    that I don't have access to the FMS 2, so I can't call
    Stream.send() there. First I thought the solution would be using
    Stream.play() with a remote connection, but when I call the
    Stream.send() method nothing happens on the client side.
    Then I thought I could do the whole thing by using a client
    side application that connects to FMS 1, receives the stream,
    embeds the metadata and publishes it to FMS 2. Here's the code I
    used:
    // Connect to FMS 1 to get stream
    client_nc.connect("rtmp://localhost/encoder_stream/room_01",
    "Client");
    // Create input stream
    in_ns = new NetStream(client_nc);
    // Connect to FMS 2
    akamai_nc.connect("rtmp://localhost/akamai/room_01",
    "Client");
    // Create new stream, feed with in_ns and send to FMS2
    out_ns = new NetStream(akamai_nc);
    out_ns.publish("stream");
    out_ns.attachVideo(in_ns);
    Unfortunately the attachVideo method only accepts a camera
    and not a netstream object.
    So this is where I'm standing now... anyone any ideas?
    thanks

    Hello,
    i've asked our Akamai contact and they say it's not possible
    to install any scripts on their servers. I think the only way is to
    push the stream from FMS1 to FMS2, but since FMS doesn't support a
    push method, there i have to find another way *sigh*
    I've heard about FMS version 3 coming up soon, and I'd really
    like to play around with the alpha version. Any idea where you can
    get it from? On Steve Wolkoffs blog it says the new FMS is going to
    support a push method:
    http://blogs.adobe.com/dreaming/2006/10/fmsnext_feature_open_thread.html
    I've also played around with the Red5 server, but I couldn't
    find anything there to achieve a server side push method. Does
    anyone have any experience with Red5 and live streaming?
    Cheers!

  • How can you record stream from a webcam like YouTube does it

    We need to create a webcam stream recorder with FMS which should be able to record stream in some predefined quality (128000/bandwidth,95/quality) and will work also in the situation when the user doesn't have enough bandwidth to transfer this stream in realtime.  YouTube has a solution which is using something like a buffer and when the user stops recording they continue to send video data to the server until the stream is completely recorded.  We are recording the stream from our user's webcam, but when the bandwidth is not consistent or not enough, we are losing video data and ending up with poor quality recordings. What we need is that the record stream is buffered on the user's computer and the video data continues to be sent to our server even after the user has finished recording so that we end up with the complete stream (video data). We need some idea how to do this - which specific features should we used for this solution?

    Does it have to be a live solution? Or can you have the user record locally and then upload to your FMS server?

  • Live Streaming from static video file

    Hi everybody,
    I'm using Amazon Cloud & Flash MMedia Server 4.5.
    I would like to take one of my exits videos (a static file), and turn it into a live stream. People can view this video (synchronous). I'm using Flash Media Live Encoder 3.2, but it only capture video from devices as camera...
    How I can do it?
    Cheers.

    Hi Huy,
    Please find the zip attached where I have written the scripts for you to deploy on your local FMS server, in context of option 2:
    You may like to follow these steps:
    1. unzip the folder.
    2. deploy FLVpublishonLoad (in case your recorded file is a FLV use case) on your lcoal server
    3. deploy toPublish on your remote aws server
    4. make sure to correct the path for aws in FLVPublishonLoad application @ line#19:
    // Please mention your aws instance hostname instead of localhost , and application name ....
    nc.connect("rtmp://localhost/toPublish");
    5. go to admin console of your local development server and load the instance of FLVPublishonLoad as shown in the howtoLoadfromAdminConsole.png image attached for refrence purpose.
    6. it will automatically connect to the "toPublish" app on your remote server and start publishing your local vod file as a live stream to your aws instance
    7. start your subscriber app and subscribe to the stream you have used in FLVPublishonLoad app for Stream.get() method, see line#29 and the subscriberScreenExample.png file attached for the illustration purpose.
    few points to note here:
    1. I have removed the sample.flv and "sample1_1500kbps.f4v" for keeping the zip size lower.
    2. You need to put your stream name at line#55 where you call mystream.play()
    3. The stream name that you specify in Stream.get() will be used by subscribers.
    4. if your use case is mp4, then please use "MP4PublishonLoad" instead of "FLVPublishonLoad" application.
    =============
    As I am unable to attach the files here therefore copy-pasting the code for you and others to be re-used:
    =======
    main.asc code for FLVPublishonLoad:
    var nc;
    var ns;
    application.onAppStart = function()
        trace("hello client: ");
        publishIt();
    function publishIt()
        trace("publishing");
        nc = new NetConnection();
        // Please mention your aws instance hostname instead of localhost , and application name ....
        nc.connect("rtmp://localhost/toPublish");
        nc.onStatus = function(info)
            trace(info.code);
        ns = new NetStream(nc);
        // Exact stream name available for subscribers .....
        mystream = Stream.get("myvodfile");
        mystream.onStatus = function(sinfo)
            trace("mystream.onStatus: "+sinfo.code);
            if(sinfo.code == "NetStream.Publish.Start")
                attach_retVal = ns.attach(mystream);
                if(attach_retVal==true)
                        trace("stream attach was successful ...");
                        startPublish();
                else
                    trace("The attempt to attach stream source to NetStream failed");
        // Please put the stream name here inside double-quotes that you want to publish and is available there in streams/_definst_ folder ......
        mystream.play("sample",0,-1,true);
    function startPublish()
        ns.publish(mystream.name,"live");
    main.asc code for MP4PublishonLoad:
    var nc;
    var ns;
    application.onAppStart = function()
        trace("hello client ");
        publishIt();
    function publishIt()
        trace("publishing");
        nc = new NetConnection();
        // Please mention your aws instance hostname instead of localhost , and application name ....
        nc.connect("rtmp://localhost/toPublish");
        nc.onStatus = function(info)
            trace(info.code);
        ns = new NetStream(nc);
        // Exact stream name available for subscribers .....
        mystream = Stream.get("mp4:myvodfile.f4v");
        mystream.onStatus = function(sinfo)
            trace("mystream.onStatus: "+sinfo.code);
            if(sinfo.code == "NetStream.Publish.Start")
                attach_retVal = ns.attach(mystream);
                if(attach_retVal==true)
                        trace("stream attach was successful ...");
                        startPublish();
                else
                    trace("The attempt to attach stream source to NetStream failed");
        // Please put the stream name that you want to publish and is available there in streams/_definst_ folder ......
        mystream.play("mp4:sample1_1500kbps.f4v",0,-1,true);
    function startPublish()
        trace("#### " + mystream.name);
        ns.publish("mp4:" + mystream.name,"live");
    main.asc code for "toPublish" app
    =====================
    application.onPublish = function(clientObj, streamObj)
        trace("published: " + streamObj.name);
    =====================
    Please revert back to me in case of further query.
    Regards,
    Shiraz Anwar

Maybe you are looking for