I'm working on a python/pygame application, and i'm facing some difficulties when I try to capture a video from a usb camera (640x480) to a h264 encoded file, through OpenCV. Everything work fine with other codecs, DIVX or DX50, but I hope to achieve a better FPS using h264 harware encoding.
So i build ffmpeg from source with h264 support, with success (as shown here) :
ffmpeg --version
configuration: --arch=armel --target-os=linux --enable-gpl --enable-omx --enable-omx-rpi --enable-nonfree --enable-libx264
ffmpeg -codecs | grep "264"
DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_vdpau ) (encoders: libx264 libx264rgb h264_omx h264_vaapi )
And then rebuild openCV 2.4.13 from sources. Sadly, I always get this error when I try to use VideoWriter with "H264" or "X264" fourcc :
[libx264 @ 0x1fd1250] broken ffmpeg default settings detected
[libx264 @ 0x1fd1250] use an encoding preset (e.g. -vpre medium)
[libx264 @ 0x1fd1250] preset usage: -vpre <speed> -vpre <profile>
[libx264 @ 0x1fd1250] speed presets are listed in x264 --help
[libx264 @ 0x1fd1250] profile is optional; x264 defaults to high
Could not open codec 'libx264': Unspecified error
Did someone see what I missed ?