New AV1 codec: speed up video loading in the browser


Free Download Mp4Gain
picture

New AV1 codec: speed up video loading in the browser

AV1 Codec

In this tutorial, we will learn how to use video on the web, as it is in 2019. Chrome and Firefox have started to support the new AV1 codec; you can make a video for them in half.

AV1 CODEC

Let’s talk separately about how to replace GIF with video in AV1 and H.264; then its size will be reduced by 20 to 40 times.

AV1 in the browser

YouTube is already using it on TestTube. Netflix said AV1 will be “its main next-generation codec.”

At Evil Martians we are already using it on our website and on Amplifer. In this article, I will share my AV1 implementation experience and show you step by step how to embed a video to make it work in all browsers.

Codecs and containers

With images, everything is simple: JPEG with PNG for all browsers or create more compact files in WebP for modern browsers. We can always be sure that the files will contain a .png PNG format (with the rare exception of PNG bombs, which imgproxy can protect against). Video files are more complicated. The file extension (,, or) only speaks of the container. While video files are made up of three different components:

.mp4.wmv.webm.mov

The video codec determines how much you can compress the video and what you have to sacrifice. The main video codecs on the Web are H.264, HEVC, VP9 and now AV1.
The audio codec compresses the audio. Of course, it is not necessary if there is no sound in the video. Popular choices are MP3, Opus, and AAC.
The container stores both video (compressed with some kind of video codec) and audio stream (compressed with some kind of audio codec). And also additional data such as subtitles and meta information. Popular containers: MP4, MOV, WebM.

When we see the extension of the .mp4 file, we can only tell that an MP4 container was used. But the codecs it contains may be different: the author could have taken H.264 and AAC, AV1 and Opus, or something else.

Behold AV1

AV1 is a video codec that was released a year ago, in March 2018. It was created to surpass the previous generation of codecs: HEVC, VP9, ​​H.264 and VP8.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

What is a codec? – clearly explained

Codecs are crucial to the quality and efficiency of data encoding. In this practical tip we explain exactly what a codec is.

What is a video codec

What is a codec? – 10 facts

The following information will help you understand what a codec is. The following example shows the differences between format, encoder, and decoder and shows how quality and efficiency depend on the codec.

What Is A Codec

-A codec is a combination of encoder and decoder.
-The objective of a codec is usually to reduce the amount of data for transmission or storage.
-Codecs are used in particular for audio, video and image data, as well as for text compression and encryption.
-In the audio sector there are special codecs for voice or music. -Video and graphics codecs are specially designed for comics / cartoons and real pictures / movies.
Lossy data reduction primarily uses psychophysical tricks to inaccurately encode those parts of image and sound that humans can barely or barely perceive.
-The most popular audio codecs are FLAC and MP3, where FLAC specifies both the format and the codec. MP3 is a codec for audio in MPEG I or MPEG II format.
-The MP3 decoder side is standardized by Fraunhofer and can be obtained without a license. However, the encoder is paid. Therefore, many use the free LAME encoder.
-G.722.2 and Full Rate (FR) voice codecs are used especially in telephony.
-The most popular video codecs are H.265 for UHD TV, DivX and XviD in MPEG-4 Part 2 and H.264 for QuickTime.
-Often various encoded formats like MP3 and JPG are combined into one container file, for example in AVI, MKV, MP4 and FLV.

A simple codec example

The principle of a codec is clarified with an example. An abbreviation codec reduces typed text to abbreviated text and uses it to generate typed text:

-Format: Your digital font format might dictate how all the letters and characters you use are encoded in binary.
-You define the type of encoding in a specification, for example, the rule that each character consists of 8 bits. To do this, write a table showing which bit sequence is assigned to which letter or character.
-Codec: You can now create an abbreviation codec to convert typed text into font formatted abbreviated text.
-To do this, your codec must specify which words will be abbreviated and how, for example, through a set of rules, a large list of abbreviations or a combination.
Encoder – An encoder can now convert typed text to abbreviation format using the rules and directory.
Decoder: a decoder can convert it to written text.
-The efficiency of data reduction is highly dependent on your codec.
-If you only created a directory with three abbreviations, most of the texts will not be noticeably shorter. Compression is low.
-If your list of abbreviations is huge, the device that is going to encode and / or decode the text must have a large memory and a high reading speed.
-However, if you set up a smart set of rules for encoding, your codec is ideally small and the end device doesn’t have to do a lot of computing or reading work.
-If a word can be abbreviated in more than one way, that’s fine. A good encoder would use the most efficient abbreviation.
-However, if an abbreviation can have multiple meanings, you have lost information. This will probably render your codec unusable.
-However, if only the words that you know you are omitting were abbreviated ambiguously, you would have invented a lossy psychophysical encoding. This takes advantage of the fact that you do not visually perceive every existing word optically.
-This idea is not entirely false. Because, as this example shows, we don’t necessarily read exactly what is written.