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:
-
navigate to domain/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 Source
option 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 continue
if prompted. -
Click the big probe button towards the bottom of the form
-
Change the codec from
Passthrough
toh.264 (libx264)
-
select the
Audio
button at the bottom of the form to advance -
click
Finish
to advance -
click
Save
-
click
Connect
to 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: 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
-
Navigate to [df-frontend]/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 add
dropdown -
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.
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