Wowza Community

How to disconnect the connection between nginx rtmp websocket and camera automatically when camera do not stream anything and how to assign this websocket to another camera?

We are not able to stream multiple Pi cameras with different raspberry pi 3 on rtmps server. We are not able to detach camera web socket when it’s not in use(When camera streaming is closed). We want to assign this available web socket to another camera which is to make a new connection request for streaming upon web server.

Can you provide more detail @Nikhil Bhardwaj?

Are you trying to override the RTMP connection because the stream is sending dead air? Where is the disconnect taking place - on the encoder or are you expecting WSE to stop the stream?

Thank you.

@Rose Power Thanks for your reply. We want to publish multiple camera stream on nginx rtmp server with default socket 1935 at the same time. We are able to publish only one camera stream successfully.Can you help us? we are quiet new in this nginx rtmp server.

When i stream two cameras to nginx server using rtmp module at same time one of the camera not working and shows the error:-

{error} RTMP_ReadPacket, failed to read RTMP packet headersq= 0B f=0/0 rtmp://ip/cam/live: Invalid data found when processing input…

:- I always reload /usr/local/nginx/sbin/nginx file when start and stop camera with below cmd:-

sudo /usr/local/nginx/sbin/nginx -s reload

I cannot @Nikhil Bhardwaj only because I am not that familiar with that workflow, but the engineers say they can help you. For that though, you will need to submit a support ticket and they will review your config and run tests.

https://www.wowza.com/support/open-ticket

I’ll be sure to follow your support ticket and update this post.