Skip to content

Information display for Opencast Capture Agents

License

Notifications You must be signed in to change notification settings

virtUOS/opencast-ca-display

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Opencast Capture Agent Display

Software backend for displays showing the current state of Opencast capture agents.

How to build your Capture Agent Display

List of components

Instuctions

  1. Put Raspberry Pi CM4 on the base board
  2. Set the boot switch to on
  3. Connect the board via USB-C cable
  4. Run rpiboot to mount the CM4 file system
  5. Start Raspberry Pi Imager:
  • Device: Raspberry Pi 4
  • OS: Raspberry Pi OS Lite (64 bit)
  • Target: Select the CM4 Module Filesystem
  • Additional settings:
    • Enable SSH public key
    • Set default SSH key
    • Disable telemetry
  1. Write image to CM
  2. Set boot to off
  3. Boot Raspberry Pi
  4. Run the Ansible playbook prepare-os.yml
  5. Get MAC address (e.g. ip a on system)
  6. Configure the agent setting in /opt/opencast-ca-display/opencast-ca-display.yml to the corresponding capture agent
  7. Reboot the Raspberry Pi

Build & Run

Make sure to install Go. This should be something like:

❯ dnf install golang

Then run the project with:

❯ go run main.go

…or build a static binary:

❯ go build

Example

The display control in action:

opencast-ca-display-prototype.mp4
  • The display and laptop do not know about each other
  • The laptop is running an Opencast capture agent
  • When the laptop starts capturing video, the display shows an active recording

Opencast User

To improve security, you can limit the access rights for the Opencast user by creating a user which has only read access to the capture agent status API and nothing else.

To do this, first create a new security rule in your Opencast's etc/security/mh_default_org.xml allowing read access for a new role ROLE_CAPTURE_AGENT_CALENDAR:

<!-- Enable capture agent updates and ingest -->
<sec:intercept-url pattern="/capture-admin/agents/**" method="GET" access="ROLE_ADMIN, ROLE_CAPTURE_AGENT, ROLE_CAPTURE_AGENT_CALENDAR" />
<sec:intercept-url pattern="/capture-admin/**" access="ROLE_ADMIN, ROLE_CAPTURE_AGENT" />

Next, go to the Opencast REST Docs → /user-utils and fill out the form for POST / with data like this:

  • username: ca-display
  • password: secret-password
  • roles: ["ROLE_CAPTURE_AGENT_CALENDAR"]

You should now be able to use this new user.