Reputation: 183
I'm looking for a proper RTMP python client or Python code example that could do at least the following:
I've been investigating RTMPy, rtmplite, fmspy libraries, but haven't gotten anything to work yet. The AMF0 encoding capabilities from rtmplite seem good, though.
Can anyone point me in the right direction?
Upvotes: 9
Views: 16563
Reputation: 1
try this:
import librtmp
conn=librtmp.RTMP(url)
conn.connect(None)
conn_stream=conn.create_stream(0,True)
for more information you can visit https://pypi.python.org/pypi/python-librtmp/0.2.0
Upvotes: 0
Reputation: 183
A minor update on this ... I've found a lib that might solve the problem: rtmp-python. rtmplite has been used as a Flash server for testing purposes...
from rtmp_python.rtmp_protocol import RtmpClient
cl = RtmpClient(ip="127.0.0.1", port=1935, tc_url='rtmp://localhost/myapp', page_url='', swf_url='', app='myapp')
cl.connect([])
cl.call(proc_name='createStream')
cl.call(proc_name='play', parameters=['user1'])
cl.handle_messages()
From the logs I saw that connection had established successfully, "createStream" call worked as well, but "play" didn't... TBC
Upvotes: 1