Solved

FlashMediaServer 2 problem. The video stream is very very slow, but the audio stream is ok.

Posted on 2006-10-24
21
296 Views
Last Modified: 2008-01-09
hi,

i have a videochat application,
the code lines used for broadcasting the audio and video streams are as you find it in the sample applications from macromedia.

which i have tested but it works like this:
my friend which is in the same country with the server, when he broadcasts i (am from different country from his) receive his audio stream ok, but the problem is that i receive his video stream like slow-motion. and the video stream is getting very much behind the audio stream, it gets to be up to 10 minutes behind the audio stream.

this problem only happens when he broadcasts.
if i broadcast all goes fine.

can you please help me with this!!!?
it is very urgent and very important...

maybe some of you had the same problems, if so, please share your solutions with me.


0
Comment
Question by:ldd
  • 9
  • 9
  • 3
21 Comments
 
LVL 37

Expert Comment

by:CyanBlue
ID: 17794755
Howdy...

Does his web cam work alright on any other FMS apps???  Can you ask him to try with different camera???

CyanBlue
0
 

Author Comment

by:ldd
ID: 17794900
we have tried different webcams, but still the same results.
is it possible that this delay to be caused by some other operations within the flash application?
0
 
LVL 37

Expert Comment

by:CyanBlue
ID: 17795100
I might not be able to help you on that cuz camera issue would be the only one I can think of that might be causing such problem...

CyanBlue
0
 

Author Comment

by:ldd
ID: 17795220
there are a few lines where there are some intervals that call a specific function updating some values, do you think it could be because of that?

because i have commented out that time intervals, and now it works almost ok, meaning that it keeps up with the timing, it jumps sometimes almost 5 seconds ...
0
 
LVL 37

Expert Comment

by:CyanBlue
ID: 17796105
Well...  I am no expert in FMS, but it should not be the case because FMS generates one FLV file when you record the audio/video...  So, if you were to experience the problem, it should affect the audio and video at the same tiime which is not the case of yours...  Unless you are doing something separate in the NetStream object when playback...

I honestly cannot give you an answer of that interval related issues, but I'd be happy to take a look if you can show me some code snippet...  ;)

CyanBlue
0
 
LVL 7

Expert Comment

by:muxxter
ID: 17799681
Hi ldd.

It sounds like your settings may not be correct for the type of connection your friend is on.
You just do a simple Camera.get(), then you attach it to a NetStream object, correct?

Here's how to change the quality, and bandwidth limits for a camera:

cameraInstance.setMode(<width pix>, <height pix>, <fps>);
cameraInstance.setQuality(<bandwidth max (bytes/sec)>, <quality min (%)>);

Try messing around with these functions.
Also, what kind of program is it? Do you publish a video stream, or is it just one person publishes, while the other plays?

Gav
0
 
LVL 7

Expert Comment

by:muxxter
ID: 17799686
Erm, let me rephrase my last question:

Do you *each* publish a video stream, or is it just one person publishes, while the other plays?

Cheers
Gav
0
 

Author Comment

by:ldd
ID: 17805165
the code looks like this:
/**
 * Copyright © 2002 Macromedia, Inc. All rights reserved.  
 *
 * FCModelPresence
 * Moving or modifying this file may affect the applications installed on this server.
 */
#initclip 1

function FCModelPresenceClass() {
      this.init();
}

FCModelPresenceClass.prototype = new MovieClip();

Object.registerClass("FCModelPresenceSymbol", FCModelPresenceClass);

// We need to define the default parameters on the prototype otherwise
// AVConference which creates this component on the fly will not work
FCModelPresenceClass.prototype.soName             = "av";
FCModelPresenceClass.prototype.updateFps          = 3;
FCModelPresenceClass.prototype.vidWidth           = 320;
FCModelPresenceClass.prototype.vidHeight          = 240;
FCModelPresenceClass.prototype.vidBandwidth       = 50000;
FCModelPresenceClass.prototype.vidQuality         = 90;
FCModelPresenceClass.prototype.vidFps             = 10;
FCModelPresenceClass.prototype.bitmap           = null;

