How to control basic Camera parameters like fps, screen size?
You propose use WebcamPublisher.resolutionFactor ?
I dont undestend how it works.
Specifies the resolution factor of captured data;
ResolutionFactor values range from 1 (lowest resolution) to 10 (highest resolution).
Resolution factor gets multiplied by the native width and height of captured camera.
We provide three native width and height values based on aspect ratios.
That width and height when multiplied with this factor, gives the resolution.
For higher resolution, use a value like 5.
You provide 3 native? values?
Let say i set 10, i have like 412 x 412. Ok. But where resolution ratio like 4:3...
About FPS. I can set fps only after event of publishing phase? Because after creating WebcamPublisher, camera getter is null.
Please advice how to control Camera with WebcamPublisher?
For now i have all streams in 1:1 ratio.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Nicolas,
I agree that this API could be easier and more useful... The good news is that you can pretty easily extend the WebcaPublisher to put whatever you'd like in. I'd override updateCameraSettings() and replace the switch statement with whatever custom width and height you'd like.
nigel
Views
Replies
Total Likes
Any advice? -)
Views
Replies
Total Likes
I also played arround with WebcamSubscriber options like size and I only got 1:1 ratio working too. I only changed the hights of WebcamSubscriber. the ratio should default to the publishing cam, but I dont thing this is the case. I think its publishing 1:1 and receiving 1:1.
Views
Replies
Total Likes
Hi Nicolas,
Most of the quality settings that WebcamPublisher allows you to set are a wrapper to the flash.media.Camera api. So for more info on how to change and set quality settings, please refer - http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/Camera.html#setMode()
Also , you can set FPS before publishing. It gets set when your camera is instantiated, and the camera is instantiated only when you begin publishing.
Hope this is of little help to you, and I am sure the API reference link would do a better job than me
Thanks
Arun
Views
Replies
Total Likes
Wrapper?
So why publisher changes resolution of stream to 1:1 aspect ratio?
With setMode I can easily reach any frame size, with resolutionFactor I always has 1:1 aspect ratio, why?
Could you share code of wrpapper? (where resolutionFactor takes his place on setMode)
Views
Replies
Total Likes
Its the code of WebcamPublisher.as . You could find it in SDK source. YourSDKFolder/libs/player10 or player10.1/src/com/adobe/rtc/collaboration/WebcamPublisher.as
So this is code that sets camera settings
/**
* @private
*/
protected function updateCameraSettings():void
{
if (_camera == null) {
return;
}
switch (_streamManager.aspectRatio) {
case StreamManager.AR_STANDARD:
//trace("#WebCamPublisher# _camera.setMode("+StreamManager.AR_STANDARD_W*_captureWidthHeightFactor+", "+StreamManager.AR_STANDARD_H*_captureWidthHeightFactor+", "+_fps+")");
_camera.setMode(StreamManager.AR_STANDARD_W*_captureWidthHeightFactor, StreamManager.AR_STANDARD_H*_captureWidthHeightFactor, _fps);
break;
case StreamManager.AR_PORTRAIT:
//trace("#WebCamPublisher# _camera.setMode("+StreamManager.AR_PORTRAIT_W*_captureWidthHeightFactor+", "+StreamManager.AR_PORTRAIT_H*_captureWidthHeightFactor+", "+_fps+")");
_camera.setMode(StreamManager.AR_PORTRAIT_W*_captureWidthHeightFactor, StreamManager.AR_PORTRAIT_H*_captureWidthHeightFactor, _fps);
break;
case StreamManager.AR_LANDSCAPE:
//trace("#WebCamPublisher# _camera.setMode("+StreamManager.AR_LANDSCAPE_W*_captureWidthHeightFactor+", "+StreamManager.AR_LANDSCAPE_H*_captureWidthHeightFactor+", "+_fps+")");
_camera.setMode(StreamManager.AR_LANDSCAPE_W*_captureWidthHeightFactor, StreamManager.AR_LANDSCAPE_H*_captureWidthHeightFactor, _fps);
break;
}
//trace("#WebCamPublisher# _camera.setKeyFrameInterval("+_keyFrameInterval+")");
_camera.setKeyFrameInterval(_keyFrameInterval);
setCameraQuality(); //will update the bw used
}
So when you set resolutionFactor, you set the _captureWidthHeightFactor variable in the code, and it updates the width & height of the Camera.setMode API.
Thanks
Arun
Hi Nicolas,
I agree that this API could be easier and more useful... The good news is that you can pretty easily extend the WebcaPublisher to put whatever you'd like in. I'd override updateCameraSettings() and replace the switch statement with whatever custom width and height you'd like.
nigel
Views
Replies
Total Likes
How to control basic Camera parameters like fps, screen size?
yes learn this camera basic
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies