Depends what you are doing with it (animated gif) In general, an animated GIF has a full image for each frame, while MP4 and other video codecs will only have a full image every so often (a "keyframe") and otherwise will only have the information that changes from frame to frame. Animated GIFs are usually smaller than MP4s because GIF authors make them smaller dimensions, 10 frames/second instead of 30, lower color depth, and so on. To reduce file size, reduce number of frames, height and width. No way can it replace mp4 and the newer formats for video and i would say should not be used that way as you have found out files can be large. Or use shotcut on solus and take out what you want. At the moment having a brain fart not sure about handbrake on linux. Video is like a whole other universe
https://rigor.com/blog/optimizing-animated-gifs-with-html5-video/