Hello,
I am currently working on dynamically adjusting the stream quality based on the network conditions of each client in a MediaSoup application. My goal is to optimize the client experience by altering the bitrate of the media streams in real time, using the setMaxOutgoingBitrate(newBitrate) method on the transport.
Setup Details:
- Transports: I have set up two types of transports for each client:
sendTransportfor handling outgoing streams to the server, andreceiveTransportfor managing streams that are sent from the server to the client. - Bitrate Management: I’m attempting to control the stream’s bitrate by calling
setMaxOutgoingBitrate(newBitrate)on thereceiveTransport, as I understand that this should limit the bitrate of the streams being sent to clients.
Issue:
Despite implementing this, I’ve noticed that changes made via setMaxOutgoingBitrate(newBitrate) are not reflected in the bitrate statistics obtained from producer.getStats()[0].bitrate. The stats do not show any change in the bitrate after adjusting the setMaxOutgoingBitrate.
Questions:
- Is there something I might be overlooking in how
setMaxOutgoingBitrateshould be implemented to effectively control the bitrate? - Should modifications to bitrate settings immediately reflect in
producer.getStats()or is there an expected delay? - Are there additional settings or configurations in MediaSoup that could impact how bitrate adjustments are handled and reported?
I am looking to understand the best practices for dynamically managing stream quality based on real-time network assessments and ensuring these changes are accurately monitored through MediaSoup’s statistics.
Thank you in advance for your insights and assistance!