News for hackers. Stuff that matters.
Re:Sony cameras can now be used as webcams for Mac by floatingatoll on Thursday October 15, 2020 @04:06PM (#24793187)
Mac support is implemented using a CoreMediaIO plugin, hinting that they are not updating the camera firmware to speak USB webcam, which prevents driverless use of the device:

    /Library/CoreMediaIO/Plug-Ins/DAL/ImagingEdgeWebcam.plugin
Could someone with a Sony camera please verify on macOS 10.15 (with ASR enabled) whether this webcam support is usable from within Apple's desktop FaceTime app? What protocol version and speed of USB does it negotiate with the computer, assuming you're using a modern USB cable and not the one it shipped with?

That plugin contains `LjAdapter`, the same name used on both Mac and Win, and specifically `Lja_PTP_USB.dylib/dll` — hinting that they've written a convertor that takes in USB Picture-to-Picture protocol and writes out USB Web Camera protocol.

I get the distinct impression that this is a list of USB device IDs. Those of you who know how to spoof USB manufacturer and device IDs may want to try spoofing any random off-the-shelf USB PTP webcam with one of these and see if you can use this library to speak to it.

    [Dev:%lx]
    0x0CCC, 0x0C43, 0x0D2B, 0x0D18, 0x0D1C, 0xD9F, 0x0DA3
Re:Sony cameras can now be used as webcams for Mac by dognotdog on Thursday October 15, 2020 @10:12PM (#24796710)
FaceTime, Safari, and on Big Sur, apparently even QuickTime Player can no longer use 3rd party CoreMediaIO DAL plugins due to codesigning/sandboxing/SIP issuess.

The short of it is that generally within the SIP (system integrity protection) domain, no 3rd party code is allowed to be loaded.

3rd party apps can generally be made to work by removing codesigning, but Apple's stuff is generally very intertwined with services not contained in the app-bundle, making this kind of surgery a lot more difficult. I have personally not been able to get this to work for FaceTime on 10.14 despite best efforts.

An interesting thing Sony seems to do here that others haven't is that they bypass the PTPCamera agent that normally comes on, presumably to directly drive the camera through their own lower level PTP library Lja_PTP_USB.dylib.

Disclaimer: I'm the author of https://ptpwebcam.org, which works much the same for Sony/Nikon/Canon cameras

Re:Sony cameras can now be used as webcams for Mac by santiagobasulto on Monday October 19, 2020 @02:20PM (#24829216)
I have just bought a Sony ZV-1 to help on my screencasts. I liked a lot the simplicity of the "Use as Webcam" feature [0].

Very disappointed I was when I found that it doesn't work with ScreenFlow (the main software I use to record my screen) and it only does work with OBS. So seems I'll be switching to OBS then .

Re:Sony cameras can now be used as webcams for Mac by evan_ on Thursday October 15, 2020 @05:18PM (#24794136)
If you copy the FaceTime app and save it with a different name ("FaceTime copy") you can run that and it will let you pick any webcam, even virtual ones.

If you do this you need to remake the copy whenever the OS update or else Spotlight will crash whenever your phone rings. (took me awhile to figure that one out)

I don't know whether or not this will get the Sony driver working. Obviously it would be better if it just worked like any other USB webcam.

Re:Sony cameras can now be used as webcams for Mac by jeroenhd on Thursday October 15, 2020 @07:32PM (#24795619)
> If you do this you need to remake the copy whenever the OS update or else Spotlight will crash whenever your phone rings. (took me awhile to figure that one out)

Wow, that's some Windows-level bugginess right there

Re:Sony cameras can now be used as webcams for Mac by floatingatoll on Thursday October 15, 2020 @09:29PM (#24796443)
That’s a bug worth reporting - it shouldn’t crash, and it’s trivial to accidentally duplicate an app!
Re:Sony cameras can now be used as webcams for Mac by evan_ on Thursday October 15, 2020 @10:28PM (#24796812)
Hm, I would report it but I’d be afraid they’d “fix” the copied app workaround as well.

I suspect it crashes because Handoff tries to start the last FaceTime binary I used, but some kind of signature has changed so it kills it immediately.

I’m not sure why it’s spotlight that crashes except that maybe its index is used to launch the last FaceTime I used?

Re:Sony cameras can now be used as webcams for Mac by sa1 on Friday October 16, 2020 @12:51AM (#24797603)
What happens if you disable handoff for calls?
Re:Sony cameras can now be used as webcams for Mac by evan_ on Friday October 16, 2020 @02:24AM (#24798086)
it probably works just fine, it's 100% triggered by handoff.
Re:Sony cameras can now be used as webcams for Mac by asimpletune on Thursday October 15, 2020 @05:16PM (#24794096)
I tried it and I haven’t been able to use it for literally anything.
Re:Sony cameras can now be used as webcams for Mac by seltzered_ on Thursday October 15, 2020 @09:59PM (#24796634)
I just tried it as well and haven't had luck. Tried doing this:

- installing the linked 'imaging edge webcam' software.

- restarting

- hooking up my sony camera (it's compatible per the list) over usb

- opening Quicktime Player, going to "new movie recording", selecting "Sony Camera (Imaging Edge)"

- Instead see a logo for the software (instead of the camera output) but no connection. Tried futzing with opening camera in Movie mode, AUTO, with/without SD card, etc.

Dear Sony, if you're reading this please take your time and do the approach the parent commenter suggested of updating the camera firmware so it can act as a true USB webcam. I expect the experience to be more along the lines of:

- Plug in USB

- See mode selection screen on camera (you already have this).

- Select 'Webcam'

- Things just work.

Re:Sony cameras can now be used as webcams for Mac by dognotdog on Thursday October 15, 2020 @10:33PM (#24796843)
The CoreMediaIO DAL plugin path is very fraught because of GateKeeper/SIP mechanism all trying to stop 3rd party code from being loaded into apps.

The macOS kernel does have, in theory, the possibility to create a .kext that emulates a UVC USB device, so in theory all one had to do was to write a .kext that captures the DSLR/DSLM camera in kernel land, and brings up a virtual USB device that is then recognized by the standard UVC driver (eg. same as any other webcam).

Of course, that doesn't provide any camera settings controls, and the practical side of it is quite complicated, with sparse documentation and difficult development processes, it being a kext. Hence, nobody's done it, yet.

Re:Sony cameras can now be used as webcams for Mac by arvinsim on Thursday October 15, 2020 @11:52PM (#24797275)
It's not clear to me if plugging the camera via USB would provide enough power to the camera without using batteries. Is that the case?
Re:Sony cameras can now be used as webcams for Mac by seltzered_ on Friday October 16, 2020 @08:10PM (#24806247)
Unsure, I've assumed it provides enough power. There's reviews of some sony cameras using an external usb battery for video recording.
Re:Sony cameras can now be used as webcams for Mac by floatingatoll on Thursday October 15, 2020 @09:27PM (#24796434)
Thank you for confirming that.