闪光灯:提高相机的数据速率/质量

发布于 2024-08-22 01:37:21 字数 279 浏览 4 评论 0原文

我正在使用优质 USB 摄像头眼下。在驱动程序提供的查看器中查看时,相机的视频质量非常好(我认为它是使用 C++ 实现的)。正如预期的那样,Flash 无法提供相同水平的质量。

但是,考虑到我对运行 Flash 的本地计算机具有完全的设置控制权,我可以选择哪些选项来提高 Flash 中传入的本地视频流的质量?

I'm working with a good quality usb camera at the moment. The video quality of camera is quite good when viewed in the viewer supplied with the drivers (I presume it's implemented using C++). And as to be expected Flash cannot deliver the same level of quality.

But what are my options to improve the quality of an incoming local video stream in Flash, considering I have complete setup control over the local machine the flash is running on?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

病毒体 2024-08-29 01:37:21

正如 Todd 指出的那样,setQuality() 很好,但是使用 setMode() 您可能会看到更直接的结果,它可以让您设置分辨率和帧速率。如果您只是设置标准相机源,然后将视频对象的大小调整为 640x480 之类的值,那么它只会使用像素加倍,除非您在相机对象本身上使用 setMode(640, 480, 30)。

作为参考,除非您使用 setMode() 手动设置,否则您的实际视频输入将以 160x120 渲染。

希望有帮助!

setQuality() is good as Todd points out, but you may see a more immediate result with setMode() which lets you set the resolution and framerate. If you just set a standard camera feed and then resize your video object to something like 640x480 it'll just use pixel doubling unless you use setMode(640, 480, 30) on the Camera object itself.

For reference, unless you set that manually with setMode() then your actual video input is rendering at 160x120.

Hope that helps!

夏了南城 2024-08-29 01:37:21

使用公共函数 setQuality(bandwidth:int,quality:int):void

请参阅: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/media/Camera.html#setQuality%28%29 了解更多信息

语言版本:ActionScript 3.0
运行时版本:AIR 1.0、Flash Player 9

设置每秒最大带宽量或当前传出视频源所需的图像质量。此方法通常仅适用于使用 Flash Media Server 传输视频的情况。

使用此方法可以指定传出视频源的哪个元素对您的应用程序更重要 - 带宽使用或图像质量。

* To indicate that bandwidth use takes precedence, pass a value for bandwidth and 0 for quality. Flash Player transmits video at the highest quality possible within the specified bandwidth. If necessary, Flash Player reduces picture quality to avoid exceeding the specified bandwidth. In general, as motion increases, quality decreases.
* To indicate that quality takes precedence, pass 0 for bandwidth and a numeric value for quality. Flash Player uses as much bandwidth as required to maintain the specified quality. If necessary, Flash Player reduces the frame rate to maintain picture quality. In general, as motion increases, bandwidth use also increases.
* To specify that both bandwidth and quality are equally important, pass numeric values for both parameters. Flash Player transmits video that achieves the specified quality and that doesn't exceed the specified bandwidth. If necessary, Flash Player reduces the frame rate to maintain picture quality without exceeding the specified bandwidth.

参数
Bandwidth:int — 指定当前传出视频源可以使用的最大带宽量(以字节/秒为单位)。要指定 Flash Player 视频可以使用所需的尽可能多的带宽来维持质量值,请传递 0 作为带宽。默认值为 16384。

quality:int — An integer that specifies the required level of picture quality, as determined by the amount of compression being applied to each video frame. Acceptable values range from 1 (lowest quality, maximum compression) to 100 (highest quality, no compression). To specify that picture quality can vary as needed to avoid exceeding bandwidth, pass 0 for quality.

use the public function setQuality(bandwidth:int, quality:int):void

see: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/media/Camera.html#setQuality%28%29 for more information

Language Version : ActionScript 3.0
Runtime Versions : AIR 1.0, Flash Player 9

Sets the maximum amount of bandwidth per second or the required picture quality of the current outgoing video feed. This method is generally applicable only if you are transmitting video using Flash Media Server.

Use this method to specify which element of the outgoing video feed is more important to your application—bandwidth use or picture quality.

* To indicate that bandwidth use takes precedence, pass a value for bandwidth and 0 for quality. Flash Player transmits video at the highest quality possible within the specified bandwidth. If necessary, Flash Player reduces picture quality to avoid exceeding the specified bandwidth. In general, as motion increases, quality decreases.
* To indicate that quality takes precedence, pass 0 for bandwidth and a numeric value for quality. Flash Player uses as much bandwidth as required to maintain the specified quality. If necessary, Flash Player reduces the frame rate to maintain picture quality. In general, as motion increases, bandwidth use also increases.
* To specify that both bandwidth and quality are equally important, pass numeric values for both parameters. Flash Player transmits video that achieves the specified quality and that doesn't exceed the specified bandwidth. If necessary, Flash Player reduces the frame rate to maintain picture quality without exceeding the specified bandwidth.

Parameters
bandwidth:int — Specifies the maximum amount of bandwidth that the current outgoing video feed can use, in bytes per second. To specify that Flash Player video can use as much bandwidth as needed to maintain the value of quality, pass 0 for bandwidth. The default value is 16384.

quality:int — An integer that specifies the required level of picture quality, as determined by the amount of compression being applied to each video frame. Acceptable values range from 1 (lowest quality, maximum compression) to 100 (highest quality, no compression). To specify that picture quality can vary as needed to avoid exceeding bandwidth, pass 0 for quality.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文