> Hello Andrei!
>
> Nice work with C++ RTMP Server. I have a couple of questions for you:
>
> 1) I would like to know if there is a way to retrieve the number of
> connected users to a stream. Is there a function for that? Or do you
> have any idea how to achieve that?
The API is there. You can get stats about protocols/streams using BaseProtocol::GetStackStats and BaseStream::GetStats. But there is no ready-for use app for doing that. However, is relatively simple to do so
> 2) Can the server do dynamic streaming (I'm referring to dynamic
> streaming where the server switches to a higher/lower quality stream -
> without changing the source in client player)?
Again, not out of the box. However, I have few commercial applications doing just that. One example is an application pulling in a apple stream (multiple bandwidth stream) and serve it via RTMP or RTSP
Cheers,
Andrei
>
> Thank you very much,
> Andrei.
>
> You received this message because you are subscribed to "C++ RTMP Server" mailing list.
> To post to this group, send email to c-rtmp...@googlegroups.com
> To unsubscribe from this group, send email to
> c-rtmp-serve...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/c-rtmp-server?hl=en
------
Eugen-Andrei Gavriloaie
Web: http://www.rtmpd.com
> I took a look at php-rtmp-client, and I have to say, it looks like a
> rather lousy attempt at implementing RTMP. The handshake is lacking,
> which won't even allow it to connect to c++ rtmp server.
You are right on this one. However, is not the project's fault. Is the Adobe who is hurting (rather than helping) the open-source community by releasing that "dust-in-the-eye" kind of rtmp specs. That doc is the work of a sunday-drunk Adobe employe in a rainy monday morning with a 6 foot tall boss shouting at him. Unfortunately is affecting more and more projects. That's sad! In Adobe's shoes, I would be extremely embarrassed!
> If you zero
> out the version number in the handshake, so c++ rtmp server doesn't do
> any validation, you get further,
You can deactivate the handshake validation completely via config file. Just put validateHandshake=false in appselector section or directly in your target app section of you don't use appselector
> but I still failed to make a rpc call
> (client just hangs).
It hangs because is expecting a result from the server. I saw that as well. Just returning true from the server won't do the trick. You have to actually send the response back to the client even if it is void so it will know that the server completed operation. Is quite natural. See my post here:
http://code.google.com/p/php-rtmp-client/issues/detail?id=5#c9
>
> How they (claim to) manage to connect to red5 is a mystery to me - it
> must be more fault tolerant?
That I have no clue. Never tested it.
Bottom line,
IMHO is a good library that just needs some patching here and there. I would use in production after patching it. It does a good job. However, patching it is not a walk in the park and requires average-advanced knowledge about RTMP. Which is exactly why is looking unusable at the first glance
Cheers,
Andrei
>
> Michael
>
> On Jan 12, 9:13 pm, Kirik <kirill.kuznets...@gmail.com> wrote:
>>> Tried to put in action what you suggested by using php-rtmp-client to
>>> connect to the rtmp server. The code I used is this:
>>
>>> require "RtmpClient.class.php";
>>> require "debug.php";
>>> $client = new RtmpClient();
>>> $client->connect("192.168.1.201","brvlive");
>>> $result = $client->call("BaseProtocol::GetStackStatus");
>>> var_dump($result);
>>
>> Hi there!
>> You can't just call BaseProtocol::GetStackStatus via RTMP call,
>> because RTMPD server does not handle this action by default.
>> You have to define action for this call in your RTMPD application. To
>> do this you can overwrite RTMPAppProtocolHandler::ProcessInvokeGeneric
>> method in your application's rtmpappprotocolhandler.cpp file.
>>
>> Take care!
>> KiriK
>
Try to actually write an implementation from that spec and you won't
get very far. Completeness needs maybe 100-200 more pages, plus many
more for the variations (RTMPT, RTMPS, RTMPE, etc). I agree with
Andrei that its quality (or lack thereof) is hurting the community.
I have found Andrei's implementation does an extremely good job in
mimicking the behavior from both FMS and the Flash player. I would use
his source code as a canonical reference. Red5's is pretty good too.
Josh
> Can you please post the php code you are using?
>
> Right now I have applied the patch and I get the same error you
> reported before the patch.
>
> Thanks,
> Simon
>
> On Jan 17, 4:29 pm, "webdev.andrei" <webdev.and...@gmail.com> wrote:
>> Andrei,
>>
>> Thank you very much for your help. Wonderful. I applied the patch and
>> played a little bit with it. It sends me lot of info which is good but
>> this also needs some clarifications. So I have some questions...
>> 1) Will this patch get into the mainline? I'm asking because I intend
>> to keep the server up to date so when I'll checkout the code I would
>> like to have this patch also.
Unfortunately no. This is not going to be pushed into the main line because is too specific. The information provided is quite complete (extreme actually). That was just an example of a complete output that the server can produce. You have to make it more light. For example, instead of getting the whole list of connections, is just better o get the count of them directly, assuming that the count is what you are interested in. Same goes for the streams: Instead of getting info about the carrier connection, you should get the info about the streams if that is what interests you. Bottom line, get what you want, not all of it
>> 2) Can you explain a bit what is in the second child of the stack for
>> a info item; because it has a lot of info? I guess the most important
>> is the streams property?
Each element in the stack is a protocol from that particular stack. All of them have a fixed structure. On top of that fixed structure there is a variable structure, depending on the type of the protocol. What you see is probably the detailed info about a RTMP protocol
>> 3) Among all those info items I've noticed a node that in the streams
>> property contains a outStreamsUniqueIds property which contains the
>> ids of other streams. Is it correct to count the number items in
>> outStreamsUniqueIds to get the number of users connected?
Yes, that is correct. that is the number of consumers for that particular stream. Needless to say, if you only want that, is a total waste of resources to get this whole info just to extract that. You should design a special call for that for extracting that info and only that info.
>> What are the
>> types INR and ONR4R standing for?
For streams types, the convention is at follows:
1. First letter designates the direction:
I - inbound (data is published into the server)
O - outbound (data is going away from the server. Player doing playback)
N - neutral (the stream is not yet inbound or outbound. The resources were allocated for it, but is not yet decided what it will be used for)
2. Second letter is the kind of the stream:
F - file
N - network
3. Rest of the letters are arbitrary and used to further describe the protocol. It has some logic in it, but you should not relay on them having a special meaning
Example:
INR - Inbound Network RTMP (someone publish a stream)
ONR4R - Outbound Network RTMP for an inbound RTMP stream
ONR4TS - Outbound Network RTMP for an inbound TS Stream
NR - neutral RTMP stream
>> 4) outStreamsUniqueIds & inStreamsUniqueIds tells us who with who is
>> connected. Is this correct?
Yes
>> 5) The last info item is also a bit different. Is it Ok to ignore it?
>> What is it for?
Don't remember the output. Can you paste it on pastebin.com?
>>
>> Once again I want to thank you for your wonderful help and for your
>> fast reply to requests. Hope these questions are not putting to much
>> on you.
You are welcome
>>
>> Andrei Ionescu.http://www.flexer.info
>>
>> On Jan 14, 8:57 pm, C++ RTMP Server <crtmpser...@gmail.com> wrote:
>>
Cheers,
Andrei
is this all is needed to get the total number of outgoing connections
, using php?
Is there any php library to be used beside ?
Cheers
Anis Nielsen
> You received this message because you are subscribed to "C++ RTMP Server"
> mailing list.
> To post to this group, send email to c-rtmp...@googlegroups.com
> To unsubscribe from this group, send email to
> c-rtmp-serve...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/c-rtmp-server?hl=en
>
--
Sent from my mobile device
You received this message because you are subscribed to "C++ RTMP Server" mailing list.
To post to this group, send email to c-rtmp...@googlegroups.com
To unsubscribe from this group, send email to
c-rtmp-serve...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/c-rtmp-server?hl=en