Closed ogencoglu closed 3 years ago
Not that familiar with RTMP. You wan't to stream to a web-browser? This was very recently added to libValkka and it works like a charm: sending fragmented-mp4 via websockets to a browser & everything can be orchestrated from python (updating the docs with more multiprocessing examples in the coming days). If you want to convince me about RTMP, please tell me some use cases & why it is important.
Thank you for the swift reply. I am not familiar with neither RTMP or RTSP and I do not need streaming to a web-browser or GUIs but just streaming and management from multiple cameras that has connection formats of rtmp://your.server.net/app
. Basically, some scalable way to retrieve frames into numpy arrays. Then we will plug our custom object detection, tracking models for various tasks. I guess this is a bit side-track for this project.
One could maybe include this one into libValkka: http://rtmpdump.mplayerhq.hu/librtmp.3.html and subclass a new thread therein "RTMPThread", etc. Your contribution is wellcome. :)
A quick'n'dirty solution might be using this: https://pythonhosted.org/python-librtmp/, then putting it into python multiprocess & then chain it's output to another multiprocess that is running ffmpeg.
Another quick (but slightly less dirty) solution would be to create two asyncio tasks: one using that python library to read the packets & putting the into asyncio.Queue and another asyncio task reading that queue and feeding them to ffmpeg.
Good luck! :)
If you want to contract dasys for consulting, please contact me at support@dasys.fi
Cheers! I will close this for now.
Moi,
Thanks for this work. Not necessarily an issue but is there any plans to support RTMP protocol? Or any pointers to libraries with similar functionalities in python for RTMP?