I use the app GIF Brewery. It can create a nice looking GIF of movies and screencasts.
First, you'll want to crop the recording to just what you need to reduce the file size. Click the Crop button. Use the handles to isolate only the part you care about. Then press Return on your keyboard:
Next you'll want to fiddle with the export settings to ensure good quality with a low file size. Click on the GIF Properties button. Use the following settings:
- Frame count: 24
- Frame delay: 100 ms
- Reduce the number of colors in GIF: [On], Adaptive Palette, 192 Colors
- Improve GIF quality with dithering: [On], Sierra Lite
Finally, click the Create GIF button and select a location to save the file. You'll have a GIF that looks almost as good as an MP4.