Skip to content

Instantly share code, notes, and snippets.

@aboucaud
Created May 18, 2020 16:43
Show Gist options
  • Select an option

  • Save aboucaud/6f7ce9e43723db3239e0d2732fac0caa to your computer and use it in GitHub Desktop.

Select an option

Save aboucaud/6f7ce9e43723db3239e0d2732fac0caa to your computer and use it in GitHub Desktop.
[HTML video embedding] Use compressed videos instead of GIF #web #videos
ffmpeg -f gif -i dancing-baby.gif dancing-baby.mp4
<!-- From https://www.dannyguo.com/blog/serve-videos-instead-of-gifs/ -->
<video autoplay loop muted playsinline>
<source src="dancing-baby.webm" type="video/webm">
<source src="dancing-baby.mp4" type="video/mp4">
<p>Your browser doesn't support this embedded video.</p>
</video>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment