user26289: I need to embed short (~10 sec.) videos on my website. I currently use .mp4 files, each one is around 10 MB  large.
Is there a way I can reduce the size of these videos? Whats the best format to use? Might gifs be a better option? What resolutions do you recommend for desktop and mobile devices? Does the video editor I use make a difference in file size after rendering?

user23732: The best thing for such a use case is creating diffrent files which get loaded in different scenarios.
Current recommendation is to use webm for web content, this container is not supported with all Browsers tho, so also include a .mp4 to switch too.
GIFs can be compressed quite nicely, but you need to keep in mind that GIFs are quite strict about colors.
You can go quite far by compressing with FFMPEG

user1950: GIFS are massive compared to h.264, basically because GIF was developed in the olden days (1987), and h.264 was developed in the… well in the less olden days (2003). Here's a 72kb h.264 file
https://adobe.ly/32QFBSL
And here's the same thing converted to a GIF. Total file size 1,212kb, or roughly 16 times the size, and the quality leaves a lot to be desired.

h.264 is a codec that was designed for the purpose of delivering high visual quality with small file sizes. It is almost universally readable by any remotely modern browser, and is free to use for most users. The only thing going for GIFs is that they are classified as an image format, so platforms like stackexchange will allow you to embed them, whereas they don't let you embed video. Go figure.
The only alternatives that I could suggest are webm  which is open source but slightly less ubiquitous, and h.265 which works even better, but again is less universally playable.

26289: <p>I need to embed short (~10 sec.) videos on my website. I currently use <code>.mp4</code> files, each one is around 10 MB  large.</p>

<p>Is there a way I can reduce the size of these videos? Whats the best format to use? Might gifs be a better option? What resolutions do you recommend for desktop and mobile devices? Does the video editor I use make a difference in file size after rendering?</p>
 23732: <p>The best thing for such a use case is creating diffrent files which get loaded in different scenarios.</p>

<p>Current recommendation is to use webm for web content, this container is not supported with all Browsers tho, so also include a .mp4 to switch too.</p>

<p>GIFs can be compressed quite nicely, but you need to keep in mind that GIFs are quite strict about colors.</p>

<p>You can go quite far by compressing with FFMPEG</p>
 1950: <p>GIFS are massive compared to h.264, basically because GIF was developed in the olden days (1987), and h.264 was developed in the… well in the less olden days (2003). Here's a 72<strong>kb</strong> h.264 file
<a href="https://adobe.ly/32QFBSL" rel="nofollow noreferrer">https://adobe.ly/32QFBSL</a></p>

<p>And here's the same thing converted to a GIF. Total file size 1,212kb, or roughly 16 times the size, and the quality leaves a lot to be desired.</p>

<p><a href="https://i.stack.imgur.com/oH7l6.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oH7l6.gif" alt="enter image description here"></a></p>

<p>h.264 is a codec that was designed for the purpose of delivering high visual quality with small file sizes. It is almost universally readable by any remotely modern browser, and is free to use for most users. The only thing going for GIFs is that they are classified as an image format, so platforms like stackexchange will allow you to embed them, whereas they don't let you embed video. Go figure.</p>

<p>The only alternatives that I could suggest are webm  which is open source but slightly less ubiquitous, and h.265 which works even better, but again is less universally playable.</p>
