

Now that it is clear, the next important thing to learn is that not every codec is suitable for every video format. Some popular examples of video formats are mp4, WebM, or MKV. Video and audio streams inside these containers are multimedia data encoded with codec.

Think of video format as a container that defines file structure for carrying video and audio streams. This topic can be confusing, so it's important to learn the difference. In this article, we will learn about codecs like VP9 and H265, and how we can optimize video using ffmpeg tool. Using video for animation with proper optimization is always better than GIF and sometimes outperforms native implementations. Modern video codecs can deliver excellent quality while preserving a very reasonable size. Unfortunately, the same can't be said about videos. When it comes to images, almost every framework, headless CMS, or CDN offers built-in optimization options. Frameworks compete by optimizing network requests, images, and code to achieve a blazing-fast loading experience. Modern web development every year applies new standards for performance.
