Professional Web Applications Themes

Re-sync out of sync live streams - Macromedia Flash Flashcom

Hi Guys, I'm testing an application I've created. It's basically a 2-way A/V chat, with a text chat application on there as well. Each user publishes a live stream, which is recorded on the server and then resent back down to the other user. I've been testing it locally and everything is fine, so I signed up to Influxis on their Nitrous plan to give it a test run over the Internet. Each stream is publishing a 32Kbps video + 8Kbps audio stream. Each user has a fast broadband connection, with around a 140 ping to the server. Over time, ...

  1. #1

    Default Re-sync out of sync live streams

    Hi Guys,

    I'm testing an application I've created. It's basically a 2-way A/V chat, with
    a text chat application on there as well.

    Each user publishes a live stream, which is recorded on the server and then
    resent back down to the other user.

    I've been testing it locally and everything is fine, so I signed up to
    Influxis on their Nitrous plan to give it a test run over the Internet.

    Each stream is publishing a 32Kbps video + 8Kbps audio stream. Each user has a
    fast broadband connection, with around a 140 ping to the server.

    Over time, around 10 minutes or so, the live streams get quite far out of
    sync. It can take over 20 seconds for the stream to reach the other person,
    making a "live" chat quite useless.

    If I stop and start the streams again, it brings everything back into line, so
    I'm considering this as a potential resolution.

    I'd really like to know why this sort of thing occurs, how I can minimise it,
    and how to recover from it when it does happen.

    Any help would be appreciated!

    BenderB Guest

  2. #2

    Default Re: Re-sync out of sync live streams

    Can you elaborate what mechanism is being used to publish live streams?
    namitagrawal Guest

  3. #3

    Default Re: Re-sync out of sync live streams

    Thanks for your quick response!

    I setup the cams like this:

    live_cam.setMode(320, 240, 15);
    live_cam.setQuality(32768, 80);
    live_cam.setKeyFrameInterval(20);
    var live_mic:Microphone = Microphone.get();
    live_mic.setRate(8);
    live_mic.setSilenceLevel(20, 2000);
    var live_cam:Camera = Camera.get();

    Then start the netstreams:

    var out_ns:NetStream;
    out_ns = new NetStream(nc);
    out_ns.attachAudio(live_mic);
    out_ns.attachVideo(live_cam);
    out_ns.publish("ns_tutorAV_CS", "live");

    My server side code then grabs the Client Side live stream, and records it:

    var ns_tutorAV = Stream.get("ns_tutorAV_SS");
    ns_tutorAV.play("ns_tutorAV_CS",-1,-1);
    ns_tutorAV.record("append");

    The other client then receives the stream:

    in_ns= new NetStream(nc);
    in_ns.setBufferTime(0);
    streaming_video.attachVideo(in_ns);
    in_ns.play("ns_tutorAV_CS");

    Sorry, couldn't work out how to attach code?

    Thanks for your help!

    BenderB Guest

  4. #4

    Default Re: Re-sync out of sync live streams

    Which version for FMS are you using ?

    your code seems fine to me; If it sure that application runs fine on your own
    local setup; and problem comes only when you use Influxis setup, then you might
    want to check with them for following settings :


    - Server side buffer (should be minimum)
    - Live aggregate messages (should be disabled) (applicable only in FMS 3.0)
    - Audio Combine Samples (it should be completely off)


    fmslove Guest

  5. #5

    Default Re: Re-sync out of sync live streams

    Increase the rate of the audio to 22. This will rid the app of latency, not what you would expect, but supposedly it works.
    Graeme Bull Guest

Similar Threads

  1. Mac Sound Sync
    By jacaru in forum Macromedia Flash Player
    Replies: 1
    Last Post: April 30th, 06:28 PM
  2. RSO sync
    By calmchess333 in forum Macromedia Flash Flashcom
    Replies: 0
    Last Post: October 9th, 02:26 PM
  3. Lip Sync
    By andy@norton in forum Macromedia Flash Flashcom
    Replies: 0
    Last Post: March 1st, 04:58 PM
  4. Using ASP .NET to Sync 2 databases
    By Si in forum ASP.NET Web Services
    Replies: 1
    Last Post: January 8th, 07:49 PM
  5. sync webservice
    By Dino Chiesa [MSFT] in forum ASP.NET Web Services
    Replies: 1
    Last Post: July 19th, 12:52 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139