I'm trying to develop a module with a simple functionality, it consists in save bandwidth, at a first moment the server don't start any stream, when a client request an stream the server starts the streaming and the first and the following clients can connect to it. Finally when all the clients are disconnected the stream should stop automatically.
If all the playback clients are Flash RTMP players, you can do this very easily by changing the Application.xml /StreamType from "live" to "rtp-live". You have to do this in a text editor, it is not supported in the Manager. There are security implications in this configuration, however: anyone with a Flash client can start a MediaCaster stream on your server. So you have to use the security aspect of
StreamNameAlias in this case, to limit what can be re-streamed.
There just isn't a built-in or practical way to do this. Wowza has to packetize live streams as they come in, and there has to be 3 packets at least ready for the player to start playing. If HTTP clients are involved, use StreamType "live" and start the IP camera stream with the MediaCaster system (StartUpStreams, for example)