I\'m writing a program to save some webcam video to a file. I\'m using the x264 codec found here x264
When I try writing frames to a file I get this error message popin
I know is's a bit late but I figured this out. The solution(on windows) is to set -1 instead of codec's fourcc. This pops up a dialog where you can choose a codec and if you choose x264wfv, there's a configure button which lets you configure those options(zero latency works for me). Next time codec will use exact same settings, so you can run your program with fourcc code.