r/bmpcc • • 4d ago

I built an open-source face-tracking autofocus companion for the BMPCC 4K

I built BM4K Autofocus for using a Blackmagic Pocket Cinema Camera 4K as a webcam on macOS with face-tracking autofocus. The Pocket sends its own video to the Mac over USB-C; the app watches that Blackmagic feed, detects a face with Apple Vision, and controls the lens over Bluetooth LE. In Zoom, OBS, or another video app, you select Pocket Cinema Camera as the webcam. BM4K Autofocus runs alongside it and does not create a virtual camera.

There are now two step-by-step setup paths in the README:

  1. Agent-assisted: give your coding agent the repo link and ask it to follow the README, run the installer, and verify the Blackmagic video and Bluetooth connections. You still need to enable Bluetooth on the camera and Mac, connect the USB-C cable, and approve macOS permissions yourself.
  2. Manual: enable Bluetooth on the BMPCC 4K (Menu → Setup → Bluetooth) and Mac, disconnect any Blackmagic phone controller, connect the Pocket with a USB-C data cable in webcam mode, then run:

git clone https://github.com/Vovento/bm4k-autofocus.git

cd bm4k-autofocus

./install.sh

Open the BM4K Autofocus application, allow Camera and Bluetooth access for its service, wait for the camera preview and Bluetooth link, and enable Follow face. Finally, choose Pocket Cinema Camera as the camera in your video app. The app deliberately does not use the MacBook or iPhone camera for tracking.

The dashboard also has controls for iris, shutter angle, ISO, white balance, recording, and focus. The main tracking mode estimates distance from face size and focal length, uses a lens profile to move focus, then checks sharpness to refine it. The camera's one-shot AF is used for initial learning and as a fallback.

The measured Sigma/Metabones lens profile is included, but each new installation starts without locally learned adjustments. On first use, the app uses the camera's one-shot AF to establish an initial focus point, then learns from face size, focal length and the camera's distance reading as you use it. It keeps refining focus and sharpness references for your setup and shooting conditions, so allow some time for it to adapt. These adjustments stay in a local focus_model.json file; no face images are stored there.

I've tested this only on a BMPCC 4K with a Sigma 18–35mm f/1.8 Art EF through a Metabones 0.64× Speed Booster. With that setup, it typically gets the face back in focus around 1–1.5 seconds after I stop moving. Other lenses and 6K bodies have not been validated. A new lens can attempt calibration, but that path needs more real-world testing.

Code, full installation steps, limitations, and the measured Sigma lens profile: https://github.com/Vovento/bm4k-autofocus

It's free and MIT-licensed. If you test another electronic lens/adapter or a 6K, I'd welcome reports or PRs, especially whether your camera reports focus distance over Bluetooth.

46 Upvotes

12 comments sorted by

6

u/andyouarenotme 3d ago

I have a 6k and 6k pro I’d like to try this with. I also have this lens so I could test and give comparables based on the body only.

4

u/Western-Lychee8604 3d ago

Sounds great! I think Claude or Codex will be able to easily adjust it to BM6K in case if it is needed to this camera.

2

u/4Runningfrogs 3d ago

This is really awesome. Is it fair to assume something like this couldn’t work through an iPhone, because iPhones can’t have an external webcam?

2

u/Western-Lychee8604 3d ago edited 3d ago

Good question. This code is macOS-only: it reads the Pocket's USB webcam feed on the Mac, tracks faces with Apple Vision, and sends focus commands over Bluetooth LE. It won't run on iPhone or Android as-is.

In theory, yes—but the device needs a live video feed from the BMPCC to track faces, plus Bluetooth to control focus. The current app runs only on macOS, so a mobile version would need to be built separately.

A direct USB connection is most promising on a USB 3 iPad or a compatible Android phone. iPhones currently don’t support external UVC cameras as a video input in this way. None of these mobile setups has been tested with BM4K Autofocus yet.

2

u/Shmart_Logic 2d ago

Theoretically- iPad could totally work for it though, as well as tapping into alternative video monitoring devices, like an Accsoon Seemo or Atomos Ninja Phone.

Only tricky thing would be finding a separate way to decode those video signals, not sure how they go about that normally.

2

u/Expensive-Cow4518 3d ago

Can you make one for bmpcc6k pro? I have the same lens and also mac pro, would love to try it.

2

u/Western-Lychee8604 3d ago

Unfortunately I don’t own 6k, so you might try to use it as it is right now, and chances are that it could work because it only uses Bluetooth from the camera and everything else is on the mac side. If something is not working just tell your Claude or Codex to adjust it to your camera.

2

u/Fickle-Health-9098 2d ago

Really really cool. Yesterday tried to rebuild your code for BMPCC 6K PRO and also added app for Iphone, looks like it works! Will update you soon when i will test it more :). Really cool idea man!

1

u/Western-Lychee8604 2d ago

Sounds amazing!!! If you manage it to work on Iphone that would be a total gamechanger man!!!

1

u/LLCdesign 1d ago

Very cool I’m very interested to test this out!

1

u/Western-Lychee8604 1d ago

I hope it’ll work for you!

1

u/Ashamed_Juggernaut20 2h ago

Sick I’m gonna try this tonight