uStreamer Driver¶
jumpstarter-driver-ustreamer provides functionality for using the ustreamer
video streaming server driven by the jumpstarter exporter. This driver takes a
video device and exposes both snapshot and streaming interfaces.
Installation¶
$ pip3 install --extra-index-url https://pkg.jumpstarter.dev/simple jumpstarter-driver-ustreamer
Configuration¶
Example configuration:
type: "jumpstarter_driver_ustreamer.driver.UStreamer"
config:
# name or path of the ustreamer executable
# defaults to finding ustreamer from path
executable: "ustreamer"
args: # extra arguments to pass to ustreamer
brightness: auto # --brightness=auto
contrast: default # --contract=default
Usage¶
CLI¶
The uStreamer client exposes a video command inside jmp shell for
inspecting the current stream state, saving a snapshot, and starting a local
MJPEG proxy server.
$ j video --help
Usage: j video [OPTIONS] COMMAND [ARGS]...
Video capture and streaming
Options:
--help Show this message and exit.
Commands:
snapshot Save a single snapshot to file
state Show video source state
stream Start local MJPEG streaming server
j video state¶
$ j video state --help
Usage: j video state [OPTIONS]
Show video source state
Options:
--help Show this message and exit.
j video snapshot¶
$ j video snapshot --help
Usage: j video snapshot [OPTIONS]
Save a single snapshot to file
Options:
-o, --output TEXT Output file path
--help Show this message and exit.
j video stream¶
$ j video stream --help
Usage: j video stream [OPTIONS]
Start local MJPEG streaming server
Proxies ustreamer's native MJPEG stream through the jumpstarter tunnel. Frame
rate is controlled by ustreamer's configuration.
Options:
-p, --port INTEGER Local server port (0 = auto)
--browser / --no-browser Open in web browser
--help Show this message and exit.
API Reference¶
- class jumpstarter_driver_ustreamer.client.UStreamerClient¶
UStreamer client class
Client methods for the UStreamer driver.
- snapshot()¶
Get a snapshot image from the video input
- Returns:
PIL Image object of the snapshot image
- Return type:
PIL.Image
- snapshot_bytes()¶
Get raw JPEG bytes from the video input
- state()¶
Get state of ustreamer service