/media-os:ptz-onvif [command]from media-os
Discovers and controls ONVIF IP cameras via SOAP/XML with WS-Security. Supports PTZ, RTSP URIs, snapshots, and device discovery across brands like Hikvision, Dahua, Axis.
Ships in media-os. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Context: $ARGUMENTS
Speak ONVIF (SOAP 1.2 / XML / WS-Security) to IP cameras — the industry-standard way to discover devices, pull RTSP URIs, and drive PTZ without vendor SDKs. For low-level Sony VISCA (non-ONVIF PTZ) use ptz-visca. For spec lookup see ptz-docs.
discover)info --host 192.168.1.64 --user admin --password x)streams)snapshot)ptz continuous --pan 0.5 --tilt 0 --timeout 1.5)ptz absolute / ptz preset-goto)WS-Discovery is a UDP multicast probe to 239.255.255.250:3702. The helper sends a SOAP <Probe> envelope and parses ProbeMatch responses to extract each camera's Device service URL (XAddrs).
uv run ${CLAUDE_SKILL_DIR}/scripts/onvifctl.py discover --timeout 3
Output (JSON):
[
{"xaddr": "http://192.168.1.64:80/onvif/device_service",
"types": "dn:NetworkVideoTransmitter tds:Device",
"scopes": ["onvif://www.onvif.org/hardware/DS-2CD2", ...]}
]
WS-Discovery is link-local — it does NOT cross subnets or VLANs. For a camera you already know, skip to Step 2 with the Device service URL (usually http://HOST/onvif/device_service).
Requires WS-Security UsernameToken with digest:
Digest = BASE64( SHA1( nonce + created + password ) )
nonce is raw random bytes (NOT base64) used inside the SHA1. The header also carries the base64 of the nonce and the ISO-8601 Created timestamp.
uv run ${CLAUDE_SKILL_DIR}/scripts/onvifctl.py info \
--host 192.168.1.64 --user admin --password 'S3cret' \
--format json
Returns Manufacturer, Model, FirmwareVersion, SerialNumber, HardwareId.
uv run ${CLAUDE_SKILL_DIR}/scripts/onvifctl.py streams \
--host 192.168.1.64 --user admin --password 'S3cret'
Enumerates media profiles and returns RTSP URIs suitable for ffmpeg:
ffmpeg -rtsp_transport tcp -i rtsp://admin:[email protected]:554/... out.mp4
Pass --rtsp-transport rtp-unicast / rtp-multicast / http to tweak SetStreamUri negotiation.
uv run ${CLAUDE_SKILL_DIR}/scripts/onvifctl.py snapshot \
--host 192.168.1.64 --user admin --password 'S3cret' \
--output shot.jpg
Calls GetSnapshotUri then fetches the JPEG via HTTP Digest (most cameras) or Basic auth.
# Continuous move (ContinuousMove, auto-stop after --timeout)
uv run ${CLAUDE_SKILL_DIR}/scripts/onvifctl.py ptz continuous \
--host 192.168.1.64 --user admin --password 'S3cret' \
--pan 0.5 --tilt 0 --zoom 0 --timeout 1.5
# Absolute (AbsoluteMove)
uv run ${CLAUDE_SKILL_DIR}/scripts/onvifctl.py ptz absolute \
--host ... --pan-x 0.5 --tilt-y -0.3 --zoom 0.2
# Goto preset
uv run ${CLAUDE_SKILL_DIR}/scripts/onvifctl.py ptz preset-goto \
--host ... --preset-token 2
# Save current position as preset
uv run ${CLAUDE_SKILL_DIR}/scripts/onvifctl.py ptz preset-set \
--host ... --preset-name "Cam1-Wide"
# Stop
uv run ${CLAUDE_SKILL_DIR}/scripts/onvifctl.py ptz stop --host ...
Pan/tilt velocities are normalized to [-1.0, 1.0]. Absolute positions also [-1.0, 1.0]; zoom [0.0, 1.0]. The helper auto-discovers the first ProfileToken if none is provided.
Sender not authorized. Always compute the digest.SHA1(raw_nonce + created_str + password); the XML element's wsse:Nonce tag carries the BASE64-encoded nonce. Mixing these up produces silent 401 rejections.Created timestamp too far from their own clock. If auth fails on a known-good password, check ntp on the camera — or add --time-offset <sec> when using the helper.GetStreamUri on Media2 vs Media v1).onvif-util != onvif-cli. Both are real (libonvif's onvif-util from github.com/sr99622/libonvif, and the PyPI/Go onvif-cli). Don't confuse them. camobaby is NOT a real tool — ignore any hallucinated reference./onvif/device_service but Axis uses /onvif/services and some OEM devices use /onvif-http/snapshot. Always resolve XAddrs via GetCapabilities or GetServices rather than assuming the path.:80 but on the NVR at :8000. GetServices returns authoritative URLs.AbsoluteMove fails on cameras that don't report AbsolutePanTiltPositionSpace. Fall back to RelativeMove or ContinuousMove. The helper raises a clear error.GetSnapshotUri returns ONE URI but cameras often rate-limit it. Don't poll at >1 Hz without testing; some units will refuse connections after burst requests.--timeout N to override (default 8 s).onvif-zeep) is optional. The helper ships a pure-stdlib SOAP client. If onvif-zeep is importable, the helper can fall back to it for complex flows (Events, Analytics) — but everything shown above works without it.uv run ${CLAUDE_SKILL_DIR}/scripts/onvifctl.py discover | \
jq -r '.[].xaddr' | while read url; do
uv run ${CLAUDE_SKILL_DIR}/scripts/onvifctl.py streams \
--xaddr "$url" --user admin --password 'S3cret'
done
uv run ${CLAUDE_SKILL_DIR}/scripts/onvifctl.py ptz stop --host ... --user admin --password x
sleep 1
uv run ${CLAUDE_SKILL_DIR}/scripts/onvifctl.py ptz preset-goto \
--host ... --user admin --password x --preset-token 2
URL=$(uv run ${CLAUDE_SKILL_DIR}/scripts/onvifctl.py streams \
--host ... --user admin --password x --format json \
| jq -r '.[0].rtsp_uri')
ffmpeg -rtsp_transport tcp -i "$URL" -c copy out.mp4
uv run ${CLAUDE_SKILL_DIR}/scripts/onvifctl.py info \
--host ... --user admin --password x --dry-run --verbose
Prints the SOAP envelope and the computed WS-Security digest without hitting the network.
references/services.md — per-profile ONVIF service matrix, XAddr conventions, WS-Security digest recipe, canonical SOAP operation names.onvif-util — libonvif (github.com/sr99622/libonvif), C, brew install sr99622/libonvif/libonvif or build from source.onvif-cli (Python) — pipx install onvif-cli (from github.com/gardere/onvif-cli).onvif_control (Bash) — github.com/camelcamro/onvif_control, minimal WS-Security + PTZ.gonvif (Go) — performant alternative for large fleets.onvif-zeep for Python dev; pure Python, full coverage incl. Events/Analytics.Cause: Not on the same L2 broadcast domain, or firewall drops multicast.
Solution: Confirm cameras on same subnet/VLAN. Disable firewall UDP blocks on port 3702. Fall back to unicast GetCapabilities with a known IP.
Cause: Digest mismatch — typically PasswordText vs PasswordDigest, or clock skew > 5 min.
Solution: Use --verbose to see the SOAP envelope. Verify the Created timestamp is current. Check the camera's NTP.
Sender not authorized or 401 from digestCause: Wrong hashing order (nonce + created + password is required — in that order), or passing the base64-encoded nonce into the SHA1 instead of raw bytes.
Solution: Read references/services.md WS-Security pseudocode. Let --dry-run --verbose print the digest inputs.
ActionNotSupported on AbsoluteMoveCause: Camera lacks AbsolutePanTiltPositionSpace.
Solution: Use ContinuousMove with a short --timeout or RelativeMove.
Cause: Different user table for RTSP vs SOAP.
Solution: Embed user/password in the URL (rtsp://user:pass@host/...) or check the RTSP user in the camera UI.
Cause: Vendor's snapshot handler lives elsewhere despite what GetSnapshotUri returns.
Solution: Try the vendor's documented URL (e.g. http://host/cgi-bin/snapshot.cgi for Amcrest/Dahua), or use an ffmpeg -frames:v 1 grab from the RTSP stream.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub damionrashford/media-os --plugin media-os110 skills in this plugin
/audio-coreaudioManipulate macOS audio at the Core Audio HAL layer: afinfo (audio file metadata), afplay (play), afconvert (convert format/rate/bit-depth/channel layout), say (TTS), SwitchAudioSource (change default input/output/system device — brew install switchaudio-osx), audiodevice CLIs (npm/Go variants), AppleScript via osascript to drive System Preferences Sound. HAL plugins at /Library/Audio/Plug-Ins/HAL/ load virtual drivers (BlackHole 2ch/16ch/64ch, Loopback, Background Music). Aggregate Device (drift-corrected multi-in) and Multi-Output Device via Audio MIDI Setup.app or AudioHardwareCreateAggregateDevice. Use when the user asks to change default macOS audio device, route audio between apps on Mac, install BlackHole, build an Aggregate Device, convert audio files with afconvert, or script Mac audio from the terminal.
/audio-jackRoute professional low-latency audio with JACK Audio Connection Kit (jackaudio.org): jackd server (ALSA/CoreAudio/PortAudio/ASIO backends), jack_control (D-Bus JACK2 config), jack_lsp (list ports/connections), jack_connect/jack_disconnect (manage links), jack_cpu_load, jack_samplerate, jack_bufsize (runtime period size), jack_transport, jack_rec (multi-channel WAV recording), jack_iodelay (round-trip latency), jack_wait, jack_midi_dump. JACK1 C maintenance vs JACK2 C++ multicore. Modern Linux swaps jackd for PipeWire's libjack shim — same client API. JackTrip for uncompressed multichannel UDP over the Internet. Use when the user asks to run a JACK server, connect audio clients, measure roundtrip latency, record from JACK ports, set JACK period size, or bridge JACK over the network with JackTrip.
Other plugins' skills for the same job