-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple clients on server-rpi?? #30
Comments
Multiple listener should be "easily" achivable |
Can you post solution for multiple clients, I´m also looking for that option. |
+1 @131 can you post an example of this, or some more explanation of what you mean? |
@131 |
hi, I'm trying to achive this using another web-socket server implementation (websocket-relay.js). Basically I'm doing this: I'm successfully using server-ffmpeg.js with this configuration: Any idea why? |
@adrhc I'm not sure exactly why what you're doing isn't working, but you might be interested in https://github.com/pimterry/raspivid-stream. I wrote this up as a solution for the original issue here generally for the raspivid case. Like the code in this repo, it creates a stream of frames, but it ensures there's only one video streaming process, and keeps track of the overall stream state it has already seen, to let it create new streams for later consumers, who can then start watching from the current live stream too. Code is here - it works by storing the initial SPS and PPS (configuration) frames sent when the raspivid process first starts streaming, and then keeping track of the latest IDR (full non-diff) frame as the videos plays. Whenever a client joins, that client is sent those original SPS & PPS frames, followed by the latest IDR frame, and then the rest of the stream from wherever it is currently. I'm not sure exactly how that maps to your situation, but it's a good solution for anybody pulling video from raspivid, and hopefully it's helpful! |
@131 Could you post your implementation of multiple listeners? |
Subject says it all ... i've tried to wrap the start_feed function with a bool so as not to start the spawned process a second time but I don't get any output on the second client; the first continues to work fine.
Any ideas?
The text was updated successfully, but these errors were encountered: