AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.66k stars 7.96k forks source link

Using yolo with RTMP streaming #3266

Open kenpyc opened 5 years ago

kenpyc commented 5 years ago

Hi i would like to ask if i am able to use rtmp with yolo and if so how should i do it because i am lost at how i should implement yolo with rtmp streaming

AlexeyAB commented 5 years ago

@kenpyc Hi, I didn't do it, so I don't know does it work.

  1. Try to run darknet as HTTP-mjpeg server: ./darknet detector demo ./cfg/coco.data ./cfg/yolov3.cfg ./yolov3.weights test50.mp4 -json_port 8070 -mjpeg_port 8090 -ext_output You can specify another RTSP/HTTP input stream or web-camera instead of test50.mp4 videfile

  2. And then try to use VLC to retranslate Darknet HTTP-mjpeg-output from http://localhost:8090 to RTMP: http://bfy.tw/Ns1d

kenpyc commented 5 years ago

how to i input a web camera in the command

kenpyc commented 5 years ago

How do I do the second step and how will I be able able to use the repository here

AlexeyAB commented 5 years ago

Read: https://github.com/AlexeyAB/darknet#how-to-use-on-the-command-line

Using this command I can get input video from RTSP-video-stream from net-camera and send result video stream to the Web-browser (Chrome/Firefox): ./darknet detector demo data/coco.data yolov3.cfg yolov3.weights -i 0 -thresh 0.25 rtsp://login:pass@192.168.0.228:554 -mjpeg_port 8090

or use input from video test.mp4 file ./darknet detector demo data/coco.data yolov3.cfg yolov3.weights -i 0 -thresh 0.25 test.mp4 -mjpeg_port 8090

then open URL http://localhost:8090 in Chrome or Firefox


Then open this URL in VLC media player

image

image

RTMP-1

Then read: https://www.google.com/search?q=vlc+rtmp+streaming+youtube

kenpyc commented 5 years ago

Hi i am however unable to connect to the rtsp as they said the connection is refused do you have any solutions on how to solve it

kenpyc commented 5 years ago

image

kenpyc commented 5 years ago

Hi now when i run the command i keep getting video stream stoppped Do you have any soloutions to solve it thank you