This shell script allows you to optimize videos for web, generating a optimized MP4 and WebM.
optimize-video.sh [video_file]
The optimized videos will be in the /optimized
directory.
<video
class="custom-video"
autoplay
loop
muted
playsinline
width="1170"
height="1009"
>
<source src="[webm_file]" type="video/webm" />
<source src="[mp4_file]" type="video/mp4" />
Your browser does not support the video tag.
</video>
.custom-video {
max-width: 100%;
height: auto;
}