Skip to main content
Participant
October 5, 2009
Answered

Quality when streaming through flash is worse than Live Encoder

  • October 5, 2009
  • 3 replies
  • 1093 views

I am creating a system where people can broadcast video to a Flash Media Server. When I broadcast to the stream using live encoder, the video looks decent. When I try to broadcast from Flash, the video comes out heavily pixilated.

The only code I can find to do it is:

cam = Camera.getCamera();

cam.setQuality(0, 100);

ns = new NetStream(nc);
ns.attachCamera(cam);

Shouldn't there be a way to input resolution? Live encoder has ~15 settings, are these settings adjustable when publishing from Flash?

    This topic has been closed for replies.
    Correct answer calmchessplayer

    you need to set mode also

    camera0.setMode(240,320,30,false);

    3 replies

    Participant
    October 6, 2009

    Thanks guy!

    I knew there had to be settings!

    October 5, 2009

    The only video encoder (Sorenson Spark / H.263) is a really poor codec in terms of bitrate vs. quality. It's fast, but it's ugly. FMLE uses VP6 or H.264, both of which provide much better quality vs. bandwidth.

    In actionscript, the bandwidth argument of the camera.setQuality method is bytes per second, not kilobits per second. So, what you have now:

    cam.setQuality(0, 100);

    is 100 bytes per second, which translates to 0.8kbps. Way to low.

    calmchessplayer
    Inspiring
    October 5, 2009

    by setting the first paramter to 0 and the second to 100 tell the server to use as much bandwidth as needed to achive 100% quality?....doesn't setting the first paramber to something other than 0 tell the server to use that number of bytes to achive quality?

    October 5, 2009

    You're right... thanks for pointing that out. See what happens when I answer forum posts before coffee?

    calmchessplayer
    calmchessplayerCorrect answer
    Inspiring
    October 5, 2009

    you need to set mode also

    camera0.setMode(240,320,30,false);