I have a slightly older version, but have the same libraries as you.
What kind of error do you get? For Some extra info you should make sure javacv and ffmpeg logs correctly.
For javacv:
System.setProperty("org.bytedeco.javacpp.logger", "slf4j"); //set your desired level
For ffmpeg:
org.bytedeco.javacpp.avutil.av_log_set_level(avutil.AV_LOG_DEBUG); //debug is quite nice, it does not log so much, so debug is used in production
This is my code, that works OK (javacv 1.1 with friends):
FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(fileName, width, height, 0);
//Definition for H264
recorder.setVideoOption("crf", "29"); // Constant Rate Factor (23 is the default)
recorder.setVideoOption("preset", "fast"); // fast is actually fast, and gives better compression than normal on my type of video
recorder.setVideoCodec(avcodec.AV_CODEC_ID_H264);
recorder.setFormat("mp4"); // just the file format
// TODO We should use the frame rate from the original recording.
recorder.setFrameRate(15d); // FPS (frames per second)
recorder.setGopSize(30); // I really do not remember what this is, and i do not think it is necessary
Yours, Frank