I want to use gpu for grabbing frame from cameras using opencv but i have no idea for this job. I have a server with this configurations: Gpu 1080 ti,cpu core i7 9700,32g ram While I am processing, 70% of the graphics are useless, with 7 cameras completely occupying the cpu, and it is not possible to get a new camera. Each added camera will have a delay in displaying the frames. However, I can even get a 4mp camera with a maximum of 8fps. Where's my problem? How i can speed of grabbing rtsp cameras using opencv and python?
Asked
Active
Viewed 528 times
0
-
i don't understand a thing between the words `While` and `Where`. You should be more clear, also give more detail of your code/setup. – seleciii44 Aug 24 '19 at 16:35
-
Im using cv2.VideoCapture for grabbing frames from cameras. – Mkg Rty Aug 24 '19 at 16:37
-
How is it more clear now? We can't guess your problem without knowing what you have done. Add a [minimal working example](https://stackoverflow.com/help/minimal-reproducible-example). Show your efforts step by step. For example how much does cpu/gpu resource it take for one cam with/out hardware decoder. What do you mean %70 of the graphics are useless? What do you mean by "i can even get a 4mp camera with maximum of 8fps". Maybe it's because i'm not native english speaker, but it's really not clear at all! – seleciii44 Aug 24 '19 at 16:57
-
Also, what is the resolution of your camera? what is the data rate you are streaming per camera and total? What is the frame rate you observe? Is the problem only latency? How much is the delay? How much is it with one camera only? – seleciii44 Aug 24 '19 at 17:00
-
I find it easier to first test an environment with gstreamer or ffmpeg on command line and then do the coding. Have you tried one of these? Test it for one/multiple cameras with hardware decoding enabled/disabled. Make sure what you do is already feasible. – seleciii44 Aug 24 '19 at 17:05
-
How i do coding with gstreamer from command line in python? – Mkg Rty Aug 24 '19 at 17:17
-
You don't need python. Just install gstreamer, open terminal, write the sutiable command (pipeline in gstreamer world) and observe the video. For example see [this](https://stackoverflow.com/questions/44160118/gstreamer-pipeline-to-show-an-rtsp-stream) question. – seleciii44 Aug 24 '19 at 17:21
-
Thanks,but i need to process cameras in python scripts,i want to grab frames and do process on them. – Mkg Rty Aug 24 '19 at 17:33
-
I get that. I only suggested gstremer/ffmpeg because it's a lot easier to test a media setup with these tools. I still think you should clarify your question though. – seleciii44 Aug 24 '19 at 17:37