THM-Health / PILOS

PILOS is an easy-to-use open source front-end for BigBlueButton servers with a built-in load balancer. Docker-Images: https://hub.docker.com/r/pilos/pilos
https://thm-health.github.io/PILOS/
GNU Lesser General Public License v2.1
48 stars 18 forks source link

support for recordings in Opencast #1068

Open hex-m opened 4 months ago

hex-m commented 4 months ago

Is your feature request related to a problem? Please describe. We currently manage our recordings in Opencast. We would like to keep it that way after migrating from Greenlight to PILOS.

Describe the solution you'd like

Additional context We use Opencast-BigBlueButton-Integration. The most important points are:

  1. Frontend adds metadata to the create-call.
  2. post_archive.rb sends the raw recording to Opencast for processing and storage.
  3. User can access the recording using the Opencast interface.
SamuelWei commented 3 months ago

Could you provide a list with the required metadata?

mprantl commented 3 months ago

Hi, these are the metadata items we are currently setting in greenlight:

      "meta_#{META_LISTED}": options[:recording_default_visibility] || false,
      "meta_bbb-origin-version": Greenlight::Application::VERSION,
      "meta_bbb-origin": "Greenlight",
      "meta_bbb-origin-server-name": options[:host],
      "meta_opencast-dc-title": Time.now.strftime("%Y-%m-%d") + " - " + room.name,
      "meta_opencast-dc-creator": options[:user_name],
      "meta_opencast-dc-created": Time.now.strftime("%Y-%m-%dT%H:%M:%SZ"),
      "meta_opencast-dc-language": "DE",
      "meta_opencast-dc-rightsHolder": username,
      "meta_opencast-dc-isPartOf": room.bbb_id,
      "meta_opencast-acl-read-roles": "ROLE_USER_" + username.upcase,
      "meta_opencast-acl-write-roles": "ROLE_USER_" + username.upcase,
      "meta_opencast-series-acl-read-roles": "ROLE_USER_" + username.upcase,
      "meta_opencast-series-acl-write-roles": "ROLE_USER_" + username.upcase,
      "meta_opencast-series-dc-title": room.name
    }
SamuelWei commented 3 months ago

@mprantl How do you set this in greenlight? Is this an official setting or do you have your own greenlight fork?

mprantl commented 3 months ago

We have added this to the start_session method in app/controllers/concerns/bbb_server.rb

....
def start_session(room, options = {})
    username = options[:user_username].nil? ? "" : options[:user_username]
    create_options = {
      record: options[:record].to_s,
      logoutURL: options[:meeting_logout_url] || '',
      moderatorPW: room.moderator_pw,
      attendeePW: room.attendee_pw,
      moderatorOnlyMessage: options[:moderator_message],
      "meta_#{META_LISTED}": options[:recording_default_visibility] || false,
      "meta_bbb-origin-version": Greenlight::Application::VERSION,
      "meta_bbb-origin": "Greenlight",
      "meta_bbb-origin-server-name": options[:host],
      "meta_opencast-dc-title": Time.now.strftime("%Y-%m-%d") + " - " + room.name,
      "meta_opencast-dc-creator": options[:user_name],
      "meta_opencast-dc-created": Time.now.strftime("%Y-%m-%dT%H:%M:%SZ"),
      "meta_opencast-dc-language": "DE",
      "meta_opencast-dc-rightsHolder": username,
      "meta_opencast-dc-isPartOf": room.bbb_id,
      "meta_opencast-acl-read-roles": "ROLE_USER_" + username.upcase,
      "meta_opencast-acl-write-roles": "ROLE_USER_" + username.upcase,
      "meta_opencast-series-acl-read-roles": "ROLE_USER_" + username.upcase,
      "meta_opencast-series-acl-write-roles": "ROLE_USER_" + username.upcase,
      "meta_opencast-series-dc-title": room.name
    }
...
SamuelWei commented 3 months ago

