Skip to content

Option to preload RTSP streams #605

@felipecrs

Description

@felipecrs

I have two use cases for this feature:

  1. I have a chinese Wi-Fi camera which, unless I keep always keep loading its stream, breaks the stream and go2rtc does not recover automatically.
  • I don't think this is an issue with go2rtc
  • Preloading the camera in Home Assistant fixes the issue
  1. As a temporary fix for: Copying audio only works after opening original stream once #530

If there was an option to preload (or maintain some stream always open in go2rtc itself), it would be great. I feel like preloading the camera from Home Assistant side takes too many CPU cycles as it spawns a ffmpeg process.

Example of how it could look like:

streams:
  camera_01:
    - rtsp://192.168.1.21:554/user=admin_password=pass_channel=0_stream=1&onvif=0.sdp?real_stream#preload

I don't think this support needs to be implemented to any other source (only RTSP), because one could easily create a fake consumer to the source just to preload it, if it's not already RTSP:

streams:
  camera_01:
    - ffmpeg:rtsp://192.168.1.21:554/user=admin_password=pass_channel=0_stream=1&onvif=0.sdp?real_stream#video=copy#audio=copy
  camera_01_for_preload:
    - rtsp://127.0.0.1:8554/camera_01#preload

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions