Skip to content
bemotyPublic

About

Go library and CLI client for YoloLiv's YoloCam S3

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

33 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yolocam

yolocam setting options while the camera feed updates live

This is a reverse-engineering effort of the amazing YoloLiv YoloCam S3 webcam (and probably other YoloLiv webcams).

Image-quality wise, this is one of the best webcams I've ever had. And it implements UVC, so its video output appears on pretty much any device completely plug and play. Unfortunately though, its protocol for actually configuring the camera's image is proprietary and requires the Electron-based YoloLiv Compose companion desktop application to use. Linux is also not a supported OS of the Compose app, so Linux users are completely out of luck.

This repository contains:

  • The reverse engineered protobuf control protocol in proto/yolocam/v1/
  • A Go client library for communicating with the camera
  • A Go CLI that uses said client library in cmd/yolocam/

Install

brew install bemoty/tap/yolocam                                  # macOS, Linux
scoop bucket add bemoty https://github.com/bemoty/scoop-bucket   # Windows
scoop install yolocam
yay -S yolocam-bin                                               # Arch Linux
go install github.com/bemoty/yolocam/cmd/yolocam@latest          # from source

If you want to use it as a library, get it: go get github.com/bemoty/yolocam.

Before you use the CLI, make sure YoloLiv Compose is not running. It seems the webcam doesn't handle two simultaneous connections to it very well and just bails out until you restart it if you try to connect to it twice.

Usage

If you want to use this in your Go app, simply import the library and keep one Client around for as long as you need the webcam. You can use the CLI set and get commands for one-off commands to the camera, or use yolocam serve --stdio as a child process and keep it running. It holds one connection to the webcam and speaks JSON-RPC 2.0 over its stdin and stdout, one JSON message per line.

$ yolocam serve --stdio
{"jsonrpc":"2.0","id":1,"method":"set","params":{"property":"wb_kelvin","value":5600}}
{"jsonrpc":"2.0","result":null,"id":1}

yolocam openrpc prints an OpenRPC document with everything else you could need: methods, params, value schemas, errors, exit codes and push notifications.

Development

You will need GNU Make, Go, and buf.

make build
make check      # fmt-check, vet, staticcheck, buf lint, buf breaking, tests
make generate   # regenerate internal/genproto (needs buf on PATH)

Disclaimer

This project is not affiliated with or endorsed by YoloLiv. YoloCam and YoloLiv are trademarks of HongKong Yololiv Technology Limited. All protocol details, including the protobuf schema in proto/, were reconstructed independently by observing network traffic between the YoloLiv Compose application and my own YoloCam. None of it is extracted, decompiled, or copied from YoloLiv's software or firmware, and no YoloLiv code, binary, or firmware is included in this repository.

About

Go library and CLI client for YoloLiv's YoloCam S3

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages