I'm developing a python program to receive a live streaming video from android device via RTMP. I created a server and also I'm capable of transmitting a videoStream from android device. But the problem is I can't access that stream in opencv. Can anyone tell me a way to access it via opencv. It is better if you can post any python code snippets.
Video Test PlayersEnter your server IP address in Server, the application name in Application, and the streaming asset in Stream. Then click the tab for the stream format you want to use and click Start to play the asset.
Live Streaming Using RTMP with OBSTo use OBS to stream to Accelevents simply select Accelevents as the Stream Provider and then select the RTMP option.
Just open the address instead of your cam :
myrtmp_addr = "rtmp://myip:1935/myapp/mystream"
cap = cv2.VideoCapture(myrtmp_addr)
frame,err = cap.read()
From there you can handle your frames like when you get it from your cam.
if it still doesn't work, check if you have a valid version of ffmpeg linked with your opencv. You can check it with
print(cv2.getBuildInformation())
Hope I could help
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With