wimpysworld / stream-sprout

Restream a video source to multiple destinations such as Twitch, YouTube, Owncast and Peertube 📡
Apache License 2.0
24 stars 4 forks source link

feat: HTTP API Authentication and Configuration Hot Reloading #44

Open primemb opened 1 month ago

primemb commented 1 month ago

Hi Stream Sprout is an excellent solution for streaming to multiple destinations, providing functionality similar to services like Restream.io without the need for third-party services. However, I believe the project could be further improved with the addition of two key features:

HTTP API Authentication:

Currently, Stream Sprout does not offer built-in authentication for its HTTP API, which could potentially expose the API to unauthorized access if the service is hosted remotely. Implementing authentication for the HTTP API would greatly enhance the security of Stream Sprout, especially when it is run on a remote server. This could be achieved by introducing token-based authentication, basic auth, or even integrating with OAuth for more advanced use cases. Configuration Hot Reloading:

At present, changes to the configuration file require a restart of the Stream Sprout service to take effect. Introducing hot reloading of the YAML configuration file would allow users to update their stream destinations and other settings on the fly, without the need for a restart. This feature would enhance the usability of Stream Sprout, making it more flexible and responsive to dynamic streaming needs.

popey commented 4 weeks ago

Hi @primemb, Thanks for the feature suggestions. These are both great ideas, but I suspect they are somewhat limited by the way stream-sprout is (currently) architected as a shell script wrapper around ffmpeg.

Some of these more advanced (and indeed very useful) features will require a rewrite in a 'proper' language, I think.

primemb commented 3 weeks ago

well i think you can use ngnix rtmp instead of pure ffmpeg for RTMP server i used this docker before :

https://github.com/tiangolo/nginx-rtmp-docker

this also solve authentication problem and limitation that you already have