Billy,
Mentions 2 techniques for finding out who is watching a given
broadcast. I can think of a couple of places where the information can
be found:
As Billy stated:
1) You can review the access logs to see which broadcast URLs were
watched, and when they were watched, to get a count.
2) You can use the admin protocol to get the list of all users
currently watching URLs on the server and search for the broadcasts
urls. This is how the web admin works to show the list of users.
From a web browser the request used by the webadmin looks like this:
http://127.0.0.1:554/modules/admin/server/qtssSvrClientSessions/*/
*?command=get+filter1=qtssCliSesPresentationURL+filter2=QTSSReflectorMod
uleBroadcasterSession+filter3=qtssCliSesRTPBytesSent+filter4=qtssCliSesT
imeConnectedinMsec+filter5=qtssCliSesCurrentBitRate+filter6=qtssCliRTSPS
essRemoteAddrStr+filter7=qtssCliSesPacketLossPercent+filter8=QTSSRelayMo
duleIsRelaySession
Two sessions are returned in this case. The first session id /1/
contains a value for QTSSReflectorModuleBroadcasterSession which means
this session is the broadcaster itself. The second session found with
ID /3/ is a client session. The QTSSRelayModuleIsRelaySession is
requested so that it can be used to identify if the session is a relay
session so that those sessions can be removed from the client list.
The result looks like the following. A 404 means the URL wasn't found
which would in this case mean there is no-one connected.
Container="/admin/server/qtssSvrClientSessions/1/"
qtssCliSesPresentationURL="/mystream.sdp"
QTSSReflectorModuleBroadcasterSession="00A14970"
qtssCliSesRTPBytesSent="0"
qtssCliSesTimeConnectedinMsec="883405"
qtssCliSesCurrentBitRate="0"
qtssCliRTSPSessRemoteAddrStr="127.0.0.1"
qtssCliSesPacketLossPercent="0.000000"
QTSSRelayModuleIsRelaySession=(null)
Container="/admin/server/qtssSvrClientSessions/3/"
qtssCliSesPresentationURL="/mystream.sdp"
QTSSReflectorModuleBroadcasterSession=(null)
qtssCliSesRTPBytesSent="70689"
qtssCliSesTimeConnectedinMsec="57621"
qtssCliSesCurrentBitRate="8764"
qtssCliRTSPSessRemoteAddrStr="127.0.0.1"
qtssCliSesPacketLossPercent="0.000000"
QTSSRelayModuleIsRelaySession=(null)
error:(0)
You can also
3) Look at the broadcaster UI and see the # Users count (FYI: I believe
it has a bug as it never drops back to 0 after it goes up). This is
from RTCP receiver report packets sent back to the broadcaster.
4) You can add code to the Reflector Module source file
ReflectorSession.cpp. The methods ReflectorSession::AddOutput and
ReflectorSession::RemoveOutput add and subtract the number of watching
clients (IncEyeCount and DecEyeCount). Or you can put some code in
ReflectorStream::SendReceiverReport to log the count each time the
routines is called (every 5 seconds).
On Monday, February 24, 2003, at 05:40 PM, Billy Brown wrote:
> On Monday, February 24, 2003, at 04:24 PM, engineermike wrote:
>> Hi folks,
>> I need to find out a way to log the number of listeners we have on
>> our QT6 stream. The more information the better. We are using the
>> Broadcaster to encode and DSS for the server. Any help would be
>> greatly
>> appreciated.
>
> One more thing... Using the Streaming Admin Protocol approach would
> give you the real-time # of connected users, but it wouldn't actually
> log anything. Instead, if you wanted to actually log the users (as in
> having their rtsp requests logged and written out to a file) for later
> analysis, then simply enable "Access Log" in the streaming admin (by
> first logging on to the Streaming Web Admin via
> http://qtss.ip.addr:1220) and then look in the access logging
> directory:
>
> /Library/QuickTimeStreaming/Logs/
>
> (or on other Darwin Unix platforms, it is /var/streaming/logs/)
>
> Note that the access log is not updated for the currently connected
> users UNTIL they have disconnected (ie. closed their streaming
> window), or else they tear-down their connection or timeout.
>
> In other words, you can't use the access log to view in real-time the
> currently connected users - while they are still connected. Instead,
> the access log only logs the RTSP connection after the user has
> disconnected. This is because the # of packets served, and length of
> time connected are included in the log access... and neither of these
> would be known UNTIL the user had fully disconnected/terminated their
> connection.
>
> If instead you need real-time access to the number of connected users,
> then by all means use either the Streaming Web Admin (via port 1220),
> or else use the lower-level streaming admin protocol, which is
> discussed in the QTSS developer API documentation.
>
> --
> Billy Brown
> _______________________________________________
> streaming-server-users mailing list |
> email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/streaming-server-users
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
streaming-server-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/streaming-server-users
Do not post admin requests to the list. They will be ignored.