- Home /
HD webcam is slow in PC
i want to get HD webcam image in 30 FPS. but the result looks so laggy. The app is smooth and get higher framerate than this but the webcamtexture just can't get the framerate as i want. I think my pc is already quite good. What should i do? i don't care if i need to bug plugins.
Answer by SunnyChow · Oct 27, 2017 at 04:10 AM
Ok this is my situation. I am using Logitech logitech brio camera which can go up to 4k. When i was using a USB 2.0 cable, Unity can get ~5fps. And then i download AVPro Live Camera free trial and find out one funny thing ... my device offer several color formats and framerates, and somehow Unity forcedly chooses 5FPS instead of 30FPS. And then i switch to USB 3.0 cable. Now it can return 1920x in 30fps. it can even return 3840x in 30fps.
tl;dr
if your webcam support usb3.0, try usb3.0 cable
use AVPro Live Camera free trial to learn more about your webcam
Answer by bartburkhardt-sim-ci · Jan 04, 2019 at 02:58 PM
Hi @SunnyChow,
I'm using a Logitech C920 and have same problem. (Windows 10)
This webcam has two HD modes;
1920x1080 5fps YUY2
1920x1080 30fps MJPG
It looks like its using the first in the list and does not take in account the requested 30 fps. The problem does not exist on all computers so it might also be a combination like an updated way to get to these steams. Like this update problem
https://www.theverge.com/2016/8/19/12562780/microsoft-windows-10-anniversary-update-webcam-freezing
Hi, I also using for test C920 right now and face the same problem. Have you got solution?
Answer by BadToxic · Jul 12, 2020 at 11:53 AM
I solved this problem by using https://github.com/Satoshi-Hirazawa/unity-uvc-camera made for the Logitech C920 WebCamera. But to make it run fast enough (on WIndows 10), I had to set a very low resolution:
int width = 640, height = 360;
cvuvc.UseCamera(1, height, width, 30);
texture = new Texture2D(width, height, TextureFormat.RGB24, false);
render.material.mainTexture = texture;
Your answer
Follow this Question
Related Questions
WebcamTexture not refreshing 0 Answers
Unity game on Android capped at 30 fps 1 Answer
Can I output at a different rate than rendering? 0 Answers
CANT FIND ANY DEMO 1 Answer
Unity web player not calling up webpages using JS in internet explorer 0 Answers