开发者

RTMP: check if stream is online with Python

开发者 https://www.devze.com 2023-01-27 02:14 出处:网络
I have several Flash streams and I want to display only active/live/online streams. Can someone provide sample code that can check status of stream? or point out where I can grab it (I think Red5 and

I have several Flash streams and I want to display only active/live/online streams. Can someone provide sample code that can check status of stream? or point out where I can grab it (I think Red5 and RTMPy should have this, but I completely don't have any experience with RTMP; there is also RTMP specifi开发者_StackOverflow中文版cation, but wiki says it is incomplete)? My target language is Python, but code in any language will be helpful.


In case of connection lost or connection fail the code below will print error message.

from twisted.internet import reactor
from rtmpy.client import ClientFactory

reactor.connectTCP('localhost', 1935, ClientFactory())
reactor.run()
0

精彩评论

暂无评论...
验证码 换一张
取 消