开发者

camera quality in Flash

开发者 https://www.devze.com 2023-01-29 17:37 出处:网络
I have this simple code to access the webcam: var camera = Camera.getCamera(); camera.setLoopback(true);

I have this simple code to access the webcam:

var camera = Camera.getCamera();

camera.setLoopback(true);
camera.setQuality( 0, 100 );

if (camera != null){
    myVid.attachCamera(camera);
}

The quality of the video is extremely bad, with big compression fragments. I am using a built-in webcam as test, so I don't expect too much. But what I see is not normal for my webca开发者_如何转开发m.

So how do I set the quality of the video? I cannot see any difference in quality if I remove the setQuality call.


the quality is bad because you are testing it with compression: camera.setLoopback(true);.

from the documentation for setLoopback():

Specifies whether to use a compressed video stream for a local view of the camera. This method is applicable only if you are transmitting video using Flash Media Server; setting compress to true lets you see more precisely how the video will appear to users when they view it in real time.

Although a compressed stream is useful for testing purposes, such as previewing video quality settings, it has a significant processing cost, because the local view is not simply compressed; it is compressed, edited for transmission as it would be over a live connection, and then decompressed for local viewing.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号