-
Notifications
You must be signed in to change notification settings - Fork 730
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
How to stream video? #1089
Comments
Same problem, and memory usage keep increasing when open multiple browser pages. |
Fixed by resize frame size from 19201080 to 640480. Looks like this is not MediaRelay's issue, but cpu's issue. Because is not running on GPU on my macbook for rtsp h.264 video. When I rendering multiple 1920*1080 video, my macbook is hot, cpu usage is closed to 100%. When I compress the video, all clients are rendering without loosing frame. |
Great! that was the solution. Resolution had no impact in my case.
Just FYI, if you want to see the frame interleaving, create a video with numbered frames. In two browsers, you will clearly see one playing only odds and the other, evens. But now, I have a second problem: the same MEMORY LEAK you've observed:
Will open a new issue for that, this precise problem is solved. Thanks! |
Using the webcam example, I can stream a single RTSP video from a server, to multiple clients in browsers:
However, this has an issue: since my video has 1920x1080, it consumes a lot of memory (two connections: 440Mb RAM). This is clear, since each MediaPlayer makes an additional connection for each peer.
An obvious option would be to use a single MediaPlayer for all peers:
This seems fine (three connections: 300Mb). However, there is a big problem here: the application interleaves frames to browser clients (if there are two opened browsers, client 1 gets frames 1,3,5,7... and client 2 gets frames 2,4,6,8...)!
Using a single player, how can I stream all frames to all clients? Can someone please provide an example (or tell me how to override
recv()
so that each frame is delivered to all browsers)?Thanks and keep it up!
The text was updated successfully, but these errors were encountered: