I use "Screen to Gif" software and it is free software. Use "FFmpeg" plugin for mp4 output when saving a video. I will put a video explanation soon.
Step 1: Click on "File"
Step 2: Click on "Recording"
Step 3: Give the height and width(PX) according to your screen or you can drag.
Step 4: Click on Record at bottom.
Step 4: Click on Record at bottom.
Step 5: Click on "Save as" and choose "Gif" on right side panel.
Step 6: Scroll down and u will see "File" and you can choose location. Then click "Save" button.