FCModelPresenceClass.prototype.init = function() {
      this.name = (this._name == null ? "_DEFAULT_" : this._name);
      this.prefix = "FCModelPresence." + this.name + ".";
//      this.level._visible = false;
};

// Called by the ConnectUser component to connect this component
// to it's NetConnection, also connects to a SharedObject that
// contains information about this instance of the Audio/Video
FCModelPresenceClass.prototype.connect = function(nc) {
      //trace("AVPresence connect");
      this.nc = nc;
      if (this.nc.FCModelPresence == null) {
            this.nc.FCModelPresence = {};
      }
      this.nc.FCModelPresence[this.name] = this;
      
      this.ns = new NetStream(this.nc);
      this.ns.owner = this;
      
      // start streaming video automatically
      this.startPublish();
      
      this.ns.updateAudioActivityBar = function(level) {
            if (this.owner.so.data.broadcast && !this.owner.audioMuted) {
                  this.owner.level.mask._height = level;
            } else {
                  this.owner.level.mask._height = 1;
            }
      }
      
      this.so = SharedObject.getRemote(this.prefix + this.soName, this.nc.uri, false);
      this.so.owner = this;
      this.so.setFps(this.updateFps);
      this.so.modelStopped = function() { /* */ };
      this.so.modelStarted = function() { /* */ };
      this.so.doTip = function(username, amount) { this.owner.doTip(username, amount); };
      this.so.logout = function( reason ) { this.owner.logout(reason); }
      this.so.showUserCam = function(username, camId)
      {  
            // set index of cam and icon on username field
            for (var i = 0; i < _root.peopleList_mc.people_lb2.length; i++){            
                  if (_root.peopleList_mc.people_lb2.getItemAt(i).data['username'] == username){                  
                        _root.peopleList_mc.people_lb2.getItemAt(i).data['camId'] = camId;
                        _root.peopleList_mc.people_lb2.setPropertiesAt(i, {icon: "icon_cam"});                  
                  }
            }      
      };
      this.so.stopUserCam = function(username)
      {
            // set index of cam and icon on username field
            for (var i = 0; i < _root.peopleList_mc.people_lb2.length; i++){            
                  if (_root.peopleList_mc.people_lb2.getItemAt(i).data['username'] == username){                  
                        _root.peopleList_mc.people_lb2.getItemAt(i).data['camId'] = 0;
                        _root.peopleList_mc.people_lb2.setPropertiesAt(i, {icon: null});                  
                  }
            }                  
      };      
      this.so.connect(this.nc);            
      // Need to call connect on our server side counterpart first
      this.nc.call(this.prefix + "connect", null);
};

FCModelPresenceClass.prototype.close = function() {
      // Let our server side counterpart know that we are going away
      this.nc.call(this.prefix + "close", null);
      this.so.owner = null;
      delete this.so.owner;
      this.so.close();
      this.so = null;
      
      this.nc.FCModelPresence[this.name] = null;
      this.nc = null;
};

FCModelPresenceClass.prototype.setUserID = function (newID) {
      this.userID = newID;

      // start publishing if necessary
      if ( this.username != null && this.needPublish != null && this.needPublish ) {
            delete this.needPublish;
            this.startPublish();            
      }
}

FCModelPresenceClass.prototype.setUsername = function(newName) {
      //trace("AVPresence setUsername:" +newName);
      this.username = newName;      
      // start publishing if necessary
      if ( this.userID != null && this.needPublish != null && this.needPublish ) {
            delete this.needPublish;
            this.startPublish();
      }
      if ((this.username != null) && (this._currentframe == 1)) {
            this.gotoAndStop("ready");
      }
};
FCModelPresenceClass.prototype.doTip = function(username, amount) {
      
      _root.chat_mc.receiveMessage("<font color=\"" + _global.userInfo['tip_color'] + "\"><i> " + username + " has just tipped you $" + amount +".</i></font><br>");
}
// Stop show
FCModelPresenceClass.prototype.stopShow = function(reason) {
      this.so.send('logout', reason);
};
FCModelPresenceClass.prototype.doFlip = function() {

      var flip = this.so.data.flip * -1;
      if (flip == 1){
                        
            this.seat_video._xscale = 200;
            this.seat_video._x = 0;
      } else {
            
            this.seat_video._xscale = -200;
            this.seat_video._x = _root.modelCam_mc.seat_video._width;
      }
      this.so.data.flip = flip ;      
};

FCModelPresenceClass.prototype.flipVideo = function() {
      
      flip = this.so.data.flip;
      if (flip == 1){
                        
            this.seat_video._xscale = 200;
            this.seat_video._x = 0;
      } else {
            
            this.seat_video._xscale = -200;
            this.seat_video._x = _root.modelCam_mc.seat_video._width;
      }
};

// Logout from chat
FCModelPresenceClass.prototype.logout = function(reason) {
      
      if (reason != "model") return;
      this.stopPublish();
      // show overlay
      _root.graymask_mc._visible = true;
      _root.overlay_mc._visible = true;      
      _root.overlay_mc.action_txt.text = "Please wait ...";            
      _root.phpService.modelLeaveRoom("self");
      
      
      // wait other users to logout
      waitOthers = function () {
            if (_root.peopleList_mc.users == 0) {
                        
                  clearInterval(_root.waitOthersInterval);
                  _root.phpService.modelLeaveRoom(reason);
            }
      }
      _root.waitOthersInterval = setInterval(waitOthers, 1000);
      waitOthers();
      
};
// Starts to publish a stream for viewing by other users
FCModelPresenceClass.prototype.startPublish = function() {
      //trace("startPublish, username:" + this.username + " userID:" + this.userID + " this:" + this);
      // Pend the request to startPublish if the userID or username has not yet been set
      if ( this.userID == null || this.username == null ) {
            this.needPublish = true;
            //trace("SP: request queued");
            return;
      }

      if (!this.so.data.broadcast && !_global.broadcasting && this.username != null) {

            //trace("Broadcasting");
            _global.broadcasting = true;
            if (gFlashCom.quality != null) {

                  // Use bandwidth management
                  this.local_cam = Camera.get(_root.camChooser_cbx.value);
                  this.local_mic = Microphone.get();
                  // Manage the quality of the camera and microphone and optionally
                  // indicate the preferred aspect ratio
                  gFlashCom.quality.manage( this.local_mic, this.local_cam, 0.75 );
            } else {
                  // Use default settings
                  this.local_cam = Camera.get(_root.camChooser_cbx.value);
                  this.local_mic = Microphone.get();
                  this.local_cam.setMode(this.vidWidth, this.vidHeight, this.vidFps);
                  this.local_cam.setQuality(this.vidBandwidth, this.vidQuality);
            }  
            this.local_cam.setLoopback(false);
            this.micInterval = setInterval(this.micOnActivity, 100, this);
            
            this.local_mic.setUseEchoSuppression(true);            
            this.seat_video.attachVideo(this.local_cam);
            
            // Start publishing stream
            this.ns.attachVideo(this.local_cam);            
//            this.ns.attachAudio(this.local_mic);                        
            this.ns.publish(this.prefix + this.soName);//, "record");
            this.nc.call(this.prefix + "startPublish", null, this.prefix + this.soName);
            //this.ns.setFps(this.updateFps); // --- added by me
            this.gotoAndStop("publishing");
            // TRICK
            _root.waitMicInterval = setInterval(this.waitMic, 1000, this);            
      }
};

// Send audio stream -> this is a trick
FCModelPresenceClass.prototype.waitMic = function(me) {
      me.ns.attachAudio(me.local_mic);
      clearInterval(_root.waitMicInterval);      
}

// Stop publishing the local stream
FCModelPresenceClass.prototype.stopPublish = function() {
      if (this.so.data.broadcast) {
            _global.broadcasting = false;
            this.nc.call(this.prefix + "stopPublish", null);
            this.ns.send("updateAudioActivityBar",1);
//            this.ns.publish(false);
//            this.ns.close();
            this.ns.attachVideo(null);
            this.ns.attachAudio(null);
            this.seat_video.attachVideo(null);
            this.seat_video.clear();
            
            // Stop managing the quality of the camera and microphone
            gFlashCom.quality.unmanage( this.local_mic, this.local_cam );
            
            delete this.local_cam;
            delete this.local_mic;
            clearInterval(this.micInterval);
            this.level.mask._height = 1;
            this.gotoAndStop("ready");
      }
};

// Updates the activity level of the local mic when active
FCModelPresenceClass.prototype.micOnActivity = function(me) {
      me.level.mask._height = me.local_mic.activityLevel * .875;
      me.ns.send("updateAudioActivityBar",Math.round(me.local_mic.activityLevel * .875));
};

// Toggles the Audio on or off locally for an incoming stream
// or Toggles the audio stream to all users if published by this user
FCModelPresenceClass.prototype.toggleAudio = function() {
      if (!this.audioMuted) {
            this.micBtn_mc.gotoAndStop("disabledOver");
            this.micBtn_mc.muted = true;
            this.audioMuted = true;
            this.ns.attachAudio(null);
            clearInterval(this.micInterval);
            this.ns.send("updateAudioActivityBar",1);
            this.level.mask._height = 1;
      } else {
            this.micBtn_mc.gotoAndStop("enabledOver");
            this.micBtn_mc.muted = false;
            this.audioMuted = false;
            this.ns.attachAudio(this.local_mic);
            this.micInterval = setInterval(this.micOnActivity, 100, this);
      }
};

// Toggles the Video on or off locally for an incoming stream
// or Toggles the Video stream to all users if published by this user
FCModelPresenceClass.prototype.toggleVideo = function() {
      if (!this.videoMuted) {
            this.camBtn_mc.gotoAndStop("disabledOver");
            this.camBtn_mc.muted = true;
            this.videoMuted = true;
            this.seat_video.attachVideo(null);
            this.ns.attachVideo(null);
            // disable audio stream here
            this.ns.attachAudio(null);
            clearInterval(this.micInterval);
            this.ns.send("updateAudioActivityBar",1);
            this.level.mask._height = 1;
            // set pause
            this.so.data.videoState = 'pause';
      } else {
            this.camBtn_mc.gotoAndStop("enabledOver");
            this.camBtn_mc.muted = false;
            this.videoMuted = false;
            this.seat_video.attachVideo(this.local_cam);
            this.ns.attachVideo(this.local_cam);
            // enable audio stream here
            this.ns.attachAudio(this.local_mic);
            this.micInterval = setInterval(this.micOnActivity, 100, this);
            // set play
            this.so.data.videoState = 'play';
      }
};

// Toggles the Video Record on or off
FCModelPresenceClass.prototype.toggleRecord = function() {
      if (!this.recordMuted) {
            this.recBtn_mc.gotoAndStop("recordOver");
            this.recBtn_mc.muted = true;
            this.recordMuted = true;
            this.nc.call(this.prefix + "startRecord", null, this.prefix + this.soName);
      } else {
            this.recBtn_mc.gotoAndStop("enabledOver");
            this.recBtn_mc.muted = false;
            this.recordMuted = false;
            this.nc.call(this.prefix + "stopRecord", null, this.prefix + this.soName);
      }
};

FCModelPresenceClass.prototype.showUserCam = function (username, camId) {
      this.so.send("showUserCam", username, camId);
};
FCModelPresenceClass.prototype.stopUserCam = function (username) {
      this.so.send("stopUserCam", username);
};

FCModelPresenceClass.prototype.startRecord = function (filename) {
      _root.phpService.modelStartRecord(filename + '.flv');
      _root.chat_mc.receiveMessage("<font color=\"" + _global.userInfo['tip_color'] + "\"><i>Record starting to file " + filename + ".flv</i></font><br>");
};

FCModelPresenceClass.prototype.stopRecord = function (filename) {
      _root.phpService.modelStopRecord(filename + '.flv');
      _root.chat_mc.receiveMessage("<font color=\"" + _global.userInfo['tip_color'] + "\"><i>Record " + filename + ".flv was saved.</i></font><br>");
};

FCModelPresenceClass.prototype.startCreateSnapshot = function () {      

      if (this.so.data.broadcast) {
            
            if (_global.userInfo["online"] == 1) {
                  this.nc.call(this.prefix + "takeSnapshot", null, this.prefix + this.soName);
            } else {

                  this.toggleVideo();
                  _root.graymask_mc._y = 0;
                  _root.graymask_mc._height = 550;
                  _root.graymask_mc._visible = true;
                  _root.overlay_mc._visible = true;
                  this.bitmap = new flash.display.BitmapData(this.seat_video._width,this.seat_video._height);
                  var m=new flash.geom.Matrix()
                  //scale the transformation matrix to match the scale of the Video object on stage
                  m.scale(2,2);
                  this.bitmap.draw(this.seat_video, m);
                  this.getPixelsFromBitmap(0);
            }                  
      }      
};

FCModelPresenceClass.prototype.getPixelsFromBitmap = function (strNumber) {
      
      var strCount = 20;
      var percents = Math.round((strNumber + strCount) * 100 / 240);      
      _root.overlay_mc.action_txt.text = 'Sending data (' + percents + '%)';
      var m_arr = new Array();
      var ind = 0;
      for (var j = 0; j < strCount; j++){
            for (var i = 0; i < 320; i++){
                  
                  m_arr[ind++] = this.bitmap.getPixel(i, strNumber + j);
            }
      }
      _root.phpService.takeSnapshotFromBitmap(strNumber, m_arr);
}

FCModelPresenceClass.prototype.stopCreateSnapshot = function (filename) {
      
      _root.phpService.modelTakeSnapshot(filename + '.flv', this.so.data.flip);
      _root.chat_mc.receiveMessage("<font color=\"" + _global.userInfo['tip_color'] + "\"><i>Snapshot " + filename + ".jpg was created.</i></font><br>");
};

// change camera
FCModelPresenceClass.prototype.changeCam = function() {
      
      if (this.so.data.broadcast) {
            
            // Stop managing the quality of the camera and microphone
            gFlashCom.quality.unmanage( this.local_mic, this.local_cam );
            this.local_cam = Camera.get(_root.camChooser_cbx.value);
            this.local_mic = Microphone.get();
            if (gFlashCom.quality != null) {

                  // Use bandwidth management
                  // Manage the quality of the camera and microphone and optionally
                  // indicate the preferred aspect ratio
                  gFlashCom.quality.manage( this.local_mic, this.local_cam, 0.75 );
            } else {
                  // Use default settings
                  this.local_cam.setMode(this.vidWidth, this.vidHeight, this.vidFps);                  
                  this.local_cam.setQuality(this.vidBandwidth, this.vidQuality);
            }
            this.local_cam.setLoopback(false);
            this.micInterval = setInterval(this.micOnActivity, 100, this);
            
            this.seat_video.attachVideo(this.local_cam);
            if (!this.videoMuted) {
                  
                  this.ns.attachVideo(this.local_cam);            
            } else {

                  this.seat_video.attachVideo(null);
                  this.ns.attachVideo(null);            
            }
      }
};

#endinitclip

stop();
0
 
LVL 7

