aiortc: High memory usage

Hi, I’ve noticed some very high memory usage by this library, possibly a memory leak.

Whenever I stream anything to my receiver peer, my RAM usage linearly goes up until it overflows and my PC slows down to the point of having to reboot. The rate at which the usage increases seems to depend on the input file I decide to stream. I’ve also noticed that (strangely enough) the memory usage seems higher when sending only audio and no video.

I have also tried to add an event listener for receiving remote tracks, in case I need to discard them using the MediaBlackhole, but it never gets called, so no tracks to handle.

Codecs: opus & H264

I don’t know what other data might be relevant for troubleshooting this issue, so please comment in case I should send anything.

Thanks in advance

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 22

Most upvoted comments

I had the same problem when I tried to pass the MediaRelay instead of the original MediaStream to the MediaRecorder

@enard-dbzr We have a similar problem. Did you find a solution to this issue?

I had the same problem when I tried to pass the MediaRelay instead of the original MediaStream to the MediaRecorder