question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TimeoutException: Failed to start WebCam

See original GitHub issue

Plugin Version or Commit ID

v0.10.1

Unity Version

2021.3.3f1

Your Host OS

macOS Monterey 12.4

Target Platform

UnityEditor

Target Device

MacBook Pro (16-inch, 2019)

[Windows Only] Visual Studio C++ and Windows SDK Version

No response

[Linux Only] GCC/G++ and GLIBC Version

bazel: 5.0.0 gcc, g++: 13.1.6 python: 3.9.10

[Android Only] Android Build Tools and NDK Version

No response

[iOS Only] XCode Version

No response

Build Command

python3.9 build.py build --desktop cpu -vv

Bug Description

The situation is quite simple to #392

However, my MacBook is Intel Mac and I can’t find TextureFrame#ChangeNameFrom.

Also, I put Debug.Log in TexutreFrame#GetNativeTexturePtr, but it isn’t called.

Importantly, the error is occurred without scene change.

Sometimes, I can see the web cam screen in the first scene (face detection), and when I change to other scene the error is occurred, but almost all errors occur first scene that means I can’t see the web cam screen at all.

  • When I build old version; 0.9.1 and run in unity 2020.3.~~, it works well.

Steps to Reproduce the Bug

  1. Run python3.9 build.py build --desktop cpu -vv
  2. Start Play Mode and the below error occurs. TimeoutException: Failed to start WebCam

Log

Editor.log

Screenshot/Video

No response

Additional Context

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
homulercommented, Jul 23, 2022

Thank you! Hmm, that’s interesting.

In my case (on Linux Desktop), when it happens, it happens often, and when it doesn’t, it doesn’t happen at all (and now I happen to be unable to reproduce it at all). Can you tell me how much the count will eventually go up in your environment? https://github.com/homuler/MediaPipeUnityPlugin/blob/6efa5e1b75b7c6aa487254ade15fe7cd49fc6842/Assets/MediaPipeUnity/Samples/Common/Scripts/ImageSource/WebCamSource.cs#L264

0reactions
yalegriacommented, Feb 9, 2023

I encountering this issue too. I am on Mac OS M1.

I got it to go away by setting timeoutFrame to 3000. It seems that 2000 is too low.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use Webcam failed · Issue #4176 · bisq-network/bisq
I presume the expected behavior was to open my webcam application to snap ... TimeoutException: Webcams discovery timeout (1000 ms) has been ...
Read more >
Unity select webcam by unique id
I would try to use it like this. void Start() { WebCamDevice[] devices = WebCamTexture.devices; WebCamTexture webcamTexture1 = new ...
Read more >
Built-in webcam error "webcam driver fail to start"
My built-in web cam keeps telling me webcam driver fail to start. This thread is locked. You can follow the question or vote...
Read more >
com.github.sarxos.webcam.Webcam.getWebcams java ...
Get list of webcams to use. This method will wait predefined time interval for webcam devices * to be discovered. By default this...
Read more >
Problems setting up Multicam : r/octoprint
-- The unit webcamd.service has entered the 'failed' state with result 'timeout'. Nov 08 03:38:38 octopi systemd[1]: Failed to start ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found