Comments (3)
Same problem, and memory usage keep increasing when open multiple browser pages.
from aiortc.
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.
BTW, relay=MediaRelay(). should be global.
from aiortc.
BTW, relay=MediaRelay(). should be global.
Great! that was the solution. Resolution had no impact in my case.
player = MediaPlayer("rtsp://myserver:8554/live.sdp") # <- PLAYER IS UNIQUE
relay = MediaRelay()
async def offer(request):
...
peer_connection = RTCPeerConnection()
...
video = relay.subscribe(player.video)
peer_connection.addTrack(video)
...
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:
Same problem, and memory usage keep increasing when open multiple browser pages.
Will open a new issue for that, this precise problem is solved. Thanks!
from aiortc.
Related Issues (20)
- PlayerStreamTrack init and recv in different event loop HOT 1
- Connection fails if both devices are on seperate networks HOT 7
- 'RTCRtpSender' object has no attribute '_RTCRtpSender__encoder' HOT 3
- First example script doesn't work HOT 2
- cannot stream between two users
- how to disable stun HOT 1
- Using sender.track.stop(); doesn't actually stop the recording or trigger the @track.on("ended") code HOT 4
- SDP Answer Received but Screen Sharing Not Consistent
- aiortc with aiohttp works but not fastapi HOT 2
- Connection error when two browser peers are connected to one python user
- I can't get a client working in Python HOT 3
- Stopping a sender.track, removing sender from pc then stopping transceivers doesn't generate an track.end event HOT 3
- a fast api project that receives audio and video HOT 2
- CustomMediaPlayer that takes multiple files for playing videos sequentially
- CustomMediaPlayer that takes multiple files for playing videos sequentially HOT 1
- Add a track a second time to a peer connection causes the answer to have incorrect group:BUNDLE and a:mid numbers HOT 1
- Adding a second track after closing the first track causes an error HOT 1
- DTLS handshake failed (connection error)
- Differing resolutions from WebRTC stream HOT 5
- three ISSUES: one is only support addtrack,but not support removetrack.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aiortc.