wtsnz / obs-ios-camera-source

Use your iPhone camera as a video source in OBS Studio and stream high quality video from your iPhone's camera over USB

Home Page:https://obs.camera/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Disconnects When Not Live?

RAMilewski opened this issue · comments

The iOS Camera image will sometimes freeze in the preview window. If I switch to the camera I get a live image. Interestingly the connection dialog on the camera says "USB Connected" when the camera is live, and "USB Waiting for connection" when swapped back to the preview window.

As I switch back and forth it connects and disconnects.

I'm running OBS Studio 24.0.6 on OS X 10.13.6 with the camera running on an iPhone X and v2.5.1 of the iOS Camera plug-in.

There are a number of different things that appear to trigger this behavior, but I have what is a reproducible case on my machine. It has been tested more than a dozen time.

STEPS TO REPRODUCE

  1. Set-up two scenes. The first with a Logitech C920 camera as the source and the second with the iOS Camera over USB.

  2. Turn on studio mode.

  3. Configure a 1500 millisecond fade transition. In the Transitions Settings turn on "Swap Preview/Output Scenes After Transitioning".

  4. Turn off both recording and streaming so we can confirm that we're not seeing a cpu capacity problem.

  5. With the C920 in the output window fade to the iOS Camera. Note that the image on the output screen and the iPhone screen are both live and that the USB dialog on the iPhone screen says "USB Connected".

  6. Fade back to the C920 webcam. Note that the image on the preview screen is frozen, the image on the iPhone screen is live, and the USB dialog on the iPhone screen says "USB: Waiting for Connection".

  7. Again fade to the iOS camera. Note that the image on the output screen and the iPhone screen are both live and that the USB dialog on the iPhone screen again says "USB Connected".

While it is possible to restore a live image when the preview screen is frozen by selecting the iOS camera settings (under sources), and click on "Reconnect to Device", this is not an acceptable work-around during a live streaming or recording situation.

Thanks for the detailed report @RAMilewski 🙇

I have a feeling that I know why, if my assumption is correct in that:
a, you are switching Scenes in the Studio mode, and
b, that one of the scenes does not have the iOS Camera layer & the other one does

then try the following:

If you copy the iOS Camera layer from Scene A & paste it (by reference) into Scene B (but then hide it) I believe that this will work around the issue you're experiencing.

This issue is caused by the plugin being deactivated and then disconnecting from the iOS device, and then the plugin becoming active when the scene is switched back and then unfortunately fails to recover the connection for some reason.

OK. That does nicely solve the connected/disconnected problem I described above.
Thank you for the quick response.

I also filed that report over on the OBS Forum thread on the camera plugin. I'll post this fix in that thread. I also described something there I didn't mention here. I thought it was related, but now I'm not sure because it doesn't respond to this fix.

If I set up a 600ms swipe transition the output screen goes completely black before it suddenly cuts to the OBS camera. You can see it in fades and cuts as well, but it's most obvious in swipes. The OBS camera output is black for the first 500 to 600 milliseconds. Any ideas?

I'm having trouble getting the iPhone audio to appear in OBS as well. I'll go re-read the OBS docs and if I don't find a solution I'll post a separate issue here.

-- Richard

Closing this issue as the swipe problem is covered in issue #33 and I'm still researching the audio issue.

Not sure if this ticket should stay closed? We had this issue on a major project where we’re stuck with mobile phones at the moment and we’re not finding this resolves it. We’re using Windows machines.