@hex-m @mprantl @tibroc Please have a look at the PR, I'm not sure what creator, acl-user-id and rightsHolder should be by default: The user's email or username ? (Note: Local users have no username, if multiple external authenticators are used, eg. LDAP + Shibboleth, multiple users could have the same username)

tibroc commented 3 months ago

In general this seems to work. However, I will still need to take a look at the meta data. It does not seem to arrive in Opencast correctly. This is what is shown in Opencast:

image

Nordln commented 3 months ago

Greetings from me, Ed, Innsbruck LFU.

Below is an extract from the top of the events.xml from a recording ran this morning. This is the entire set of metadata used for our BBB->OC ingest setup. The fictitious user here is Joe Blogs (User ID: XYZ1234).

Our BBB/OC/LMS software ecosystem appends "ROLEUSER" to the user ID when dealing with media sent to or sourced from Opencast, but essentially the user ID is the main field for user identification. The DC fields "rightsholder" and "creator" for any given episode or series are used as text-string identifiers only.

<metadata isBreakout="false"
          meetingId="f6bf0cb3-0f48-40bd-bd72-1649376bce30"
          meetingName="Metadata test"
          opencast-acl-read-roles="ROLE_USER_XYZ1234"
          opencast-acl-write-roles="ROLE_USER_XYZ1234"
          opencast-dc-created="2024-05-27T08:50:00"
          opencast-dc-creator="Joe Blogs"
          opencast-dc-identifier="f6bf0cb3-0f48-40bd-bd72-1649376bce30"
          opencast-dc-ispartof="RepositoryEntry::883785728::102364545619425"
          opencast-dc-rightsholder="Joe Blogs"
          opencast-dc-spatial="OpenOlat-BigBlueButton"
          opencast-dc-title="2024-05-27 - Metadata test"
          opencast-series-acl-read-roles="ROLE_USER_XYZ1234"
          opencast-series-acl-write-roles="ROLE_USER_XYZ1234"
          opencast-series-dc-creator="Joe Blogs"
          opencast-series-dc-rightsholder="XYZ1234"
          opencast-series-dc-title="Virtuelles Klassenzimmer AV-Testkurs"/>

These correspond to the assignment made in the opencast-bigbluebutton-integration script that uses mappings found in this rb module: https://github.com/elan-ev/opencast-bigbluebutton-integration/blob/master/oc_modules/oc_dublincore.rb

SamuelWei commented 3 months ago

Greetings from me, Ed, Innsbruck LFU.

Below is an extract from the top of the events.xml from a recording ran this morning. This is the entire set of metadata used for our BBB->OC ingest setup. The fictitious user here is Joe Blogs (User ID: XYZ1234).

Our BBB/OC/LMS software ecosystem appends "ROLEUSER" to the user ID when dealing with media sent to or sourced from Opencast, but essentially the user ID is the main field for user identification. The DC fields "rightsholder" and "creator" for any given episode or series are used as text-string identifiers only.

<metadata isBreakout="false"
          meetingId="f6bf0cb3-0f48-40bd-bd72-1649376bce30"
          meetingName="Metadata test"
          opencast-acl-read-roles="ROLE_USER_XYZ1234"
          opencast-acl-write-roles="ROLE_USER_XYZ1234"
          opencast-dc-created="2024-05-27T08:50:00"
          opencast-dc-creator="Joe Blogs"
          opencast-dc-identifier="f6bf0cb3-0f48-40bd-bd72-1649376bce30"
          opencast-dc-ispartof="RepositoryEntry::883785728::102364545619425"
          opencast-dc-rightsholder="Joe Blogs"
          opencast-dc-spatial="OpenOlat-BigBlueButton"
          opencast-dc-title="2024-05-27 - Metadata test"
          opencast-series-acl-read-roles="ROLE_USER_XYZ1234"
          opencast-series-acl-write-roles="ROLE_USER_XYZ1234"
          opencast-series-dc-creator="Joe Blogs"
          opencast-series-dc-rightsholder="XYZ1234"
          opencast-series-dc-title="Virtuelles Klassenzimmer AV-Testkurs"/>

