A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Using attachVideo and attachAudio on same netstream causes CHOPPY video?

  1. #1
    Lifesaver Lightwave Network's Avatar
    Join Date
    Sep 2002
    Location
    Denver, CO, USA
    Posts
    649

    Using attachVideo and attachAudio on same netstream causes CHOPPY video?

    Hello all...

    I'm trying to skoosh a little bug...

    For some reason, when I attach audio and video to the same netstream, my video becomes quite choppy and lagged.

    Maybe I'm supposed to be using separate streams for the A/V, but according to what I've read, you can do either or.

    Here's a very stripped down version of my scripts, which is where the problem lies:

    code:

    localCam = Camera.get(0)
    localMic = Microphone.get(1)
    localCam.setMode(160, 120, 20)
    myVid.attachVideo(localCam)
    SERVER_IP = "127.0.0.1"
    fCom = new NetConnection()
    fCom.connect("rtmp://" + SERVER_IP + "/MYAPP", "Josh Cooper", "Lightwave");
    vStream = new NetStream(fCom)
    vStream.attachVideo(localCam)
    //vStream.attachAudio(localMic)
    vStream.publish("Josh Cooper", "live")



    Now, if I simply copy/paste the above into a new Flash movie on frame 1, and drop in a video instance called myVid, everything works nicely and smoothly. HOWEVER, if I uncomment the attachAudio() line, then play the movie, my video becomes all funkified--choppy and lagged.

    Is there something I may be missing?

    Thanx for the help!


    ... gimme just one more line of code to ease the pain.

    http://www.ln.tv
    http://www.davevillano.com
    http://www.premierloftsdenver.com
    http://www.backyard.cc -- coming soon!


  2. #2
    psx = new Moderator();
    Join Date
    Jan 2001
    Posts
    923
    I tried it out here but didn't seem to have any troubles. How are you testing to see if the video is choppy? I mean, is the video on the receiver's end choppy, or the local display becoming choppy?

    Either way, 20 fps is a bit to ask of flashcom, or more specifically most network connections. Though since you're testing it locally it shouldn't be causing problems.

    If the received video is choppy, you can maybe try something like this, which on my end seemed to improve the quality of the video:

    localCam.setQuality(100000,100);

    psx

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center