Videos in SDL

Working with videos

SDL currently ships with 2 video handling services, Restreamer and Oryx.

Restreamer is the primary means to consume an external Stream. For RTSP streams specifically, follow the steps below.

Fresh stream setup:

  1. Navigate to the Restreamer UI

  2. If this is the first time logging in, the credentials are already in the form. Otherwise use keycloak admin creds

  3. If this is the first time using restreamer in a deployment, then the new stream wizard is already open and guiding you through.

  4. Click Network Source option if not already selected, and continue.

  5. Video setup- enter the rtsp url, and continue. Basic auth credentials are unlikely

  6. Video setup profile- default selection is probably adequate, if there are even multiple options

  7. Audio setup- use default

  8. Metadata, leave blank for now. Can eventually add SDL stuff if we stick with restreamer long term.

  9. License- select none

  10. You may get an error that "the video could not be loaded". Half the time a simple refresh fixes it.

  11. If refresh doesn’t fix:

    1. go into the stream settings (click the pencil icon towards the upper right of the video player)

    2. edit video settings (pencil icon). Select Disconnect and continue if prompted.

    3. Click the big probe button towards the bottom of the form

    4. Change the codec from Passthrough to h.264 (libx264)

    5. select the Audio button at the bottom of the form to advance

    6. click Finish to advance

    7. click Save

    8. click Connect to restart the stream

If you already have one or more streams created, and you wish to add 1 more,

  1. click the camera icon in the upper right of the webpage

  2. click the plus button to the upper right of the channels modal that pops up

  3. Add a name for the new channel

  4. Follow the steps above starting at #4

Grabbing the stream from an external application

For this initial setup, we are using HLS (http live streaming)

For a stream you wish to get a url for: . select the stream in restreamer (such that you are seeing the video player) . click the hls button to the bot right of the video player to copy the url. . Adjust the hostname as needed to make it externally accessible

Displaying the stream in df-frontend

  1. Navigate to the media store (no menu item exists, manually update the url)

    1. Click the Livestreams tab

    2. In the middle of the empty video player, click on the Select a stream to add dropdown

    3. click add UUID

    4. navigate to restreamer. Get the UUID from the url

    5. Enter the UUID and stream name in the df-frontend modal

    6. Wait the better part of a min (known issue)

Setup stream recording

This currently uses df-oryx. Soon to be refactored out.

  1. Navigate to the video service

  2. Log in with keycloak admin creds.

    Oryx has issues clearing expired auth data from the browser. You may need to manually clear tokens/cookies if trying to log back in after an expired session.
  3. Click the Record tab

  4. Click the Enable Record expansion item if not already expanded

  5. Click the Start Record button

  6. Click the Streaming tab

  7. Expand the RTMP: OBS or VMix if not already selected

  8. Copy the Streamkey under step 3

  9. Switch back to restreamer

  10. Navigate to the stream you want to record

  11. On the Publications widget, click the plus sign

  12. Select RTMP

  13. For address, enter df-video:1935/live/

  14. Paste in the stream key you copied earlier

  15. Click save

  16. Click the enable toggle next to the stream name you just created in the publication widget

  17. Navigate back to oryx

  18. To confirm the stream is coming through, click the Simple Player hyperlink on the same line as step 4.1 on the "RTMP: OBS or vMix" section

  19. Back in oryx, click the Record tab

  20. Expand the Record Tasks expansion item

  21. Wait a minute. You should see a new task appear

  22. Navigate to MinIO, streams bucket

  23. You should see fragmented video files appear under a UUID folder. A single large mp4 will be created from all those after the stream ends