I am trying to create a movie using opencv and I need that output file be in H264 format.
I used the following fourcc in opencv, but I am getting error that suitable codec is not installed.
fourcc=CV_FOURCC('H','2','6','4') ;
When I run my application I get the following error message:
Could not find encoder for codec id 28: Encoder not found
What do I need to be able to use this codec in OpenCV?
H264 is not a codec, but rather a standard, while for example x264 is an encoder that implements the H264 standard (CV_FOURCC('X','2','6','4') ;).
OpenCV can write videos using FFMPEG or VFW. You need to compile FFPMEG with x264-support (instructions can be found on FFMPEG's website)
If you are using VFW: Take a look at http://sourceforge.net/projects/x264vfw/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With