AlexeyAB / darknet

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

video detection save #3263

Open HerbertGourout opened 5 years ago

HerbertGourout commented 5 years ago

Hello Alexey, I'm trying to use Yolo and I'm trying to test my algorithm on a video and save it. So I use the following command: ./darknet detector demo data / coco.data yolo.cfg yolo.weights test.mp4 -i 0 -out_filename res.avi the only difficulty is that it can not save the res.avi file.

I still try to install ffmpeg using this command as you suggest:

sudo apt-get install ffmpeg libopencv-dev libgtk-3-dev python-numpy python3-numpy libdc1394-22 libdc1394-22-dev libjpeg-dev libpng12-dev libtiff5-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libxine2 -dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libv4l-dev libtbb-dev qtbase5-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils unzip

But that does not always work, and I don't know if there is another way?

Thank you

AlexeyAB commented 5 years ago

@HerbertGourout Hi, After that ffmpeg is intalles, you should recompile OpenCV with ffmpeg -DWITH_FFMPEG=ON

HerbertGourout commented 5 years ago

Merci pour votre retour