Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating OpenCV project with no Video Transcoding (ffmpeg part) Support on Linux how to?

Currently I use something like this to create project make files:

cmake -DCMAKE_INSTALL_PREFIX="./install-dir" -DBUILD_WITH_STATIC_CRT=ON -DBUILD_SHARED_LIBS=OFF -G "GCC" 

And I use FFmpeg in my project that I compile sepratly. Also I do not like the way OpenCV workes with video transcoding any way - prefer to do it all manually with ffmpeg.

I wonder if it is possible to create project file using Cmake so that OpenCV video (not images like png, jpg, tiff, etc) transcoding part will not be compiled (not camera grabbing - I like and use that one=))?

like image 437
myWallJSON Avatar asked Oct 27 '25 08:10

myWallJSON


1 Answers

If you would rather not have ffmpeg support with OpenCV, you can disable the WITH_FFMPEG option via the CMake GUI when you are building OpenCV. Or, if you can't use the GUI, you can do it from the command-line:

foo@bar:~/opencv-src/build> cmake -DWITH_FFMPEG=OFF <many other options...> ..

You won't be able to capture from files anymore if you disable this option. However, I think if you have V4L2 support enabled, you can capture from the camera. Hope that is helpful.

like image 51
mevatron Avatar answered Oct 30 '25 01:10

mevatron