cv::Mat/Numpy/Kinect over RTMP
Hello,
I have a linux box running rtmplite and i'd like to send cv::Mat/Numpy/Kinect data to my RTMP server.
(https://code.google.com/p/rtmplite/)
This aspect of internet communication seems to have a gap in it's tutorial base. I am able to use a .swf from the VideoIO (https://code.google.com/p/flash-videoio/) project to record and play videos from the server. How do we push Kinect data to the server?
1) Can we push a single image?
2) What method would be suitable for both depth and image frames?
3) Skeleton pionts offer another data source, although a json request may be suitable although they would need to combine together again at some stage on the server side.
Any other solutions available? Js-node? .NET? Rstp?
Regards,
Daniel
librtmp-python
import librtmp import numpy
Create a connection
conn = librtmp.RTMP("rtmp://localhost:1935/myapp/file1", live=false)
Attempt to connect
conn.connect() stream = conn.create_stream()
Read 1024 bytes of data
data = stream.read(1024) print data
Create a connection
conn2 = librtmp.RTMP("rtmp://localhost:1935/myapp/file2.flv", live=True)
Attempt to connect
conn2.connect()
Get a file-like object to access to the stream
stream = conn2.create_stream()
Read 1024 bytes of data
stream.write(numpy.zeros((10,10),numpy.uint8))
The comments have been written as // instead of the usual python hastag, as it formats this comment incorrectly.