Skip to content

Add "inputs" support to pyCA - #587

Open
Arnei wants to merge 1 commit into
opencast:mainfrom
Arnei:extended-capture-agent-api
Open

Arnei wants to merge 1 commit into
opencast:mainfrom
Arnei:extended-capture-agent-api

Conversation

@Arnei

@Arnei Arnei commented Oct 30, 2025

Copy link
Copy Markdown
Member

Adds support for sending configuration to the agent configuration endpoint in Opencast.
Adds a new config option "inputs". It allows users to specifiy for a given event which tracks they would like to show up in the final recording. For example, if the agent is capable of recording both "presenter/source" and "presentation/source", a user may select only "presentation/source" as input.

The idea behind this PR was to make a demo implementation for the extended capture agent api that is currently in the works in the main repo opencast/opencast#7114. However, pyCA cannot make use of any of the new properties/capabilities. So this just adds "inputs", which is a feature that already exists in Opencast and conversely this PR should work fine without opencast/opencast#7114.

This PR is very similar to #413, it just does less.

Adds support for sending configuration to the agent
configuration endpoint in Opencast.
Adds a new config option "inputs". It allows users to specifiy for a
given event which tracks they would like to show up in the final
recording. For example, if the agent is capable of recording both
"presenter/source" and "presentation/source", a user may
select only "presentation/source" as input.
@Arnei
Arnei force-pushed the extended-capture-agent-api branch from ff96eb2 to 6626e4c Compare November 4, 2025 11:45
@Arnei

Arnei commented Nov 17, 2025

Copy link
Copy Markdown
Member Author

Test is failing because the minimum level of code coverage is not met. This is in part due to this PR adding code to a function that already was not covered by code tests previously, which in itselfs seems to be a bug. I could not quite figure out how to properly fix that.

Arnei added a commit to Arnei/pyCA that referenced this pull request Nov 5, 2026
Let users choose which inputs of a capture agent are ingested, using the
input selection of Opencast's capture agent API.

The new agent option `inputs` lists the inputs pyCA offers. An input is
the flavor of a track and has to be one of the configured capture
flavors. The inputs are sent to Opencast as `capture.device.names` with
the agent configuration, where users can select from them when
scheduling an event. The key is omitted if no inputs are configured
since Opencast rejects empty lists.

The selection comes back as `capture.device.names` in the agent
properties attached to the scheduled event. When ingesting, only the
tracks of selected inputs are uploaded. All tracks are still recorded
locally. All tracks are uploaded if pyCA offers no inputs or if nothing
was selected, as required by the API. A selection which does not match
any recorded track, for example because the inputs were changed after
scheduling, uploads everything and logs a warning instead of ingesting
an empty recording.

The configuration is rejected on startup if an input is not a capture
flavor or longer than 256 characters, which Opencast would answer by
rejecting the whole agent configuration.

This builds on the idea of opencast#587.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant