Yes, adding keyframes can increase the size of the output video file, as keyframes contain more information than normal frames and are therefore larger.
You can use the -g
option to specify the maximum number of frames between keyframes, which can help to balance the trade-off between file size and seeking performance.
For more information about the -force_key_frames
option and other options related to keyframes, you can refer to the FFmpeg documentation.