Closed ForksCoolStuff closed 1 year ago
To quote from the README:
Stream-m is created to be an open source solution for streaming live video right into the web browser using the HTML5 video tag and Google's WebM or the prolific H.264 video format.
For output it uses the the Format you put in. WebM and H.264 can be used in the browser for a live video. For input there is a RTMP implementation.
Yes but there is a way to deliver that format and what is typically used for live video is HLS or MPEG-DASH. I understand that the format is WebM or MP4 but how are you streaming video to HTML video tags in Chrome if Chrome supports neither HLS nor DASH natively?
If you want to embed the Stream into a Video File, you can use MediaStream API.
You can also just open the /consume/
link directly in the browser to watch the video.
Basically there are two distinct pipelines. Either WebM: VP8+Vorbis codecs > Matroska container > long PUT or POST > (server) builds Matroska container > video tag (doing long GET as if it was a big file) ... or H.264: H.264+AAC > frames transmitted within RTMP connection > (server) builds MP4 (Movie fragments) > javascript GETting header then polling for newer fragments (MOOFs) > video tag
if Chrome supports neither HLS nor DASH natively
On the WebM path basically a huge file is emulated, the client does not know it is a live stream. So you don't need the JS "player" code if you choose that format.
The MP4 is not fully DASH-compliant, it is a mish-mash of certain MP4 features that plays (maybe compatibility got better since those days). What certainly changed is that VP8+Vorbis CAN be wrapped in DASH (-like container) now, so the pipeline can be probably simplified.
As an alternative target encapsulation I always eyed HLS. It is based on TS, which means you don't need to have complete movie fragments before muxing. With this you could do low latency streaming (start to transmit to clients before even the frame fully arrives to the server).
Thanks for clearing that up! I was having a hard time figuring out exactly what was going on here. I'll go ahead and close this issue.
What streaming format does this use? Not container, is it HLS? DASH?