Wowza Community

Restreaming video from IP camera programatically


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( 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



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( 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?




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



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.



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?


Sujil C

Changing MediaCaster type to rtp worked.

Thanks a lot.

Thanks Richard.

Changing MediaCasterType to rtp worked.