Touchscreen interface for video-based crystal centering at the BL831 beamline (Advanced Light Source, Lawrence Berkeley National Laboratory). Displays a live camera feed with beam overlay and provides controls for goniometer rotation, centering, zoom, pin selection, and light adjustment.
Video is captured via FFmpeg (Axis IP cameras or V4L2 devices). Button presses are translated to DCSS commands through a touch server.
Download the latest release zip from the releases page and unzip:
unzip crystmntui-*-distribution.zip -d /opt/crystmntuiThis gives you:
/opt/crystmntui/
bin/crystmntui # launcher script
lib/crystmntui-*-bundled.jar
examples/ # theme configs and assets
Add bin/ to your PATH or run directly: /opt/crystmntui/bin/crystmntui
Requires JRE 11+.
Requires JDK 11+ and Maven 3.6+.
mvn packageThe bundled jar is written to target/.
crystmntui \
-v axis://host/axis-cgi/mjpg/video.cgi?camera=1 \
-t touch://hostname:14000Or launch directly with Java:
java -jar crystmntui-*-bundled.jar \
-v axis://host/axis-cgi/mjpg/video.cgi?camera=1 \
-t touch://hostname:14000| Flag | Description |
|---|---|
-v, --video |
Video source URI (axis:// or v4l2://) |
-t, --touch |
Touch server URI (touch://hostname:port) |
-c, --config |
Path to config file |
-w, --window |
Window size (1920x1080) or full. Default: full (undecorated kiosk mode) |
-i, --interpolation |
Image scaling: nearest, bilinear, or bicubic |
-e, --emulate |
Emulate old-style touch coordinates |
-l, --list-v4l2 |
List available V4L2 video capture URIs |
crystmntui -v v4l2://video0/MJPG/640x480/30fps -t touch://localhost:14000A .config file is a Java properties file that controls theming and button overrides. Pass it with -c.
Config files can set defaults for CLI options using cli.<long-flag-name>. Command line flags override these.
cli.video=axis://host/axis-cgi/mjpg/video.cgi?camera=1
cli.touch=touch://hostname:14000
cli.window=1920x1080
cli.emulate=false
cli.interpolation=bilinearui.background=#000810
ui.border-color=#00e5ff
ui.borderless-buttons=trueEach button can have a custom icon, pressed icon, command, or be hidden:
button.ZoomIn.icon=ZoomIn.png
button.ZoomIn.pressed=ZoomIn-pressed.png
button.ZoomIn.command=some_touch_command
button.ZoomIn.hidden=trueIcon paths are resolved relative to the config file's directory. Available button names: ZoomIn, ZoomOut, Plus10, Plus90, HalfTurn, Minus90, Minus10, Undo, Park, UnPark, Polarizer, Light, Pin24mm..Pin10mm, MoveUp, MoveDown, MoveLeft, MoveRight, MoveIn, MoveOut, Center.
The Light button acts as a vertical slider. The Center button maps to clicks on the video area.
Two example themes are included under examples/:
- dark-neon — Cyan neon glow on dark background
- arc-reactor — Brushed metal with stamped beveled buttons
Each theme directory contains a config file, button PNGs (normal and -pressed variants), and the HTML design file used to generate the assets.
crystmntui \
-v axis://host/axis-cgi/mjpg/video.cgi?camera=1 \
-t touch://hostname:14000 \
-c examples/arc-reactor/arc-reactor.configLinux only. V4L2 device access requires the camerainfo library (included).
- Axis IP cameras — MJPEG streams via
axis://host/path?camera=N - V4L2 devices — Local capture via
v4l2://deviceN/FORMAT/WxH/FPS. Use-lto list available devices. Tested with USB HDMI capture cards. - Touchscreen — Any display; touch events are translated to DCSS commands via the touch server