Restreaming video from IP camera programatically

Hi,

I am newbie here. What i am trying to do is to restream video from ip camera. I followed the steps mentioned in this url(https://www.wowza.com/docs/how-to-re-stream-video-from-an-ip-camera-rtsp-rtp-re-streaming) and as mentioned i am able to restream using .stream file.

What i am looking for is to programmatically do the same?

My scenario is like this, i have a web application which maps camera and its rtsp url to a database. Some thing like

cam1->rtsp://xx.xxx.xxxxx/xxx

cam2->rtsp://xx.xxx.xxxxx/xxx

and my client players use camera name(cam1, cam2) as an alias to actual stream. So what i want is, when a client request for a stream with alias name i want to fetch corresponding rtsp url from database and start the stream.

I followed the steps mentioned in this link(https://www.wowza.com/docs/how-to-use-the-imediastreamnamealiasprovider2-interface) overriding all resolve*() methods returning rtsp url corresponding to alias name. But streams never got published and played.

Can you guys please guide me on how to do this?

Regards,

Sujil

Sujil,

You also need to start the streams, either in StartUpStreams.xml, or you can use the MediaCaster API in the IMediaStreamNameAliasProvider2.resolvePlayAlias() methods.

Richard

Sujil,

The MediaCaster type you want to use is “rtp”. You can also use “rtp-record” to also record the whole stream. Other MediaCaster types (but that are not relevant to you in this case) are shoutcast and liverepeater.

Richard

Richard,

I tried to use MediaCaster API in IMediaStreamNameAliasProvider2.resolvePlayAlias() methods. While debugging i got below error

ERROR server comment - MediaCasterStreamMap.acquire: Can’t find MediaCaster definition for stream type: live

Can you please let me know how to resolve this error?

Regards,

Sujil C

Changing MediaCaster type to rtp worked.

Thanks a lot.

Thanks Richard.

Changing MediaCasterType to rtp worked.