I played a recorded video to test this, so video content would be same in both cases.
Recorded video length is 1 Minute in both cases.
There may be a split second difference in the videos as I start FFMpeg command in cmd window and then switch to VLC player to playback video.
1) command to record:
ffmpeg -f gdigrab -framerate 30 -i desktop -f segment -segment_time 60 out12Dec1%03d.flv
This recorded video of 1 min is 9.99 MB.
2) command to compress:
ffmpeg -i out12Dec1000.flv -vcodec libx264 -crf 20 output.mp4
This compresses the video to 1.76 MB
3) Now I am trying to use the parameters to directly capture in compressed mode instead of using 2 steps.
ffmpeg -f gdigrab -framerate 30 -i desktop -f segment -segment_time 60 -vcodec libx264 -crf 20 outvcodec12Dec19%03d.mp4
I tried both with and without framerate option, and used flv / mp4 for output. The output videos are between 2.24 to 2.57 MB.
Why is the recorded output in case 3 not close to 1.76 MB?