pjreddie / darknet

Convolutional Neural Networks
http://pjreddie.com/darknet/
Other
25.7k stars 21.33k forks source link

How to connect a camera through rstp #222

Open Ludwigromanam opened 6 years ago

Ludwigromanam commented 6 years ago

Hi everyone,

I am trying to connect a drone's camera using rstp and use YOLO for object recognition. I have been trying to find out what files and lines of code to change in order for me to achieve my goal, I have tried changing, the art.c and demo.c files but nothing works.

Does someone here knows what lines and files I should change ?

Thanks to all in advance !

AlexeyAB commented 6 years ago

I use in this way: ./darknet detector demo cfg/voc.data cfg/yolo-voc.cfg yolo-voc.weights rtsp://login:pass@192.168.0.228:554 -i 0

More: https://github.com/AlexeyAB/darknet#how-to-use

Ludwigromanam commented 6 years ago

Thanks a million @AlexeyAB ! I will give it a try !

lilong-epfl commented 6 years ago

@AlexeyAB Hi, it works with rtsp stream, but with 3 seconds of delay. Do you have any idea to solve this problem? Thanks in advance.

sumeet9096 commented 5 years ago

I use in this way: ./darknet detector demo cfg/voc.data cfg/yolo-voc.cfg yolo-voc.weights rtsp://login:pass@192.168.0.228:554 -i 0

More: https://github.com/AlexeyAB/darknet#how-to-use

[rtsp @ 00000200ff758260] method PAUSE failed: 551 Option not supported warning: Could not find codec parameters (../../modules/highgui/src/cap_ffmpeg_impl.hpp:548) Video-stream stoped! Stream closed. Video-stream stoped! Stream closed. CUDA Error: invalid argument CUDA Error: invalid argument: No error

AlexeyAB commented 5 years ago

@sumeet9096

Try to use this command: https://stackoverflow.com/questions/20613453/warning-could-not-find-codec-parameters-modules-highgui-src-cap-ffmpeg-i ./darknet detector demo cfg/voc.data cfg/yolo-voc.cfg yolo-voc.weights rtsp://login:pass@192.168.0.228:554?dummy=param.mjpg

Also can you see this rtsp-stream by using VLC video player or other soft?

sasdaspro commented 5 years ago

@sumeet9096

Try to use this command: https://stackoverflow.com/questions/20613453/warning-could-not-find-codec-parameters-modules-highgui-src-cap-ffmpeg-i ./darknet detector demo cfg/voc.data cfg/yolo-voc.cfg yolo-voc.weights rtsp://login:pass@192.168.0.228:554?dummy=param.mjpg

Also can you see this rtsp-stream by using VLC video player or other soft?

[rtsp @ 0000024afefb24a0] method DESCRIBE failed: 404 Not Found warning: Error opening file (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:808) warning: rtsp://admin:admin@10.14.14.203:554/cam/realmonitor?channel=1 (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:809) Video-stream stoped! Stream closed. Video-stream stoped! Stream closed. 'subtype' is not recognized as an internal or external command, operable program or batch file.

sorry i have this problem any advice? i use this link : rtps://login:pass@IPADRESS/cam/realmonitor?channel=1&subtype=0

kenpyc commented 5 years ago

hi when i run the command it just keep saying video stream stopped do your have any suggestions

duckiekings commented 4 years ago

How to connect to another camera for detection?

Loading weights from backup/all-tiny-yolov3_30000.weights...Done!
Unable to stop the stream: Invalid argument
Couldn't connect to webcam.
: Resource temporarily unavailable
darknet: ./src/utils.c:256: error: Assertion `0' failed.
Aborted (core dumped)
barrytang927 commented 4 years ago

How to connect to another camera for detection?

Loading weights from backup/all-tiny-yolov3_30000.weights...Done!
Unable to stop the stream: Invalid argument
Couldn't connect to webcam.
: Resource temporarily unavailable
darknet: ./src/utils.c:256: error: Assertion `0' failed.
Aborted (core dumped)

How to connect to another camera for detection?

Loading weights from backup/all-tiny-yolov3_30000.weights...Done!
Unable to stop the stream: Invalid argument
Couldn't connect to webcam.
: Resource temporarily unavailable
darknet: ./src/utils.c:256: error: Assertion `0' failed.
Aborted (core dumped)

I am having the same issue, have u fixed?

taojianggit commented 3 years ago

From the iSpy or Agent (https://www.ispyconnect.com/man.aspx?n=Ip+Webcam+(android)), we can see that the IP webcam for android does not support rstp protocol, only support for http protocol. And IP webcam pro support for rstp, the suggested URL format is: http://ip:port/11

RyanShun-511 commented 3 years ago

I use in this way: ./darknet detector demo cfg/voc.data cfg/yolo-voc.cfg yolo-voc.weights rtsp://login:pass@192.168.0.228:554 -i 0

More: https://github.com/AlexeyAB/darknet#how-to-use

Hello, how do I connect to the HoloLens2 cam?

ExpiredTapWater commented 2 years ago

Hello, I'm having an issue connecting an RTSP camera. I'm able to view the stream on another software like VLC, but I keep getting "video-stream stopped". I tried thisdarknet.exe detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights rtsp://username:password@192.168.1.10:554/stream1 -i 0 and all of the other variations here but I could not get it to stream. Could anybody point me in the right direction?

CodiTrixta commented 1 year ago

Hello, I'm having an issue connecting an RTSP camera. I'm able to view the stream on another software like VLC, but I keep getting "video-stream stopped". I tried thisdarknet.exe detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights rtsp://username:password@192.168.1.10:554/stream1 -i 0 and all of the other variations here but I could not get it to stream. Could anybody point me in the right direction?

Im getting the exact same issue as you and done the exact steps and still nothing. Did you manage to find a way?

gubenena commented 1 year ago

Hello, I am facing this problem, and from what I have searched it's caused by multithreading. But since I am pretty new to cv and yolov7 could you help me out on this? How and where should I change to code for it to work as it should? [[h264 @ 0x8f915e0] error while decoding MB 53 20, bytestream -7],

I am using yolov7 on ubuntu 20.04, proc i5, rtx 3060ti

Sathiyanarayanan18 commented 1 year ago

Hello everyone Iam trying to run the yolov4 object detection algorithm in my drone camera,in my jetson xavier. In yolo files iam exactly trying to figure out where the rtsp stream is displayed in my screen but nothing helps,I excatly need to restream that stream to another screen

Does someone here knows what lines and files I should change ?

Have a good day! Thanks to all in advance !