- Home /
WebcamTexture at 1080p unable to run at 30FPS
I'm using Logitech C922 Pro, which runs and records at full HD 30fps in camera applications on windows. When I'm trying to access it at full HD in unity, its fps drops and it starts lagging quite visibly. It runs at 30 fps only if I reduce frame size to 1280x720.
I've tested it on different windows machines and made blank projects with just the webcam functionality. All have the same problem in editor as well as the build.
Is there a way to get full HD frames at a faster rate in Unity in windows?
void Start()
{
WebCamTexture webcamTexture = new WebCamTexture(1920, 1080, 30);
Renderer renderer = GetComponent<Renderer>();
renderer.material.mainTexture = webcamTexture;
webcamTexture.Play();
}
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
Your answer
Follow this Question
Related Questions
Google Cardboard Frame Rate Issue 0 Answers
My Character lags when moving, when i have a custom made blender model what should i do? 0 Answers
Why does this script lag so much? 2 Answers
Sudden framerate drops? 4 Answers
iOS Lag From Updating Score 0 Answers