eluv-io / elv-live-stream

MIT License
0 stars 0 forks source link

Support for DVR configuration #52

Open elv-gerald opened 1 month ago

elv-gerald commented 1 month ago

We will need to have a brain storm session on how we want to add support for DVR. This feature is already deployed to demo and I have been manually configuring streams to test this.

For now this ticket can serve as a general overview of DVR based on my testing

PR for qfab: https://github.com/qluvio/content-fabric/pull/2859#issue-2458103156

DVR is controlled using the following parameters in the "playout_config" of a stream config. Here are notes from my testing

Examples

enable dvr on a stream with max duration

"playout_config": {
          "dvr_enabled": true,
          ...

enable dvr, start at 19:55 UTC time with max duration

"playout_config": {
          "dvr_enabled": true,
          "dvr_start_time": "2024-08-14T19:55:00Z",
          "dvr_max_duration": 0,
          ...

enable dvr, start at 13:30 PDT time and set the max duration to 1 hour

"playout_config": {
          "dvr_enabled": true,
          "dvr_start_time": "2024-08-30T13:30:00-07:00",
          "dvr_max_duration": 3600
          ...

enable dvr, start at 13:30 PDT time and max duration of 30 min

"playout_config": {
          "dvr_enabled": true,
          "dvr_max_duration": 1800
          ...

Additional notes

Start time notes

elv-serban commented 2 weeks ago

For the Live Stream App

Playout Config

DVR

Recording Config

elv-gerald commented 2 weeks ago

I found a bug.

dvr_start_time is optional. When I configured my stream to not include a start time I got an error

index-DOjALbTI.js:200 Unable to configure watermark TypeError: Cannot read properties of null (reading 'toISOString')
    at fEe.<anonymous> (index-DOjALbTI.js:254:162588)
    at Generator.next (<anonymous>)
    at gO (index-DOjALbTI.js:42:6173)
    at <unnamed flow> - runid: 830 - yield 3 (index-DOjALbTI.js:42:5992)
    at v (index-DOjALbTI.js:42:22998)

Here is how my form looked image

Also happend if I want to disable dvr outright image

elv-zenia commented 1 week ago

Fixed the above bug, plus the following:

Updated prod-dev.

elv-gerald commented 1 week ago

I am testing on demo and I notice when I create/configure a new stream the reconnect_timeout is not being set in the config meta. I see it defaults to 1 hour in the form but it is not present in the config.

The path I am looking for the value resides in live_recording.recording_config.recording_params.reconnect_timeout

image
elv-zenia commented 1 week ago

Pushed a fix and updated demo and prod-dev.

elv-gerald commented 1 week ago

Today we also agreed to explicitly set reconnect_timeout and connection_timeout to 10 minutes (600 seconds) in the metadata for all created streams.