This Test Tracks
A successful test indicating my idea is possible.
In my previous post I mentioned that during review of my latest livestream I noticed inconsistency with the shot tracer line. The shot tracer line is a static overlay in my OBS setup, so it relies on the proper positioning of the shot camera to line up on the ball. If the ground is uneven or something blocks the required lineup, even though the shape of the shot will be correct, the tracer line won’t match up with the ball path onscreen, creating a somewhat disorientating effect for the viewer. See the photo comparison below.
I’m aware of a solo OBS plugin developer, RoyShilkrot, who has made several image detection plugins. My thought was to use one of his object detection plugins to watch for a golf ball, then update the shot tracer scene location to the last known ball location so that the tracer will always align with the ball. I thought moving the scene automatically could be done with Exeldro’s Move Transition plugin in a similar way to how the ball markers move on my golf course overlays, but I couldn’t quite figure it out. I dm’ed Exeldro to see if he knew if a move filter could be updated from a text file and he responded saying that this wasn’t part of his plugin.
A bit daunted, but not deterred I figured out that you can directly update the transform property from a text file, bypassing the need for the move plugin to be used in this task. A quick python code later, success! You can see the results in this gif where an OBS source can now automatically follow a detected object. Some more work is required to properly align everything and control the tracer movement, as well as to control the python code from the course, but overall I’m extremely excited to implement this automatic tracking.
Pretty big breakthrough. Kinda cool the things you can do with open source software.
A perfect track due to excellent shot camera placement. Tracer line starts where ball started.
An imperfect track due to shot camera placed too far to the right of center. Tracer line starts 30cm right of tee.

