steveseguin / vdo.ninja

VDO.Ninja is a powerful tool that lets you bring remote video feeds into OBS or other studio software via WebRTC.
https://vdo.ninja
Other
2.73k stars 750 forks source link

Feature request : get director stream from FFMPEG or RTMP #929

Open DeeJayMX opened 2 years ago

DeeJayMX commented 2 years ago

Is there a possibility that the director stream come from an FFMPEG encoder or an RTMP stream ?

steveseguin commented 2 years ago

The easiest way is to have the director share an embedded video as a website-share with the guests, such as a Twitch stream. So, you can publish to Twitch via RTMP, then share that video output with the guests as a Director. With RTMP, you'll likely be facing some latency though-- normally a second or two minimum.

Any video service that supports embeddable video players will work though, and some support sub-second. There's plenty, but not too many that I know of that have FFMPEG + low-latency support together.

For more advanced users, you can also do it directly with the Raspberry Ninja codebase: https://github.com/steveseguin/raspberry_ninja
Raspberry Ninja can currently run on a Linux system or Raspberry Pi, which can be modified to accept FFMPEG / RTMP stream pipes, and you can forward that to the guests.

Note though, RTMP ingestion needs special care given that the browser often doesn't support AAC-audio, but rather OPUS/Vorbis instead. You'll still want to ideally transcode the audio before publishing and ensure a compatible h264 profile is used.. Keyframe rates need to be set at around every 60 frames or so as well, to handle packet loss issues. In other words, it's tricky.

I might support FFMPEG / direct OBS by end of year, and I might support RTMP into meshcast.io by end of year as well. It's a large task for me though, but it's feasible.