Ignore audio signal from client

277 views
Skip to first unread message

christop...@gmail.com

unread,
Jul 14, 2021, 9:17:54 PM7/14/21
to MonaServer
Hi, 
I am currently using an ip camera to send an RTMP stream to MonaServer. The application that I use to read the stream only reads the video signal coming from the camera feed, which I believe is the reason why I get a 'Subsription.cpp[250] Audio timeout, insufficient bandthwith to play' error. 
Since I cannot mute the camera, I would like to know how I can ignore the audio signal on the server side. Can this be done in the config .ini file? or do I need to change the source code and build from scratch. 
I am currently using the prebuilt windows binaries for MonaServer2.

MonaServer

unread,
Jul 15, 2021, 1:42:29 AM7/15/21
to MonaServer
Hi Christopher

It's nice to meet you

It's strange that you get this audio timeout, maybe you have find a bug in our congestion control. Can you tell us more on how you publish to MonaServer?

On the publisher side there can be a way to send video only, it depends on the application you're using.
On the player side you can ignore the audio signal with a simple query argument (audio=false), here is an example with an rtmp link :

Regards

Thomas

christop...@gmail.com

unread,
Jul 15, 2021, 2:27:36 AM7/15/21
to MonaServer
Hi Thomas,

Thank you for the quick reply.
I will try and add the query argument and get back to you!

In the meantime, let me go more in depth regarding the issue.

I am currently sending a live video feed to the MonaServer using a GoPro Hero 9 black camera through its RTMP streaming feature.

I then use OBS to monitor the stream and python-OpenCV to read and apply some other functions to the images before saving them.

The OBS client never crashes and works as intended, the Python client however always seem to crash due to this audio congestion.
An interesting thing I discovered, is that depending on the time I wait between reading frames from the stream, the time before audio congestion changes.

For example, waiting 0.03 seconds between reading frames causes the error to appear after 1-2 minutes and waiting 0.0001 seconds keeps the program running for 1-1.5 hours.

I hope this information is useful to you.

Kind regards 
Christopher

christop...@gmail.com

unread,
Jul 15, 2021, 9:52:42 PM7/15/21
to MonaServer
I applied the query to my rtmp stream link in OBS like so: rtmp://my.ip.address:1935?audio=false

However, I get the following error: 'MonaServer.cpp[154] Application /audio=false doesn't exist'.

I would be very grateful if you could clarify if I am doing this correctly or not.

I would be happy to hear any other ideas you might have regarding stopping the client from writing audio to the server.

Kind regards
Christopher

Thomas Jammet

unread,
Jul 16, 2021, 3:19:47 AM7/16/21
to MonaServer
Thanks for the details, it looks like your script is feeding the congestion, I suggest to not wait before reading data otherwise it will always reproduce the issue.

There is a quick solution that you could try, it's to increase the socket buffer size in MonaServer configuration, but this will only hide the problem for a while :
To use it you can create or modify the .ini file of MonaServer and increase the value of the bufferSize :
[RTMP]
; bufferSize, base parameters for recvBufferSize and sendBufferSize
bufferSize=2097120

Note that for all protocols the parameters recvBufferSize and sendBufferSize override the bufferSize parameter so you can remove them if they are defined.

For the query string ?audio=false it must be set after the stream name, for example if your stream is called "test" it will be test?audio=false.

I hope this will help you

Regards

Thomas
Reply all
Reply to author
Forward
0 new messages