-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract individual frames from the stream #1
Comments
Hi @xandrew94x, Thanks for using my lib. The Instead of giving image as input. You should try feeding video stream into OpenCV, grab video frames, and manipulate them the way you want. Thanks. |
Thanks @Eittipat for the answer. I found a little trick to read frames from OpenCV, even if it doesn't look optimal. At the moment I have created a script that reads the temporary .flv file that you save from your code (I also gave a fixed name to the saved video):
My code for now looks like this:
But at some point some error seems to happen, maybe something with the input packets failing to update the
What happens here in your opinion? Regarding your answer, what do you mean by: Directly connect OpenCV to stream via RTMP link? Because I tried to insert the RTMP link directly on
Maybe I am using wrong link? Or do I need to change something in your code first? Thanks for your attention and patience. |
Did you try using cv::CAP_FFMPEG on VideoCapture. About your problem, You cannot process each chunk individually. Sometimes multiple chunks are required in order to correctly decode a video. If directly connecting OpenCV with RTMP URL didn't work, try feeding video chunks into named piped and read it back via OpenCV Cheers, |
Hi @Eittipat I momentarily found a solution. I used FFMPEG to receive the rtmp streaming stream and then OpenCV to extract the frames (and eventually save them).
I changed also the client app for the android device and finally i used this docker for the server. Thank you for your time. |
Hi @Eittipat
I have recently started using RTMP.
My goal is to take
frames
from multiple live streams camera (Android) and analyze them via OpenCV.Using your example code:
I tried to intercept the payload and convert it into an image via OpenCV:
but
img_np
return alwaysNone
.For the android Client part I'm currently using this code by @TakuSemba.
I tried to save the
flv
video without changing anything and the file is saved correctly.Can you suggest any solutions?
Thanks.
The text was updated successfully, but these errors were encountered: