Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

BAP 4K Streaming Camera (Radxa Rock 5A)

Portable 4K live-streaming camera headset: capture + hardware H.264 encode + WebRTC streaming, an embedded control loop with physical buttons, and a browser viewer page.

Deploy

On a Radxa Rock 5A running Radxa's official OS image (required for the mpph264enc hardware encoder), logged in as the radxa user:

git clone <this-repo-url> && cd <repo>
chmod +x deploy.sh
./deploy.sh

deploy.sh installs all dependencies + MediaMTX, copies files into place, and starts two services that run on boot:

  • bap-control — the control loop (FSM, GPIO buttons, sensors); it launches the camera pipeline + media server when you start streaming.
  • bap-session — the viewer session server (port 8090).

Use

  • Press the stream button (GPIO chip 1, line 5) to start; mute is line 8. (not yet the final gpio maping)
  • Open https://<board-ip>:8443/viewer.html in a browser and accept the self-signed certificate.
  • The video should appear. The viewer-count feature talks to port 8090 over the same self-signed cert; if the count doesn't work, open https://<board-ip>:8090/health once and accept that certificate too, then reload the viewer page.

Logs / control

systemctl status bap-control bap-session
journalctl -u bap-control -f
journalctl -u bap-session -f
sudo systemctl restart bap-control

Notes

  • MediaMTX binary: if you drop the mediamtx binary into this folder before pushing, deploy.sh installs that exact build; otherwise it downloads the latest from GitHub. Bundling it guarantees the same version and works offline (note: it's ~61 MB, which GitHub warns about above 50 MB but still accepts).
  • mediamtx.yml contains settings tied to the original device/network. On a different Rock 5A or network you will likely need to edit:
    • webrtcICEServers2 — the STUN/TURN server (145.94.187.5, user martin) is external infrastructure; remote viewers need a reachable TURN server.
    • webrtcAdditionalHosts — the listed IPs are the old machine's; stale ones are harmless but add the new box's IP(s) if remote viewing misbehaves.
    • the audio device plughw:2,0 (in the test and talkback pipelines) — check arecord -l / aplay -l if mic or talkback audio doesn't work.
    • the camera device /dev/video11 — check v4l2-ctl --list-devices.
  • server.js is TLS-enabled here because viewer.html connects with wss://…:8090. The original committed server.js was plain HTTP, which the browser can't use from the HTTPS viewer page — that's why this differs.
  • Passwords/certs are committed on purpose for a plug-and-play setup e

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages