Videos in Data Fabric

Working with videos

Data Fabric 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 domain/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:

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

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

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

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

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

  17. click Finish to advance

  18. click Save

  19. 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: 1. select the stream in restreamer (such that you are seeing the video player) 2. click the hls button to the bot right of the video player to copy the url. 3. Adjust the hostname as needed to make it externally accessible

Displaying the stream in df-frontend

  1. Navigate to [df-frontend]/media-store (no menu item exists, manually update the url)

  2. Click the Livestreams tab

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

  4. click add UUID

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

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

  7. 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 domain 2. Log in with keycloak admin creds. Note oryx sucks at 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 18. Back in oryx, Click the Record tab 19. Expand the Record Tasks expansion item 20. Wait a min. You should see a new task appear 21. Navigate to MinIO, streams bucket 22. You should see fragmented video files appear under an uuid folder. A single large mp4 will be created from all those after the stream ends