linux-cli

module
v0.0.0-...-e60c414 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2026 License: MIT

README

PhoneCam Linux CLI

This module contains the Linux phonecam command.

Current Scope

The first implementation slice provides:

  • command routing for start, status, stop, doctor, setup, install, version, and help,
  • a testable phonecam doctor foundation,
  • phonecam setup to install GStreamer + v4l2loopback and persist /dev/video10 (requires root; --dry-run prints the plan),
  • a phonecam start foundation that creates a pairing session and serves the control API,
  • print-only install hints for Arch, Fedora, and Ubuntu/Debian.

The media receiver, terminal QR rendering, v4l2loopback lifecycle, and GStreamer process supervision are not implemented yet.

Development

cd linux-cli
go test ./...
go run ./cmd/phonecam doctor
go run ./cmd/phonecam setup --dry-run

Doctor Checks

phonecam doctor currently checks:

  • gst-launch-1.0,
  • gst-inspect-1.0,
  • modprobe,
  • loaded v4l2loopback module,
  • /dev/video10,
  • write access to /dev/video10,
  • desktop session hints,
  • distro family hints,
  • LAN privacy warning.

Directories

Path Synopsis
cmd
phonecam command
internal
cli
lifecycle
Package lifecycle implements the `phonecam status` and `phonecam stop` commands.
Package lifecycle implements the `phonecam status` and `phonecam stop` commands.
rtp
session
Package session persists a small record describing the running `phonecam start` process so that `phonecam status` and `phonecam stop`, invoked from a different terminal, can locate the process and its loopback control server.
Package session persists a small record describing the running `phonecam start` process so that `phonecam status` and `phonecam stop`, invoked from a different terminal, can locate the process and its loopback control server.
setup
Package setup implements `phonecam setup`: install Linux receive deps and persist an OBS-aware v4l2loopback PhoneCam node.
Package setup implements `phonecam setup`: install Linux receive deps and persist an OBS-aware v4l2loopback PhoneCam node.
smoke
Package smoke runs a deterministic, fully local RTP loopback self-test that proves H.264 frames can travel from a GStreamer sender, through the PhoneCam receiver, and out to the v4l2loopback virtual camera - without any phone.
Package smoke runs a deterministic, fully local RTP loopback self-test that proves H.264 frames can travel from a GStreamer sender, through the PhoneCam receiver, and out to the v4l2loopback virtual camera - without any phone.
trust
Package trust persists approved phones so a later phonecam start can accept them without a new QR.
Package trust persists approved phones so a later phonecam start can accept them without a new QR.
v4l2
Package v4l2 verifies that the PhoneCam virtual camera device is present and usable before the receiver pipeline is started, so failures surface as actionable messages instead of cryptic GStreamer errors.
Package v4l2 verifies that the PhoneCam virtual camera device is present and usable before the receiver pipeline is started, so failures surface as actionable messages instead of cryptic GStreamer errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL