Skip to main content
Participant
May 14, 2010
Question

FMS 3.5 webcam recording, FLV playback crash browser

  • May 14, 2010
  • 1 reply
  • 1750 views

Hello there,

I was wondering is any of you can help me with my problem. I'm building a webcam recording and playback application,  I'm using Flash media interactive server 3.5.3 and my Flash player is the latest version. I'm authoring my application on Flash cs4and publishingfor AS3, flash player 10


Most of the time, if I make a recording and previews it there are pauses and gaps, then most of the time it continues to play and sometimes it crashed the browser.

heres my cam and microphone settings.


               __cam = Camera.getCamera()
                __cam.setMode(320,240,16)
                __cam.setKeyFrameInterval(4)
                __cam.setQuality(57344,0)
               
                __mic = Microphone.getMicrophone()               
                __mic.codec = SoundCodec.SPEEX
                __mic.encodeQuality = 4;
                __mic.gain = 50
                __mic.setSilenceLevel(1)

for the FMS backend I used the DVR record method, wherein I listen for netstream onPublish and records it, and unPublish will stop the recording. On my local development server, I never experience the problem.

Hope you can help me on this one. thanks.

    This topic has been closed for replies.

    1 reply

    Adobe Employee
    May 14, 2010

    Hi,

    It may be due to ns.bufferTime very less which you can check in your netstream messages on client side by attaching netstream status handler if you are getting NetStream.Buffer.Empty messages frequently or not. If you are getting Buffer.Empty messages frequently then set your bufferTime to a reasonable value like 10 seconds.

    Regards,

    Amit

    Participant
    May 17, 2010

    Yeah, I notice that I have the NetStream.Buffer.Empty frequently, does the bufferTime adjustments set on the playback stream or the live stream? Thanks.

    Adobe Employee
    May 17, 2010

    Hi Mike,

    BufferTime is set for the NetStream which you create using your NetConnection and which is used for playing the stream which may be either live or recorded. Hence you just need to follow these lines to set bufferTime:

    var nc:NetConnection = new NetConnection();

    nc.connect("rtmp://someServer/someApp");

    var ns:NetStream = new NetStream(nc);

    ns.setBufferTime(10);

    video.attachVideo(ns);

    ns.play("video1");

    Hope this helps to answer your query.

    Regards,

    Amit