ffmpeg 集成opencv 和tensorflow用到的命令
训练脚本启动命令 sh yckj_model_train.sh /home/my_object_detect/cctv_train_image/ /home/my_object_detect/cctv_test_image/ cctv /home/my_object_detect/cctv_output_dir/ 50000 /home/my_object_detect/cctv_train_temp_dir
//ffmpeg 启动命令 /home/ffmpeg-4.2.2/ffmpeg -y -i /home/dafu.ts -vf object_detect=model_path=/home/cctv_output_dir/frozen_inference_graph.pb:pbtxt_path=/home/cctv_output_dir/cctv.pbtxt:object_name_path=/root/opencv_src/opencv-4.2.0/samples/data/dnn/object_detection_classes_coco.txt -vcodec libx264 -acodec copy -loglevel info -f mpegts test_object_detect.ts
//ffmpeg 集成opencv命令
//在configure之前要通过export LD_LIBRARY_PATH指定x264/x265/opencv库路径
./configure --enable-swscale --enable-gpl --enable-nonfree --enable-pic --prefix=/home/ffmpeg_install_dir --enable-version3 --enable-postproc --enable-pthreads --enable-avisynth --disable-yasm --enable-libx265 --enable-libx264 --enable-nonfree --extra-cflags="-I/usr/local/include -I/usr/local/x265_10bit/include -I/home/lib_object_detect/" --extra-ldflags="-L/usr/local/lib -L/usr/local/x265_10bit/lib -L/home/lib_object_detect -L/root/opencv-4.2.0/install/lib64/ -lopencv_highgui -lopencv_imgcodecs -lopencv_core -lopencv_video -lopencv_imgproc -lopencv_imgcodecs -lopencv_objdetect -lopencv_ml -lopencv_calib3d -lopencv_dnn -lopencv_features2d -lopencv_flann -lopencv_videoio -lopencv_photo -lm -ldl -lpthread -lrt -lssl -lcrypt -lcrypto -lz -lstdc++ -lcurl -L/home/lib_object_detect/ -lobject_detect "