These correspond to the assignment made in the opencast-bigbluebutton-integration script that uses mappings found in this rb module: https://github.com/elan-ev/opencast-bigbluebutton-integration/blob/master/oc_modules/oc_dublincore.rb

Hi Ed,

Thanks for providing your example metadata. Could you run this PR and let me know what is missing? What is the User ID? Is this the LDAP, OpenID-Connect, Shibboleth Username? (If not how can PILOS get this attribute)

mprantl commented 3 months ago

Hey, i did a test-recording and compared it to the current events.xml from Ed. Not yet sure about the Role. Anyway this is my current "diff"

<metadata ---PILOS Only---
          pilos-sub-spool-dir=""
          pencast-acl-user-id="c000000" ('o' in opencast missing) 
          endcallbackurl="https://pilos.url/api/v1/meetings/..."
          bbb-origin="PILOS" 
          opencast-dc-language="en" 
          opencast-series-acl-user-id="c000000"
          ----------------
          isBreakout="false" 
          meetingId="e6a47771-2f24-4329-83d8-f435a334682e"
          meetingName="ShibPilosOCRecTest"
          // opencast-acl-read-roles="(ROLE + Firstnam Lastname + opencast-acl-user-id)"
          // opencast-acl-write-roles="(ROLE + Firstnam Lastname + opencast-acl-user-id)"
          opencast-dc-created="2024-06-04T11:46:07Z" (Z?) 
          opencast-dc-creator="c000000" (currently Authenticator-ID - UID. Should be Firstnam Lastname)
          // opencast-dc-identifier="(meetingId)"
          opencast-dc-ispartof="lbq-7cz-hfb" (value looks different)
          opencast-dc-rightsholder="c00000" (currently Authenticator-ID - UID. Should be Firstnam Lastname) 
          // opencast-dc-spatial="(bbb-origin)" 
          opencast-dc-title="2024-06-04 - ShibPilosOCRecTest"
          // opencast-series-acl-read-roles="(ROLE + Firstnam Lastname + opencast-series-acl-user-id)"
          // opencast-series-acl-write-roles="(ROLE + Firstnam Lastname + opencast-series-acl-user-id)"
          // opencast-series-dc-creator="Joe Blogs" (Should be Firstnam Lastname)
          // opencast-series-dc-rightsholder="(opencast-dc-rightsholder)" 
          opencast-series-dc-title="ShibPilosOCRecTest"/> 
SamuelWei commented 3 months ago

Thanks @mprantl.

I have no idea why the 'o' is missing in opencast-acl-user-id, just checked, there is no typo in the source

I changed the metadata opencast-dc-creator and opencast-dc-rightsholder to use the full name of the user instead of their external id. I have also added the opencast-series-dc-rightsholder and opencast-series-dc-creator (there were missing the in the code you provided in https://github.com/THM-Health/PILOS/issues/1068#issuecomment-2124644882)

On opencast-dc-created: You asked why there is a 'Z' in "2024-06-04T11:46:07Z". As far as I understand your ruby code Time.now.strftime("%Y-%m-%dT%H:%M:%SZ") this should also have the 'Z' at the end to tell this time is UTC.

On the missing opencast-series-acl-read-roles, opencast-series-acl-write-roles, opencast-acl-read-roles and opencast-acl-write-roles: As far as I correctly understood the docs (https://github.com/elan-ev/opencast-bigbluebutton-integration?tab=readme-ov-file#user-access-data) you can set opencast-acl-user-id and opencast-series-acl-user-id instead, as this sets the read and write access for this user. Looking into the code it should have the same result (see https://github.com/elan-ev/opencast-bigbluebutton-integration/blob/master/oc_modules/oc_acl.rb#L61:L72)

SamuelWei commented 3 months ago

Note: I have just updated the docker image: pilos/pilos:dev-1068-support-for-recordings-in-opencast with the latest changes

SamuelWei commented 2 months ago

LTI Demo: https://github.com/opencast/helper-scripts/tree/master/lti-test-consumer