all groups > macromedia flash flashcom > august 2007 >
You're in the

macromedia flash flashcom

group:

About FMS2 Connection


About FMS2 Connection Jonson_chen
8/29/2007 12:31:58 AM
macromedia flash flashcom:
Hi all

i want to publish microphone audio to the server but failed. stream always
show "live" on fms2_console, and no flv is published on server.
this is my client-script:

Code:
import flash.net.*;
import flash.events.*;
stop();

NetConnection.defaultObjectEncoding = ObjectEncoding.AMF0;
var nc:NetConnection = new NetConnection();
var ns:NetStream;
function ncHandler(eve:NetStatusEvent):void
{
trace(eve.info.code);
if(eve.info.code == "NetConnection.Connect.Success")
{
ns = new NetStream(nc);
ns.addEventListener(NetStatusEvent.NET_STATUS, nsHandler);
ns.attachAudio(Microphone.getMicrophone());
ns.publish("blackcamera", "record");
}
}

function nsHandler(eve:NetStatusEvent):void
{
trace(eve.info.code)
}


nc.addEventListener(NetStatusEvent.NET_STATUS, ncHandler);
nc.connect("rtmp://localhost/myApplication");
then, i create a folder called "myApplication" on server root but not create
main.asc(i don't think it's necessary).

i run the client and trace "NetConnection.Connect.Success
" and "NetStream.Publish.Start". the server works well but the stream' type
always "live", and the bandwidth shows nothing.

thanks:sad;
Re: About FMS2 Connection VashDStampede
8/31/2007 4:38:47 PM
I've had the same problem. I cannot guarantee this is the solution, but it
seems there's some issue on whether you have an installed camera or not. If you
have no camera, then flv are not created. Install a virtual camera or a webcam
on the client side and try again. You'll notice the flv is created.
Re: About FMS2 Connection Jonson_chen
9/3/2007 4:49:08 AM
thank u VashDStampede.

i installed virtual camera and server began to record! but i have another
question. i just wanna record sound with microphone, not camera, how should i
solve this problem?the sound recording still didn't work this time. thanks.
AddThis Social Bookmark Button