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:
-
Navigate to the Restreamer UI
-
If this is the first time logging in, the credentials are already in the form. Otherwise use keycloak admin creds
-
If this is the first time using restreamer in a deployment, then the new stream wizard is already open and guiding you through.
-
Click
Network Sourceoption if not already selected, and continue. -
Video setup- enter the rtsp url, and continue. Basic auth credentials are unlikely
-
Video setup profile- default selection is probably adequate, if there are even multiple options
-
Audio setup- use default
-
Metadata, leave blank for now. Can eventually add SDL stuff if we stick with restreamer long term.
-
License- select none
-
You may get an error that "the video could not be loaded". Half the time a simple refresh fixes it.
-
If refresh doesn’t fix:
-
go into the stream settings (click the pencil icon towards the upper right of the video player)
-
edit video settings (pencil icon). Select
Disconnect and continueif prompted. -
Click the big probe button towards the bottom of the form
-
Change the codec from
Passthroughtoh.264 (libx264) -
select the
Audiobutton at the bottom of the form to advance -
click
Finishto advance -
click
Save -
click
Connectto restart the stream
-
If you already have one or more streams created, and you wish to add 1 more,
-
click the camera icon in the upper right of the webpage
-
click the plus button to the upper right of the channels modal that pops up
-
Add a name for the new channel
-
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
-
Navigate to the media store (no menu item exists, manually update the url)
-
Click the Livestreams tab
-
In the middle of the empty video player, click on the
Select a stream to adddropdown -
click add UUID
-
navigate to restreamer. Get the UUID from the url
-
Enter the UUID and stream name in the df-frontend modal
-
Wait the better part of a min (known issue)
-
Setup stream recording
This currently uses df-oryx. Soon to be refactored out.
-
Navigate to the video service
-
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. -
Click the
Recordtab -
Click the
Enable Recordexpansion item if not already expanded -
Click the
Start Recordbutton -
Click the
Streamingtab -
Expand the
RTMP: OBS or VMixif not already selected -
Copy the
Streamkeyunder step 3 -
Switch back to restreamer
-
Navigate to the stream you want to record
-
On the
Publicationswidget, click the plus sign -
Select
RTMP -
For address, enter
df-video:1935/live/ -
Paste in the stream key you copied earlier
-
Click save
-
Click the enable toggle next to the stream name you just created in the publication widget
-
Navigate back to oryx
-
To confirm the stream is coming through, click the
Simple Playerhyperlink on the same line as step 4.1 on the "RTMP: OBS or vMix" section -
Back in oryx, click the Record tab
-
Expand the
Record Tasksexpansion item -
Wait a minute. You should see a new task appear
-
Navigate to MinIO,
streamsbucket -
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