Expert Comment

by:muxxter
ID: 17805629
Gotcha, you're using the AVPresence Component correct?

If so, you need to change the "Video Bandwidth" and "Video Quality" parameters.
From what you described in your question, I would say the bandwidth limit needs to be lower. It sounds like your friend's connection can't handle the default limit (12000 bytes/sec, or about 11 kbs). He may also have some bandwidth hogs running on his computer (file sharing progs, other web services).

Try playing around with this parameter to find the value that is lower than his connection bandwidth limit.

Cheers
Gav
0
 

Author Comment

by:ldd
ID: 17807188
the thing is that i have another flash videochat application, made by me but with my "silly knowledge",
anyway the application i've made is using the same broadcasting code lines and some lines dealing with the text chat area.
my point is that my "silly" application is running ok on fms2 (both video and audio stream are ok), but the other application (that contains the code lines above) is having the problem that i have talked about in my first post message.

i have no idea what to do, and the time is passing ...

0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

Author Comment

by:ldd
ID: 17809857
i have noticed that the version of AVPresence used in the code above is from year 2002,
but i also noticed that there is another version of AVPresence released in 2005.
could it make some difference ? anyway i'll be checking line by line the two versions.
please let me know if you have some other oppinion about this.

thanks
0
 
LVL 7

Expert Comment

by:muxxter
ID: 17812811
Well, to be honest, it's actually easier to do the work yourself.

