Skip to content

Conversation

@aler9
Copy link
Member

@aler9 aler9 commented Jan 10, 2026

Fixes #2214

This patch allows streams to be always available to readers, generating continuous streams regardless of whether the publisher is online or not. This works by seamlessly merging together "online" streams with an "offline" video, without decoding or re-encoding anything (as always), acting on already-encoded packets. When a publisher is offline, a blank video is returned:

offline

The feature can be enabled by setting the alwaysAvailable property on specific paths. Track list is also mandatory:

paths:
  stream:
    alwaysAvailable: true
    alwaysAvailableTracks:
    - codec: H264

TODO:

  • support multitrack streams
  • support audio tracks
  • allow to specify an alternative offline video
  • add documentation
  • add tests

@roger-
Copy link

roger- commented Jan 10, 2026

Awesome! Can this be extended to support an arbitrary "offline" image? Having the ability to dynamically set the image would be great too.

@aler9
Copy link
Member Author

aler9 commented Jan 10, 2026

@roger- absolutely, i'll add some settings like

alwaysAvailableOfflineVideo: myvideo.mp4

@roger-
Copy link

roger- commented Jan 11, 2026

Would it catch a change in myvideo.mp4 and reload?

I'd like to be able to repeat the last frame until input stream resumed, and I can hack together something if myvideo.mp4 isn't cached. FYI my use case is turning an intermittent (battery) camera stream into a continuous one.

aler9 added 7 commits January 13, 2026 09:40
this allows to apply features that were previously implemented for
single codecs (like RTP packet resizing), to any codec, and simplifies
future development.
@aler9 aler9 force-pushed the feature/alwaysonline branch from 9e531ac to 599b148 Compare January 13, 2026 08:41
@jmduerk
Copy link

jmduerk commented Jan 13, 2026

When using this feature, will the paths/list API always show active for a stream with this configured, or will API return true online/offline status?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow a publisher to reconnect without disconnecting readers

4 participants