Do you mind posting the output settings you are using?
For Video Quality settings, I would say make sure your settings contain the following:
Scene change detection is enabled
Adaptive Quantization is set to Auto
Set Profile to High for AVC, Main/High for HEVC or Main for MPEG-2 video codecs
Set reference frames to 3
Set b-frames to 2.
If you are seeing grey frames at the beginning of encodes, also may be worth running the following ffprobe [1] command on your input source to make sure your first frame is a key frame (IDR) [2].
ffprobe -i testme.mp4 -select_streams v:0 -show_frames | grep -E '(FRAME|key_frame=|pict_type=)'
Output will look something like this:
[FRAME]
key_frame=1
pict_type=I
[/FRAME]
[FRAME]
key_frame=0
pict_type=B
[/FRAME]
[FRAME]
key_frame=0
pict_type=B
[/FRAME]
[FRAME]
key_frame=0
pict_type=B
[/FRAME]
[FRAME]
....
== Resources ==
[1] FFPROBE Download: https://ffmpeg.org/download.html
[2] What is an IDR Frame: https://streaminglearningcenter.com/articles/everything-you-ever-wanted-to-know-about-idr-frames-but-were-afraid-to-ask.html