devangbhagdev / rtmplite

Automatically exported from code.google.com/p/rtmplite
0 stars 0 forks source link

NetStream.Play.StreamNotFound #61

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
NetStream.Play.StreamNotFound never returned even putting a 
NetStream.Play.Start returns invalid id does not play anything but since that 
id does not publish and there is nothing saved.

Regards.

Original issue reported on code.google.com by predut_a...@hotmail.com on 19 Oct 2011 at 8:20

GoogleCodeExporter commented 8 years ago
Hey,
Can you describe the test case you have for me to repeat the test?
Also which file: rtmp.py, siprtmp.py or siprtmp_gevent.py, and which SVN 
revision?

Original comment by kundan10 on 19 Oct 2011 at 6:31

GoogleCodeExporter commented 8 years ago
With rtmp.py and have published the test user and opened another window and I 
have reproduced the test2 user (the user did not publish)NetStream.Play.Start 
returns, but it would be right back NetStream.Play.StreamNotFound. 
(rtmplite-7.5.tgz).

I wanted to ask another question on this server performance, how many 
connections can work properly simultateas this server ?

Regards.

Original comment by predut_a...@hotmail.com on 20 Oct 2011 at 7:59

GoogleCodeExporter commented 8 years ago
Hey,
Not sure if I understood the bug correctly.
1) Open testClient.html on one browser tab. Connect and publish to rtmp.py say 
as stream name "user1".
2) Open testClient.html on another browser tab. Connect and play stream name 
"user2". If user2 is not being published, rtmp.py still sends 
NetStream.Play.Start. I think this is fine because it will assume it to be a 
real-time stream instead of recorded one.
3) In (2) if you use NetStream's play with start time as 0, then it will return 
NetStream.Play.StreamNotFound because it will assume a recorded stream if start 
time is >= 0. 
As per NetStream's play() documentation "The start time, in seconds. Allowed 
values are -2, -1, 0, or a positive number. The default value is -2, which 
looks for a live stream, then a recorded stream, and if it finds neither, opens 
a live stream. If -1, plays only a live stream. If 0 or a positive number, 
plays a recorded stream, beginning start seconds in."

Please let me know if it is not behaving as above? Thanks

Original comment by kundan10 on 21 Oct 2011 at 7:20

GoogleCodeExporter commented 8 years ago
I attached a picture. In the first tab NetStream: user1 public and in the other 
tab NetStream play user2, but user2 does not exist.(no file user2.flv and not 
stream user2). In my opinion I think it would have to return an error.

I'm new to python and I would like to know if you could make a small manual 
creation of applications. I'd also like to know about the performance of 
maximum concurrent connections this server? I am very interested in your 
project as it looks good.

Regards.

Original comment by predut_a...@hotmail.com on 21 Oct 2011 at 8:27

Attachments:

GoogleCodeExporter commented 8 years ago
Hey,
Thanks for the kind words.

I believe Play.Start is fine in this case as rtmplite will consider stream 
named user2 as real-time stream and assume it is started. When a publisher 
joins for such an stream the server is supposed to send 
NetStream.Play.PublishNotify, but the rtmplite server doesn't send that. 
Perhaps you can modify it to send that message. 

I do not have an detail developer guide for writing applications, but there is 
a simple application example in the initial file comments in rtmp.py 
http://code.google.com/p/rtmplite/source/browse/trunk/rtmp.py which can serve 
as a starting point. Any of the methods of "App" class can be overridden. The 
only care to take is that if you need any blocking operation (such as multitask 
tasks/generators) then you need to use multitask framework in rtmp.py but not 
in gevent version (i.e., siprtmp_gevent.py).

For performance numbers, I had done some measurement sometime ago and the last 
table reported in 
http://p2p-sip.blogspot.com/2011/04/performance-of-siprtmp-multitask-vs.html 
gives the rough idea about the CPU usage, which can be used to calculate number 
of concurrent publishers and players in your case based on your machine's CPU. 

For further questions not related to this bug, please send an email to 
kundan10@gmail.com or the mailing group for support listed on the project page. 

Thanks

Original comment by kundan10 on 27 Oct 2011 at 2:49