All the AVPresence is, is a Video object with a nice skin. (Personally, I don't even really like it that much)
But you can do everything with a couple Video objects and a couple TextAreas.

Streaming the video is about 10 lines of code, and chatting is about another 10 or so. I can get you started with just video (and audio) for now. Then I can help you add chat after that:

First, add a Video object to the library. Right click on the library and select "New Video", then give it a name and drag a copy (or two) to the stage and give each of those instance names (say "vid1" and "vid2"). Also, put a couple text boxes and a button on the stage (me_txt, them_txt and connect_btn respectively). These will be how you know what to call your streams, and will invoke connecting to your FMS server.

Then in your actionscript, have the following code:

var me_cam:Camera = Camera.get();
var me_mic:Microphone = Microphone.get();
var my_nc:NetConnection = new NetConnection();
var out_ns, in_ns:NetStream;

my_nc.onStatus = function(info) {
    if (info.code == "NetConnection.Connect.Success") {
        start_session(me_txt.text, them_txt.text);
    }
    else {
        out_ns.close();
        in_ns.close();
        vid1.attachVideo(null);
        vid1.clear();
        vid2.clear();
    }
}

function start_session(me:String, them:String) {
    out_ns = new NetStream(my_nc);
    out_ns.attachVideo(me_cam);
    out_ns.attachAudio(me_mic);
    out_ns.publish(me);

    in_ns = new NetStream(my_nc);
    in_ns.play(them);

    vid1.attachVideo(me_cam);
    vid2.attachVideo(in_ns);
}

connect_btn.onRelease = function() {
    my_nc.connect("rtmp://<enter the ip of your server here>/<application name>");
}
...
You two will have to agree on what you're going to call your streams before you connect, but this is way simpler than what the AVPresence and a SimpleConnect do. I suppose a good thing about the simple connect is that you don't have to decide what everyone is going to name their stream. You just connect and it handles it for you. But you can do this yourself.

Let me know if you'd like to know any more. :-)

Ciao
Gav
0
 

Author Comment

by:ldd
ID: 17832257
anyway, do you know how can i make the sound stream more fluent ... because it seems its being interrupted sometimes, should i be using a buffer for the stream ?!
0
 
LVL 7

Expert Comment

by:muxxter
ID: 17834696
Flash actually does all the buffering for you.

The sound would also get choppy as you run out of bandwidth.

Did you try lowering the bandwidth limit?
0
 

Author Comment

by:ldd
ID: 17835059
should i try to lower the bandwitdh to 12000 ? as i've seen in the AVPresence example from macromedia?
0
 
LVL 7

Expert Comment

by:muxxter
ID: 17836264
12000 is actually the default value.

Try 10 or 8000. You'll get better framerate, but the video image start to get pixelly
0
 
LVL 7

Expert Comment

by:muxxter
ID: 17859463
Erm. Sorry 'bout that.

You'll get better framerate, but the video image will start to get pixelly at around 8000.

Gav
0
 

Author Comment

by:ldd
ID: 17953918
i have tried every way that you said in your messages, to use any values arround 10000, also 8000, its true that the image get pixelly, but finally i have another question for you:
what is this line doing ?

gFlashCom.quality.manage( this.local_mic, this.local_cam, 1 ); //// (*)
because when i use it the bandwidth is unlimited (as i've seen from my tests)

and if i remove the line above (*) everything will work as specified in these lines:
FCModelPresenceClass.prototype.updateFps          = 3;
FCModelPresenceClass.prototype.vidWidth           = 320;
FCModelPresenceClass.prototype.vidHeight          = 240;
FCModelPresenceClass.prototype.vidBandwidth       = 50000;
FCModelPresenceClass.prototype.vidQuality         = 90;
FCModelPresenceClass.prototype.vidFps             = 10;

meaning that the bandwidth will be limited to about 500kbps (where available)

am i right? or do i just think its like that ...

please explain this if you know more about it.
0
 
LVL 7

Accepted Solution

by:
muxxter earned 500 total points
ID: 17957321
Hmm.

Well, from what I can tell, (*) ensures audio and video picture quality are met. But all the documentation I've read says that it will still obey bandwidth limit.

Yes, all those parameters tell the AVPresence how to behave. When you have a minimum quality higher than what your bandwidth limit will allow, when it starts getting close to the band limit, the only way it can obey the band limit is to sacrifice frame rate. However, Flash can't detect when the connection can't handle the bandwidth limit you give it. All it knows is that it's taking less than the number you give it, so it just keep pumping data into it without realizing that it needs to slow down.

Let me know if that answers your questions. :-)

Cheers
Gav
0
 

Author Comment

by:ldd
ID: 17959715
well, its not very clear what and if that line obeys the bandwidth limit, because i have did some tests, and it was going crazy consuming the bandwidth,

for example:
me - i dont have very good internet connection, my bandwidth is up/down same about 256kbps-300kbps, which is poor for video/audio streaming
but my friend - has better internet connection, which allows him to upload even with 900kbps, which is ideal for streaming ...

so first we have tested with that line active, and tests were very bad... he was sending too much data which i couldnt receive, and the latency was going up to 11 seconds!!!

but after a lot of cursing and other *beeps* :) i have commented out that line,
and the tests were very good, i am uploading the same amount of data (arround 256kbps),
and my friend is uploading up to 500kbps, which is very good because now i get latency values up to 1.5 seconds, but most of the time latency stays under 1 second.

now i think we will work with the line commented out, and maybe later we will study more about that line and find out why or if it would be good to use it.

thank you again, Guv... even if you didnt help me so much, you have opened up my eyes :)
so i can see now the application from another angle.

i will award you the points for this question,
and i will hope that you will allow me to contact you if i'll have more questions about flash applications ... maybe if you can, please leave me an email address.
0
 
LVL 7

Expert Comment

by:muxxter
ID: 17959987
Well, I'm glad I could at least give you some valuable information about FMS.

But remember, the AVPresence is actually not a very good way of broadcasting video. The easiest and most stable way is to just do it with Video objects and handle the NetStreams and NetConnections yourself. I'd be more than happy to help you with some basics of doing it that way.

Hmm. I don't really like giving out my email addy to boards like this without knowing who is going to be viewing it. But if you make posts to the Flash board with "FMS" or "Gav, HELP" in the title, I guarantee that I will answer them. :-)

Gav
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now