Wowza Community

What is the meaning of StreamId parameter in RTMP header and what Wowza puts there?

Greetings, folks!

Sorry for a kind of a newbie question, I am just starting with Wowza.

In wiki article on RTMP http://en.wikipedia.org/wiki/Real_Time_Messaging_Protocol one can find the description of RTMP header. One of the params found inside is StreamId. StreamId is described as

The 6 least significant bits that form the Stream ID can take values between 3 and 65599. Some values have special meaning like 1 that stands for an extended ID format, in which case there will be 2 bytes following that. A value of 2 is for low level messages such as Ping and Set Client Bandwidth.

Open-source RTMP client FLAZR also uses this parameter (under the name of ‘channelId’), and from its sources looks like all RTMP messages to be decoded by RtmpDecoder class should be split by streamId and processed differently.

A question is : what is streamId?

It is not the classical streamId (or better say ‘streamName’), used by Wowza server. Its just a single integer.

I check this param while running my RTMP client, and looks like its value is always between 0 and 7.

May be, this is some index of audio or video packets sent? But why so many channels available? Do Wowza really sends audio and video data in different RTMP messages? Or, may be, this is an index of streams current client is subscribed to?

And, finally, what do Wowza put there?

The StreamID in the Wowza logs is just an identifier for that stream that will be unique within those logs. For an RTMP connections there can be many NetStreams, for example in a chat application.

Richard