Simulate HLS Live Stream from Non-Live Source
I'm working on a video player (it's a sports video tagging AI magic kind of thing) and we have a backend already set up that
a) gets the video stream from cameras
b) creates video segments and uploads it to some google cloud bucket
c) something updates the m3u8 file as the upload is happening
Okay, great, but for testing purposes and local UI development, I don't want to spin up the whole shazam...
What would be a good way to simulate a live stream from an existing m3u8 playlist of a non-live full video asset?
Ideally I'd also want to simulate network outages, to make sure the UI handles it gracefully, etc
I found this
https://github.com/futzu/x9k3
but I'd like to avoid python if possible
Also found this
https://github.com/alkerway/hls-simulator
But this doesn't even build, so I'm kind of just noping out right away.
GitHub
GitHub - futzu/x9k3: x9k3 is a HLS Segmenter with SCTE 35, and Liv...
x9k3 is a HLS Segmenter with SCTE 35, and Live Streaming from Non-Live Soures and Looping. - GitHub - futzu/x9k3: x9k3 is a HLS Segmenter with SCTE 35, and Live Streaming from Non-Live Soures and...
GitHub
GitHub - alkerway/hls-simulator: Serve a vod hls manifest as live a...
Serve a vod hls manifest as live and test out how a video player handles manifest server failures by simulating them on API command. Useful for testing. - GitHub - alkerway/hls-simulator: Serve a v...
7 Replies
I just use Mux if I want it externally, and a local OBS or FFMPEG instance if I want it locally
okay ffmpeg I have
never touched OBS (it's a streaming thing, right? to capture your desktop)
and what's Mux?
OBS is a desktop app for compositing and streaming video, it's what every streamer and most youtubers use
Mux is a service for doing video streaming and distribution
oh, this?
The API to Video | Mux
Mux is video infrastructure built by the experts. Take any video file or live stream and make it play beautifully at scale on any device, powered by magical-feeling features like automatic thumbnails, animated gifs, and data-driven encoding decisions. Spend your time building what people want, not drudging through FFmpeg documentation. Already h...
Yes
thanks!
and do you have a trick in your back pocket to simulate a bad connection...?
I guess with mux you could throttle via chrome...
for future reference
1) mux.com --> quality stuff 👌 but the live stream seems to use RTMP (at least the free tier) so I wasn't able to use it
2) OBS is like photoshop, I'm sure it's great, but I don't want to spend time with it right now
This did the trick for me
https://github.com/tjenkinson/mock-hls-server
future future reference, I was being an idiot
1) OBS setup was a breeze, took me 5 mins
2) OBS connects to the RTMP server provided by Mux
3) Mux generates an m3u8 playlist that I can feed into my video player
tadaaa
streaming is fun, kids!