Streampunk / grandiose

Node.JS native bindings to Newtek NDI(tm).
Apache License 2.0
189 stars 48 forks source link

Playback/Render received video/audio streams #1

Closed adshrc closed 5 years ago

adshrc commented 5 years ago

Hi,

i was wondering, if there is a (best practice) way to playback the received audio and video streams. We are building an indoor livestream system, which will be NDI based. The idea was, to build a webapp (Angular,...) and use this as dependency to play the stream.

Thanks in advance!

sparkpunkd commented 5 years ago

I don't think that grandiose is going to work with a webapp for your use case for two reasons:

Grandiose, a prototype, was written to demonstrate access to uncompressed data from NDI streams in server-side Node.JS applications. For a webapp, you probably need to consider using compressed streams?

Best wishes for your project.

adshrc commented 5 years ago

Thanks for replying.

rtsp/rtmp would be an easy solution for this problem, but the delay is inacceptable. We expect a max. delay of 500-700ms, our cameras have ~3000ms delay in rtsp mode. Maybe an NDI/RTSP hybrid would be the best solution.

Thanks!

sparkpunkd commented 5 years ago

If you are using grandiose in a backend server, you are correct that it will install fine and mDNS does work (as well as mDNS ever works - watch out for subnets!). As you say, you can (should?) use static addresses.

Then my concern is that in a webapp, how are you going to get the uncompressed picture data (RGBA) that grandiose would give you to a browser? Sending uncompressed RGB data is pretty heavy on the network.

RTSP/RTMP is an approach ... you could probably work out a way of using FFmpeg as an NDI to RTMP sender. Another alternative is webRTC. A quick Google search suggest some NDI to webRTC gateways are available.