Our great sponsors
-
owncast
Take control over your live stream video by running it yourself. Streaming + chat out of the box.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
rtsp-simple-server
Discontinued Also known as rtsp-simple-server. ready-to-use RTSP / RTMP / LL-HLS / WebRTC server and proxy that allows to read, publish and proxy video and audio streams. [Moved to: https://github.com/aler9/mediamtx]
Check out owncast. It handles the capturing of the OBS stream, and then you will "only" need to solve the problems of an interstitial "technical difficulties" stream, and the chaining to another server (twitch in your case).
So a good place to begin - I tried googling this but there is a lot of noise in the google results since I am lacking domain keywords, what is it called when / what libraries can I use for receiving video from something like OBS? The one useful result I have so far is livego, my only concern being that everything is handled so I have no control over the delay/buffer. There is 1 github issue about it that was asked and then closed without an answer. I don't see it in the configs either. Also unsure if I would be able to target twitch as the upload target.
I don't know how low level you want to go, but assuming you don't want to re-implement video codecs then GStreamer is probably a good place to start, it allows you to create modular video pipelines and it has Go bindings (although I've not personally used them).
I would use 2 instances of OBS with rtsp-simple-server in between. You can probably add a delay on the input of the second OBS instance.
Related posts
- Video streaming in golang
- [Docker] Question: Comment forcer le redémarrage d'un conteneur périodiquement
- GitHub - datarhei/restreamer: The Restreamer is a complete streaming server solution for self-hosting. It has a visually appealing user interface and no ongoing license costs. Upload your live stream to YouTube, or Twitch. Receive video data from OBS and publish it with the RTMP and SRT server.
- IP Camera feeds to iOS App
- Suggestions for Platform for a 24/7 Live Stream