3 ms·
This appears to use the MediaStream Recording API (https://developer.mozilla.org/en-US/docs/Web/API/MediaStream_Recording_API https://developer.mozilla.org/en-U
by iameli 6y ago
This appears to use the MediaStream Recording API (https://developer.mozilla.org/en-US/docs/Web/API/MediaStream_Recording_API https://developer.mozilla.org/en-US/docs/Web/API/MediaStream...) to produce a WebM H.264 stream, which can be sent to the WebSocket. The server then transmuxes this to a FLV H.264 stream for RTMP output.
- giantrobot 6y agoA...WebM H.264 stream? Again, with feeling. This time, try something that's a thing.
- iameli 6y agoThat's what I always assumed you got back when you create a MediaRecorder like so: new MediaRecorder(stream, { mimeType: 'video/webm;codecs=h264' }) Which is what this project does. Is it actually returning something else behind the scenes?
- half-kh-hacker 6y agoWhile WebM usually contains VP8 or VP9, it isn't impossible to throw an h264 stream in there
- microcolonel 6y agoWebM is Matroška, and it can contain H.264 as far as I'm aware. Not sure precisely what browsers decide to do here, but apparently it's something.
- giantrobot 6y agoWebM is a subset of Matroska, if something is returning h.264 inside a WebM container...that's not conforming to the WebM subset. But I guess nothing matters.
- mgamache 6y agoYou get Nal h264 packets from MediaStream. Note MediaStream only supports h264 baseline on Chrome (you can request other profiles, but that's all you get). Not sure about FireFox. https://en.wikipedia.org/wiki/Network_Abstraction_Layer https://en.wikipedia.org/wiki/Network_Abstraction_Layer