RTMP publishing with same stream name and overriding the older stream

nathvela

Member
I get NetStream.Publish.BadName message from the server when I publish with a stream name that is already existing on the server.
I would like it so that I can overwrite existing streams when I publish with the same name. Is this possible?

Thanks
 

Max

Administrator
Staff member
Good day.
Please clarify your case:
1. Do you publish a stream to WCS from RTMP encoder rtmp://wcs:1935/live/stream?
2. Or do you republish a stream from WCS server to a third party RTMP server?
In both cases, you cannot publish a new stream with the same name until previous stream is stopped.
But, if you want to replace stream content temporary (advertising, for example), you can publish stream with another name, then inject it to original stream. In this case, you don't need to stop the original stream.
Please read the details and known limits here.
 

nathvela

Member
Hi,

Thank you for your reply.

1. I publish direct to wcs from my encoder

Is there a setting to close/stop the previous stream immediately. I am wondering if there is a timeout before it finally detects the old stream is no longer there. Because in my case, even when I stop broadcasting the old stream, sometimes I still get the NetStream.Publish.BadName error meaing it still thinks the old stream is publishing.

And do you have a rest command to stop the stream manually? That could be an option for me.
 

Max

Administrator
Staff member
Is there a setting to close/stop the previous stream immediately. I am wondering if there is a timeout before it finally detects the old stream is no longer there. Because in my case, even when I stop broadcasting the old stream, sometimes I still get the NetStream.Publish.BadName error meaing it still thinks the old stream is publishing.
The stream shoud stop immediately after you sent deleteStream command. Please note that FCUnpublish command is not supported.
And do you have a rest command to stop the stream manually? That could be an option for me.
You can use /stream/find REST query to find stream mediaSessinId, then /stream/terminate to terminate it.
 
Top