You are not logged in.

#1 2021-08-06 03:28:00

haigioli
Member
Registered: 2018-09-06
Posts: 142

droidcam-obs-plugin can't activate camera via USB

No matter what kind of install I do of OBS, after installing the droidcam-obs-plugin, I can get my iPhone's camera to show up via WiFi, but not by USB.  I've tried both the plugin supplied by the developer, as well as the one in the AUR that's patched for libusbmuxd-2.0.  I've tried symlinking libusbmuxd-2.0.so to libusbmuxd.so (though this should be solved in the patched version in the AUR), but no luck.  Before, the OBS logs would show that libusbd wasn't detected (though it is working fine throughout the system and works for droidcam's v4l2loopback standalone).  Now, the error that I get when trying to active the iPhone camera via USB is:

info: [DroidCamOBS] plugin_udpate: activated=0 (actual=0) audio=0 sync_av=0
info: [DroidCamOBS] USBMux: Reload: 1 devices
info: [DroidCamOBS] IOS: handle:1 serial:LONG SERIAL NUMBER

info: [DroidCamOBS] plugin_udpate: activated=0 (actual=0) audio=0 sync_av=0
info: [DroidCamOBS] plugin_udpate: activated=0 (actual=0) audio=0 sync_av=0
info: [DroidCamOBS] IOS: serial:LONG SERIAL NUMBER
info: [DroidCamOBS] activated: id=LONG SERIAL NUMBER type=3 ip=(null) port=4747
info: [DroidCamOBS] video_format=0/avc video_resolution=2/1280x720
info: [DroidCamOBS] connect device: id=LONG SERIAL NUMBER type=3
info: [DroidCamOBS] USBMux: Reload: 1 devices
info: [DroidCamOBS] checking against serial:LONG SERIAL NUMBER

info: [DroidCamOBS] USBMUX Connect: dev=0/1, port=4747
[libusbmuxd] usbmuxd_connect: Reading connect result...
[libusbmuxd] usbmuxd_connect: Connect success!
info: [DroidCamOBS] GET /v4/video/avc/1280x720/port/0/client/121/nonce/5912/
info: [DroidCamOBS] starting video via socket 56
info: [DroidCamOBS] create video decoder
info: [DroidCamOBS] trying hw device 3
info: [DroidCamOBS] hw_pix_fmt=46
[AVHWDeviceContext @ 0x7f66ac001c80] libva: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[AVHWDeviceContext @ 0x7f66ac001c80] Failed to initialise VAAPI connection: -1 (unknown libva error).
info: [DroidCamOBS] trying hw device 1
info: [DroidCamOBS] hw_pix_fmt=100
info: [DroidCamOBS] use hw: 1
warning: [DroidCamOBS] read header recv returned -1
info: [DroidCamOBS] closing failed video socket 56
info: [DroidCamOBS] release video_decoder
info: [DroidCamOBS] ~decoder alloc_count=0
info: [DroidCamOBS] connect device: id=LONG SERIAL NUMBER type=3
info: [DroidCamOBS] USBMux: Reload: 1 devices
info: [DroidCamOBS] checking against serial:LONG SERIAL NUMBER

info: [DroidCamOBS] USBMUX Connect: dev=0/1, port=4747
[libusbmuxd] usbmuxd_connect: Reading connect result...
[libusbmuxd] usbmuxd_connect: Connect success!
info: [DroidCamOBS] starting video via socket 56
info: [DroidCamOBS] create video decoder
info: [DroidCamOBS] trying hw device 3
info: [DroidCamOBS] hw_pix_fmt=46
[AVHWDeviceContext @ 0x7f66ac000d40] libva: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[AVHWDeviceContext @ 0x7f66ac000d40] Failed to initialise VAAPI connection: -1 (unknown libva error).
info: [DroidCamOBS] trying hw device 1
info: [DroidCamOBS] hw_pix_fmt=100
info: [DroidCamOBS] use hw: 1
warning: [DroidCamOBS] read header recv returned -1
info: [DroidCamOBS] closing failed video socket 56
info: [DroidCamOBS] plugin_hide: is_showing=1
info: [DroidCamOBS] release video_decoder
info: [DroidCamOBS] ~decoder alloc_count=0

It just repeats in regular intervals, but with different hw device numbers.  In no case is there picture via USB.  I've got libva and libva-intel-driver installed.

I'm not doing anything exotic.  Any ideas how to chase this down?

Last edited by haigioli (2021-08-06 13:20:33)

Offline

#2 2021-08-06 06:40:53

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,337

Re: droidcam-obs-plugin can't activate camera via USB

Well does vaapi work outside of droidcam? What's your output of vainfo? Did you check https://wiki.archlinux.org/title/Hardwa … stallation Does it work if you disable HW acceleration?

Last edited by V1del (2021-08-06 06:45:00)

Offline

#3 2021-08-06 12:26:20

haigioli
Member
Registered: 2018-09-06
Posts: 142

Re: droidcam-obs-plugin can't activate camera via USB

vainfo returns all good:

vainfo: VA-API version: 1.12 (libva 2.12.0)
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.4
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG4Simple            : VAEntrypointVLD
      VAProfileMPEG4AdvancedSimple    : VAEntrypointVLD
      <unknown profile>               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD

I turned HW acceleration off and that error went away.  I'm still left with:

info: [DroidCamOBS] USBMUX Connect: dev=0/1, port=4747
[libusbmuxd] usbmuxd_connect: Reading connect result...
[libusbmuxd] usbmuxd_connect: Connect success!
info: [DroidCamOBS] starting video via socket 14
info: [DroidCamOBS] create video decoder
warning: [DroidCamOBS] read header recv returned -1
info: [DroidCamOBS] closing failed video socket 14
info: [DroidCamOBS] release video_decoder
info: [DroidCamOBS] ~decoder alloc_count=0
info: [DroidCamOBS] plugin_udpate: activated=0 (actual=0) audio=0 sync_av=0
info: [DroidCamOBS] plugin_hide: is_showing=1

Something's happening with usbmuxd, but I can't make heads of tails of it. 

According to the plugin's developer, the plugin looks for libusbmuxd.so - not libusbmuxd-2.0.so.  So, I've added the symlinks to make up for that (AUR has a package that does that automatically, as well).  Still, I get this error.  The dev says that the plugin is known to work on Arch, but I haven't been able to get the camera to work with USB.

Last edited by haigioli (2021-08-06 12:58:06)

Offline

Board footer

Powered by FluxBB