You would use key-int-max property of x264enc such as:
... ! x264enc key-int-max=30 ...
for having at least a key frame each 30 frames.