by EvanDotPro · 11y ago · 0 comments
I'm extremely curious, has Paperspace actually developed an entirely new video codec, encoder, and efficient JS decoder for this?
I'm a little confused by the statements so far (and the comments are flowing in, so apologies if this was addressed while I was typing): "we are using a video stream", "using a JS renderer", "building a streaming protocol", "using GPU tech originally developed for video game streaming", "a remote desktop protocol that could stream HD video"
So, is just the streaming protocol you've developed and not the codec? In my expiriments, simply pushing out h264 NAL units over websockets and passing them to the decoder was a pretty solid start. Add a tiny layer of buffering over that and I imagine it'd be fairly stable. Ultimately, I backed away from h264 for licensing and performance issues.
Also, what's the transport into the browser? Websockets? WebRTC data channels? Have you encountered performance issues with Firefox not being able to handle websockets or data channels in web workers? (Which is seemingly coming in FF37.)
Usually you want a "reliable" transport (tcp) for handshake, some transfer, etc and then you can get away with a more fire-and-forget (udp) stream for everything else. We broker different connections for different scenarios. The web version is naturally limited to either webrtc or websockets but for the paperweight it didn't make sense to force a web paradigm (or full webbrowser just to access limited socket types) so we interface directly with the hardware.
Haven't encountered big problems with firefox, but browser inconsistencies are definitely something we spend a lot of time working through
Of course it has some drawbacks, as MPEG1 is a pretty old codec. The data rate is fairly high and it struggles with high resolution streams. 720p still decodes nicely in realtime on most mobile devices, though.
The performance issues with using Broadway.js were more "general", in that the experience varied wildly, from amazing to unusable depending on the browser/device/etc)... Not necessarily related to Websockets + Webworkers.
The Websocket issue on the other hand, was for a more recent experiment where I was playing with the idea of bridging NoVNC over WebRTC data channels.
It's not so much a performance "issue" as much as a "possible area for optimization"... Though, every time I'm playing with noVNC or Broadway.js in a FF tab on my i7 laptop, it pretty much renders FF pretty laggy in all other tabs. I imagine offloading as much of the processing to workers as possible would be the best approach to lessen the effect — though, I'm not much of a frontend / JS dev.
Here's the noVNC issue: https://github.com/kanaka/noVNC/issues/114 And the bugzilla for FF: https://bugzilla.mozilla.org/show_bug.cgi?id=504553