vcamapp / app

VTuber Camera, macOS app that shows your avatar using CoreMedia I/O's virtual camera.
https://vcamapp.com/en
MIT License
154 stars 7 forks source link

Razer Kiyo Camera not starting #6

Closed nilathedragon closed 1 year ago

nilathedragon commented 1 year ago

First of all, thank you for the amazing app! It works really well and is super easy to use.

I am facing an issue with the Razer Kiyo Camera. It works fine in other apps but in VCam the Preview just stays black and the camera does not turn on. Other cameras like the iPhone Camera, OBS Virtual Camera or my old, worse Logi camera work.

I was able to find some logs that could be related to why its not working:

default 14:37:56.998678+0200    VCam    <<<< AVCaptureDALDevice >>>> -[AVCaptureDALDevice setActiveVideoMaxFrameDuration:]: MaxFrameDuration to set 1 / 30
error   14:37:56.998903+0200    VCam    *** -[AVCaptureDevice_Tundra setActiveVideoMaxFrameDuration:] Not supported - Supported ranges: (
    "<AVFrameRateRange: 0x600003355f00 30.00 - 30.00 (1000000 / 30000030 - 1000000 / 30000030)>"
), tried to set minFrameRate to 30.000000 (1 / 30)
error   14:37:57.999989+0200    VCam    (
    0   CoreFoundation                      0x0000000196db319c __exceptionPreprocess + 176
    1   libobjc.A.dylib                     0x00000001968d24d4 objc_exception_throw + 60
    2   AVFCapture                          0x00000001b274cec0 -[AVCaptureDALDevice supportsAVCaptureSessionPreset:] + 0
    3   UniVCam                             0x00000002b62270e8 $s7UniVCam13CameraManagerC014configureFrontC003_A0g13FEDD198A17446G13CC4674E462CE6LL3for6deviceSo15AVCaptureDeviceCAG_So6CGSizeV10resolutiontSo0O7SessionC_AISgtKF + 940
    4   UniVCam                             0x00000002b6209798 $s7UniVCam15AvatarWebCameraC5startyyF + 268
    5   UniVCam                             0x00000002b61c45b8 $s7UniVCam8TrackingC07setFaceC6Methodyy0B6Entity0cF0O0E0OF + 572
    6   UniVCam                             0x00000002b61c3ff8 $s7UniVCam8TrackingC9configureyyF + 244
    7   UniVCam                             0x00000002b61ddb48 $s7UniVCam05uniOnB11SystemStartyyF + 92
    8   GameAssembly.dylib                  0x000000012c562cac GameAssembly.dylib + 5647532
    9   GameAssembly.dylib                  0x000000012c40f4f4 GameAssembly.dylib + 4257012
    10  GameAssembly.dylib                  0x000000012c40f430 GameAssembly.dylib + 4256816
    11  UnityPlayer.dylib                   0x0000000108275b18 _ZdaPvRKSt9nothrow_t + 4135372
    12  UnityPlayer.dylib                   0x000000010827ce48 _ZdaPvRKSt9nothrow_t + 4164860
    13  UnityPlayer.dylib                   0x0000000108299a9c _ZdaPvRKSt9nothrow_t + 4282704
    14  UnityPlayer.dylib                   0x0000000108299ba0 _ZdaPvRKSt9nothrow_t + 4282964
    15  UnityPlayer.dylib                   0x000000010829a600 _ZdaPvRKSt9nothrow_t + 4285620
    16  UnityPlayer.dylib                   0x0000000107f6ef1c _ZdaPvRKSt9nothrow_t + 962000
    17  UnityPlayer.dylib                   0x00000001080cd32c _ZdaPvRKSt9nothrow_t + 2396640
    18  UnityPlayer.dylib                   0x00000001080cd378 _ZdaPvRKSt9nothrow_t + 2396716
    19  UnityPlayer.dylib                   0x00000001080cd60c _ZdaPvRKSt9nothrow_t + 2397376
    20  UnityPlayer.dylib                   0x0000000108adc378 _Z10PlayerMainiPPKc + 2120
    21  Foundation                          0x0000000197ce9538 __NSFireTimer + 104
    22  CoreFoundation                      0x0000000196d5448c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32
    23  CoreFoundation                      0x0000000196d54134 __CFRunLoopDoTimer + 940
    24  CoreFoundation                      0x0000000196d53c8c __CFRunLoopDoTimers + 356
    25  CoreFoundation                      0x0000000196d3941c __CFRunLoopRun + 1852
    26  CoreFoundation                      0x0000000196d3858c CFRunLoopRunSpecific + 612
    27  HIToolbox                           0x00000001a056ddf4 RunCurrentEventLoopInMode + 292
    28  HIToolbox                           0x00000001a056dc30 ReceiveNextEventCommon + 648
    29  HIToolbox                           0x00000001a056d988 _BlockUntilNextEventMatchingListInModeWithFilter + 76
    30  AppKit                              0x0000000199f57f58 _DPSNextEvent + 636
    31  AppKit                              0x0000000199f570f4 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
    32  AppKit                              0x0000000199f4b558 -[NSApplication run] + 464
    33  AppKit                              0x0000000199f229a8 NSApplicationMain + 880
    34  UnityPlayer.dylib                   0x0000000108adbee0 _Z10PlayerMainiPPKc + 944
    35  dyld                                0x0000000196903f28 start + 2236
)

I tried downloading the source code to poke around myself but I wasn't able to build the app into an executable.

tattn commented 1 year ago

First of all, thank you for the amazing app! It works really well and is super easy to use.

I'm very glad to hear that!

Thank you for reporting the issue.

According to the log, the camera's timescale is a strange number of 3000030, which I think VCam doesn't support the timescale.

So I modified it to support non-integer FPS. But I don't have a Razer Kiyo Camera, if you don't mind, could you try this app under development and let me know whether it has been fixed or not?

https://drive.google.com/file/d/1D-h0xah_FoSH6tXITDqfBlU6sLa_bvON/view?usp=share_link

nilathedragon commented 1 year ago

That was quick! I am happy to report that this build is working :)

tattn commented 1 year ago

Thank you for trying! 😄

I'll release the next version with this fix a few days ago. Until then, please use its dev version!

This issue will be closed after release.