Cannot access x264 codec

asked 2016-09-08 14:07:50 -0600

jima gravatar image

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?

edit retag flag offensive close merge delete

Comments

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?

StevenPuttemans gravatar imageStevenPuttemans ( 2016-09-09 06:01:35 -0600 )edit

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.

jima gravatar imagejima ( 2016-09-09 13:24:14 -0600 )edit
1

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

Tetragramm gravatar imageTetragramm ( 2016-09-13 11:13:15 -0600 )edit