GithubHelp home page GithubHelp logo

why not working in 4K? about usbcamera HOT 6 OPEN

stweily avatar stweily commented on July 23, 2024
why not working in 4K?

from usbcamera.

Comments (6)

secile avatar secile commented on July 23, 2024

I have never tested 4k camera.

The library is based on DirectShow which is legacy technology, so that could be the reason.
please refer the article below.
https://stackoverflow.com/questions/63393696/4k-mjpeg-camera-video-preview-with-delay-on-windows-10

The other possibility is a lack of transfer rate.
I'm not familiar with transfer rate or video codec, forgive me if I tell you wrong information.

What VideoFormat are you using? I assume that you are using YUY2 format with USB2.0 interface.

3840 x 2160 image has 8294400 pixels.
Single pixel is consist of RGB 24bit, so single frame is about 23MB with uncompressed.

Video is compressed with YUY2 which compression rate is 66%, single frame is about 15MB.

USB2.0 band width is 480Mbps in spec, but it actually may 240Mbps(=30MB).
Frame rate 1-2fps may be reasonable.

from usbcamera.

stweily avatar stweily commented on July 23, 2024

我从未测试过 4k 相机。

该库基于 DirectShow,这是传统技术,因此这可能就是原因。 请参考下面的文章。 https://stackoverflow.com/questions/63393696/4k-mjpeg-camera-video-preview-with-delay-on-windows-10

另一种可能性是传输速率不足。 我对传输速率或视频编解码器不熟悉,如果我告诉你错误的信息,请原谅我。

您使用什么视频格式?我假设您使用的是带有USB2.0接口的YUY2格式。

3840 x 2160 图像有 8294400 像素。 单个像素由RGB 24bit组成,因此单帧未压缩时约为23MB。

视频采用YUY2压缩,压缩率为66%,单帧约15MB。

USB2.0的带宽规格上是480Mbps,但实际上可能是240Mbps(=30MB)。 帧速率 1-2fps 可能比较合理。

but use AmCap its can 4K 30fps, use WPFMediaKit.Core (also directshow ) it 4K12 FPS!

from usbcamera.

secile avatar secile commented on July 23, 2024

Oh, really?
Could you show me a dump of return value of UsbCamera.GetVideoFormat().

var formats = UsbCamera.GetVideoFormat(cameraIndex);

// select the format you want.
foreach (var item in formats) Console.WriteLine(item);

from usbcamera.

stweily avatar stweily commented on July 23, 2024

哦真的吗? 你能给我看一下 UsbCamera.GetVideoFormat() 返回值的转储吗?

var formats = UsbCamera.GetVideoFormat(cameraIndex);

// select the format you want.
foreach (var item in formats) Console.WriteLine(item);

format.txt

from usbcamera.

secile avatar secile commented on July 23, 2024

(1) which VideoFormat are you using? formats[2]? that is [Video], [MJPG], 3840,2160.
(2) formats[0] works fine in 30fps?

from usbcamera.

stweily avatar stweily commented on July 23, 2024

(1) which VideoFormat are you using? formats[2]? that is [Video], [MJPG], 3840,2160. (2) formats[0] works fine in 30fps?

20240424172346
this is amCAP
(1) I will use formats[2] and hope it work,
(2) formats[0] works fine in 24- 28 fps, its ok
this is our UsbCamera

1713951009575

from usbcamera.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.