stop publishing to rtmp using rest call

Gabriel T

Member
Hello

all is in the question: is there a rest call to use to stop publishing to rtmp ?
situation is as follow: all published streams are sent to a wowza server, as i perform recording actions on this server. problem is when i stop recording, if streams are still published to wowza, recorded files are truncated and thus cant be played. So i would need to stop publishing to rtmp before my scripts try to download recordings from wowza...this action should on a per instance base (that is, a call saying "stop rtmp publishing to instance X)

thanks
 

Gabriel T

Member
ok found it in the docs (guess its push/terminate)

problem is a push/find_all returns nothing, while the stream is published...any idea ?
 

Gabriel T

Member
same story, if i retrieve all mediaSessionId's, and then make a call to push/terminate with body
{"mediaSessionId": "718763d1-e3ba-11e7-9849-55fa87d274a8"}
got a 404 error:

{
"timestamp": 1513577623990,
"status": 404,
"error": "Not Found",
"exception": "com.flashphoner.server.manager.controller.exception.NotFoundException",
"message": "Not found transponder",
"path": "/rest-api/push/terminate"
}
 

Max

Administrator
Staff member
stop publishing to rtmp
How streams are published and sent to Wowza?
rest-api/push/terminate would be applicable if a stream published on WCS is pushed (rest-api/push/startup) to Wowza (i.e., there are two streams – one on WCS and one on Wowza): stream on Wowza will be terminated on the 'terminate' request.
 

Gabriel T

Member
the rtmpurl is defined in my publishing script:

_room.publish({
display: document.getElementById("myVideo"),
constraints: constraints,
record: false,
receiveVideo: false,
receiveAudio: false,
rtmpUrl: 'rtmp://xxx.xxx.com/wcs/'+_roomID
}).

so if i understand clear, i should not specify rtmpurl here, but instead wait for the published event to be fired after publish and then issue the push/startup so the streamis published to wowza ?
 

Gabriel T

Member
push/startup is not working...with the command i'm using (rtmp withing pubklish command) its al good..when doing it with push/startup, answer is 415, unsupported media type...
 

Max

Administrator
Staff member
wait for the published event to be fired after publish and then issue the push/startup
Yes, if it is required to terminate republishing as RTMP without terminating the participant's stream.

push/startup, answer is 415, unsupported media type
What is the participant's stream - WebRTC, RTMP? How push/startup was called?
Code:
http:/wcs:9091/rest-api/push/startup
{
  "streamName": "room-6d902f-a-813b",
  "rtmpUrl": "rtmp://wowza:1935/live"
}
 
Top