Cannot access x264 codec
I am linking the opencv library into my c++ app, and have x264vfw codec installed. When I try to open the videowriter with fourcc x264 and extension of .mp4 or .avi, the open fails. Not sure why as I am not getting error messages. The -1 fourcc option does not seem to work either. I can get the mp4v fourcc with avi to work, but not the x264. Has anyone gotten this to work on Windows c++ platform?
Ah the endless issue of codecs and OpenCV... the Videoreader and writer backend are broken as fuck and thus noone can guarantee them to work... why not simply use the mp4v codec?
The mp4v does not seem to be as efficient as the x264 as I compared them with Media Foundation. Unfortunately, Media Foundation has no vision libraries.
I have had success using the Openh264 codec. HERE is a link to the releases page, which has links to the binaries. I believe you use the "H264" fourcc, and set the environment variable OPENH264_LIBRARY_PATH to the full path and file name of the dll. ex: C:\Openh264\openh264-1.6.0-win64msvc.dll