Video Compression: Bit rate


Free Download Mp4Gain
picture

Video Compression: Bit rate

Video Bitrates

It is not good to increase the bitrate too much
Bit rate = it is useless to rise above a certain level
It does not mean that you need to increase the bit rate.

Video Bitrate

For example, even if you encode a video with an original image quality of 100 at an ultra-high bit rate, the image quality will not exceed 100. (If possible, 99, etc.)

It is often the case that the image quality is 95 at a 5 Mbps bit rate, but the image quality is only 96 even if a 10 Mbps bit rate is assigned.

In such cases, it is useless to assign a bit rate of 10 Mbps.

The bit rate is to maintain the image and sound quality of the original video. It is not intended to raise the bottom.

High bit rate = high playback load
The higher the bitrate, the more playback load will be placed on the PC.

If you use a unnecessarily high bit rate, you will end up with the worst video, “Although the image quality is normal, the playback load is extremely high and the file size is a huge waste.”

So if you want to encode it for your own storage,

Video resolution
Video content
Let’s think about the bitrate to be assigned.

Related: How to Calculate Video Bitrate [Ratio to File Size]

However, if you want to post to Youtube, it will be encoded on the Youtube side and set to a suitable bitrate, so it’s okay if you encode at an ultra-high bitrate for now.

Related: Enco conditions and methods for videos published on Youtube

 


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

Video Compression: Relationship to Resolution

Video Compression: Relationship to Resolution

Video Bitrate

Higher resolution videos require higher bit rates. (Because it increases the amount of information per frame / second)

Video Bitrate

For example

Video “1280 x 720”
Video “1920 x 1080”
If you have two videos, the latter requires more bitrate. “1280 x 720” may be sufficient bit rate, but “1920 x 1080” is not sufficient.

For “Recommended bit rate” for “Resolution”, see Youtube recommended bit rate.

Recommended encoding settings for uploaded videos (details) – YouTube Help
→ https://support.google.com/youtube/answer/1722171?hl=ja

Relationship to frame rate
If the frame rate doubles, the bit rate will inevitably double.

This is because “the number of frames per second” is doubled.

For example

30 fps (2 Mbps)
60 fps (2 Mbps)
If there are two videos,

For 60 fps, “60 sheets at 2 Mbps” should be displayed, while

For 30fps, you only need to display “30 sheets at 2Mbps”, so the bitrate is actually half.

Reference: What is the frame rate? Difference between VFR (variable) and CFR (fixed)

It is not good to increase the bitrate too much
Bit rate = it is useless to rise above a certain level
It does not mean that you need to increase the bit rate.

For example, even if you encode a video with an original image quality of 100 at an ultra-high bit rate, the image quality will not exceed 100. (If possible, 99, etc.)

It is often the case that the image quality is 95 at a 5 Mbps bit rate, but the image quality is only 96 even if a 10 Mbps bit rate is assigned.

In such cases, it is useless to assign a bit rate of 10 Mbps.

The bit rate is to maintain the image and sound quality of the original video. It is not intended to raise the bottom.

High bit rate = high playback load
The higher the bitrate, the more playback load will be placed on the PC.

If you use a unnecessarily high bit rate, you will end up with the worst video, “Although the image quality is normal, the playback load is extremely high and the file size is a huge waste.”

So if you want to encode it for your own storage,

Video resolution
Video content
Let’s think about the bitrate to be assigned.

Related: How to Calculate Video Bitrate [Ratio to File Size]

However, if you want to post to Youtube, it will be encoded on the Youtube side and set to a suitable bitrate, so it’s okay if you encode at an ultra-high bitrate for now.

Related: Enco conditions and methods for videos published on Youtube

Resume
In short, it looks like the following.

If you want to make a video that emphasizes the quality of the image
→ Increase the video bit rate

If you want to make a video that emphasizes the sound quality
→ Increase the audio bit rate (increase the sample rate and bit depth)

When you want to make a video that emphasizes movement (smoothness)
→ Increase the frame rate of the video (simply doubling the frame rate requires doubling the bit rate)

Reference: What is the frame rate? Difference between VFR (variable) and CFR (fixed)
Reference: How to Change the Frame Rate (fps) of a Video

By the way, it is a bit rate encoding method.

CBR
Vbr
APR
The “image quality” and the “sound quality” also depend on this, so be careful with this as well.

Reference: Difference between CBR (fixed), VBR (variable) and ABR (average) [bit rate]

 

Video compression: Relationship to codec

Video compression: Relationship to codec

Video Bitrate

I mentioned earlier that “the higher the bit rate, the better the image quality and sound quality”, but the image quality and sound quality are closely related to the “codec”.

A “codec” is something like a “compression algorithm” for compressing “video” and “audio”.

Reference: What is video format? Codec difference

For example, the video codec “H.264” It is a very famous codec that is also used on Youtube and Nico Nico Douga,

(Addendum: Not used now …)

There is a codec called “H.265” that improves the “image quality per file size” of “H.264”.

“H.265” is “H.264 at about half the bit rate of”, “H.264 will get the equivalent of image quality and”. (The compression rate is double)

For example

Using “2Mbps” video bit rate with “H.264 codec”
Video with a bit rate of “2 Mbps” with the codec “H.265”
If there are two videos, the image quality of “H.265” is twice as beautiful even though the bit rate (file size) is the same.

s-25-11-2015_14h09_08
▲ Image comparing H.264 and H.265
(the character part etc. is quite different)
In addition, there is an almost four times difference in picture quality between videos using the “MPEG-2” codec used in DVDs and videos using “H.265”.

Also, the image quality is almost eight times different from that of “MPEG-1”, which is the predecessor of “MPEG-2”.

In other words, if you want to achieve the same image quality as “H.265” video with “MPEG-1”, you need 8 times the bit rate of “H.265”.

By the way, the video in unzipped state without using the codec
Uncompressed video
Uncompressed video
Is named. (Also called “raw video”)

The intro has gotten long, but what I mean after all is

“If you use a codec with a good compression rate, you can maintain reasonable picture and sound quality even at low bit rates.”

That’s why

In other words, the picture and sound quality are good.

Image quality (sound quality) = high bit rate x codec type
It is decided by the formula.

Reference: Different from the type of video codec (H.264, VP9, ​​MPEG, Xvid, DivX, WMV, etc.)

Reference: Different from the type of voice codec (MP3, AAC, WMA, WAV, Vorbis, FLAC, etc.)

Reference: Difference Between Lossy Compression and Lossless Compression [codec]

What is a bit rate?

What is a bit rate?

Video Bitrate

The bit rate in a video is “how much information is packed in one second”.

What if the bit rate is high?
Basically, the higher the bit rate, the better the picture and sound quality.

* Although it is closely related to the “codec” described later, it will basically improve.

There are two types of bit rates
Bit rates are assigned separately for “video” and “audio”.

The higher the bitrate assigned to “video”, the better the “image quality”.
The higher the bit rate assigned to “voice”, the better the “sound quality”.
Also, the sum of the two bit rates is called the “oval bit rate (total bit rate)”. (This oval bit rate is called “video bit rate”)

screenshot_2952
▲ If you open the video file properties and open the “Details” tab, you can see “What is the bit rate?”

(However, this Windows function is unreliable, so it is better to use video analysis software like MediaInfo)

In other words

Oval bit rate = video bit rate + audio bit rate
It becomes the calculation formula.

So even if it says “bit rate is high!”, It may mean “bit rate of video is high” and “bit rate of audio is not high”.

In other words, in such a case, the video will be “Image quality is good, but sound quality is not good …”.

Basically, the file size of “audio” is much smaller than that of “video”, so even if you increase the bit rate of “audio” significantly, the overall size of the file will not change as much.

Therefore, “speech” is often encoded uncompressed (linear PCM).

Relationship to image quality
The higher the “video” bit rate, the more accurate the color information that can be assigned to all pixels.

as a result

High bit rates improve image quality and
If the bit rate is low, the image quality will deteriorate.
koubittore-to
teibittore-to-to
▲ High bit rate (12 Mbps, 2.57 MB) ▲ Low bit rate (90 kbps, 20 KB)
* Actually, it is a gif video, so the bit rate is not accurate.

Bit rate difference

Also, in the case of a low bitrate, if you allocate bits evenly to all pixels, you will run out of bits, so in scenes where similar colors are continuous (such as a scene where the blue sky stretches without end), etc. Try to reduce the bits preferably.

As a result, “block noise” ↓ is likely to occur in such scenes.

Block noise
▲ Example of block noise (block noise)

Relationship to sound quality
The audio bit rate is

Sampling rate (Hz) x bit depth (bit) = bit rate (bps)
It can be expressed by the formula.

For example, when recording sound as digital data

How often do you record (= sample rate)
How much data is stored per interval (= bit depth)
Decide and register.

For example

Sampling rate: 44000Hz
Bit depth: 24 bit
If so, the sound is divided and recorded 44,000 times per second, and the sound is recorded using 24 bits for every 44,000 times.

In other words, if you want to improve the sound quality, you can increase the “sample rate” or the “bit depth”.

Increase the sample rate → Soft sound
Increase the bit depth → Increase the expressiveness of the sound, such as finesse and volume
Reference: Meaning and Relationship of Sample Rate, Bit Depth, and Bit Rate

What is image compression? Part 3

What is image compression? Part 3

Image Compression

What is an image that humans feel “beautiful”?

Image Compression

Humans focus on what they want to see, not the whole. If you improve the image quality of the area of ​​interest, you will feel that it is the “cleanest” image. Therefore, reduce the compression rate of the part you are paying attention to to improve image quality, and increase the compression rate of the part you are not paying attention to to reduce the amount of information. In this way, we perform a “sharp picture control” that changes the compression ratio in a well balanced way.

Color Bleed Prevention Technology
With conventional technology, the image will deteriorate if compression and restoration are repeated many times. For example, a phenomenon called “color bleed” is known in which the outline becomes unclear.

What does it mean that the image gets worse?
From the footage of the scene to our television, we will go through multiple relay points. Each time it passes through the relay point, the video is restored, compressed and transmitted. If you repeat compression and restoration many times, the color of the characters in the image will bleed.

First of all, why do you reset the tablet every time you go through the relay point?
It would be nice if it could be brought from the site to the TV in a compressed state at once, but for the images you see on the news, etc., you can switch between multiple images. The switching device is called a switch. To use the switcher, you cannot use the compressed video as is, but restore it before editing. A switch is a device included in each relay point.

Developed technology
There’s a reason video gets worse every time it’s compressed and restored across multiple broadcast points. Images taken in situ are first divided into “color components” and “gloss components”. The vertical resolution of that “color component” is cut in half and then the whole is compressed. (At this time, the “glow component” does not shrink. The human eye is sensitive to “glow”, so try not to retain it too much.) By reducing the vertical resolution by half, the color bleed gradually builds up with the conventional formula and, as it repeats, becomes visible to the human eye. Therefore, we have developed an original Fujitsu calculation method that does not cause color bleed even if compression and restoration are repeated many times.

Recognized as a global standard
The Society of Film and Television Engineers (Society of Film and Television Engineers), which sets world broadcast standards, has adopted this technology as a recommended technology. Not to mention the excellent color bleed prevention technology, there is another reason why it was adopted. It was decided that the device with this new technology and the existing device could be used together. If this technology cannot be used with older equipment, you will have to replace all equipment in several repeater stations at the same time. Not very realistic. This time, it was adopted because it was a technology that was easy for the company operating the repeater station because the equipment only needed to be replaced when possible.

Difference between “H.264” and “H.265” for those who want to know more
(On this page, “H.264 / MPEG-4 AVC” is written as “H.264” and “H.265 / MPEG-H HEVC” is written as “H.265”)

Difference in compression ratio
“H.264” achieves twice the compression speed of MPEG-2. “H.265” achieves a compression rate four times that of MPEG-2. In other words, “H.265” can achieve the same image quality with half the file size and bit rate of “H.264”.

Difference in compression time
For example, if you compress the same video data to “H.264” and “H.265”, “H.265” has a higher compression rate, so the compression will take longer, but it is expected that do gradually. abbreviated. I can do it.

Why is the compression ratio of “H.265” higher than that of “H.264”?
Block size optimization technology can increase the compression ratio. In the case of moving images, the entire screen is subdivided (locked) and only the modified information is sent. In “H.264”, only changes are sent in small blocks, but blocks with few changes and blocks with high complexity are sent in the same small blocks.
“H.265 optimizes the blocks according to the amount of change. That is, a block with few changes is a large block and a block with complex changes is a small block. Then the total amount of information can be reduced.

What is image compression? Part 2

What is image compression? Part 2

video  compression

Why is the standard name so long?

Image Compression

There are several organizations that go for standardization. Each has independently conducted research. As we proceeded with our research, each of us also gave our own name to the new technology. The research conducted by the two organizations was very similar and, as a result of discussions between the two organizations, a jointly formulated standard was created. Therefore, it was renamed “H.265 / MPEG-H HEVC”, named after both organizations. Each organization has its own specialty, but “H.265 / MPEG-H HEVC” is a technology that can be used in a wide range.

Latest “H.265 / MPEG-H HEVC” video compression technology
What is “H.265 / MPEG-H HEVC”?
The reading is “H.dot Nee Rokugo M Peg H.H.C.”. “HEVC” is an abbreviation for High Efficiency Video Coding.

Characteristics
High compression rate (by optimizing the block size, the amount of data is reduced to 1/4 compared to MPEG-2)
Low bit rate (same image quality as H.264 / MPEG-4 AVC, video bit rate reduced by half)
* Bit rate represents “how much information is packed in one second” and the unit is bps (bit per second).
Application example
Super high definition, 8K streaming, 4K streaming, Internet streaming, the latest smartphones, next-generation Blu-ray, etc.

High compression rate: by optimizing the block size, it will be 1/4 of MPEG-2
The entire screen is finely disassembled (the size of a block when divided into blocks is small). Sending the part of the modified image is the same as MPEG-2, but since the whole screen is divided into smaller parts and only the modified information is sent, the amount of information can be reduced even for the same modified image.

Low bit rate: If the image quality is the same as MPEG-2, the video (video) bit rate can be reduced to 1/4.
If you can lower the bit rate (bit rate), you can watch beautiful videos even when the internet line is busy (bit rate is the amount of data that can be sent and received per second). As for the changed information (information about how much has moved in which direction), “MPEG-2” can acquire the change information only in 0.5 pixel units, so the amount of information sent at one time is big. Since “H.265 / MPEG-H HEVC” can acquire change information in units of 0.25 pixels, the amount of information sent at one time may be small.

Questions corner for researchers

What are the benefits of a lower bit rate (less information sent per second)?

For example, we are currently sending high definition video in the MPEG-2 standard on a digital satellite transmission channel (transmission line), but if we use the HEVC standard, we will be able to send 4K and 8K video with a large amount of information with the same end.

Is satellite broadcasting different from digital terrestrial broadcasting (terrestrial broadcasting)?

If it is not. There are two types of television transmission: terrestrial transmission (digital terrestrial transmission) and satellite transmission. “Terrestrial broadcasting” sends radio waves establishing a relay station between the broadcasting station and the home. It is called terrestrial broadcasting because it uses facilities on the ground to send radio waves. “Satellite broadcasting” uses artificial satellites located 36,000 km above the equator to send radio waves directly to homes. Satellite transmission can also send radio waves to areas with many obstacles, such as mountains.

Fujitsu’s strengths
Images that people feel “beautiful”
Even high-quality images with the same amount of information will look different if they are mechanically compressed evenly and processed with a balance that makes humans feel “clean.” We have developed an image control technology that uses human visual characteristics.

What is the high image quality that a computer judges?
When processed with international standard software, the entire screen is processed smoothly and with high image quality. Everything is compressed evenly, which is why the computer considers it high-quality. However, when viewed by humans, it looks a bit blurry overall.

What is image compression?

What is image compression?

Image Compression

The image is made up of a lot of information. Image compression consists of reducing the total amount of information by reducing the extra part of that information.

Image Compression

Image compression is similar to compressing clothes and futons.
Newlywed Atsuko is worried about storing her new home. When he was single, Mr. Atsuko, who was fashionable, had a lot of clothes. However, the new room has a small amount of storage and there is no room for take-out clothes. In addition, you have to put a futon for the couple and the client in the storage room.
That I have to do?

Therefore, I decided to ask Mr. Chijimi, a senior who is good at storing.
Mr. Shumi noted that many thick futons and garments are stored after losing weight with a “compression garment bag (futon)”.

Immediately, Mr. Atsuko tried to follow Mr. Shumi’s advice and found that he could put away all the clothes and futons that couldn’t be put in the closet until now.

Once compressed, getting around is easy. Mr. Atsuko’s luggage, which was estimated at three trucks, could be transported by a truck by packing clothes and futons in a compression bag.

Real image compression method
Clothes and futons remove the air that is in the spaces, but the compression of the image extracts information that can be eliminated by a fixed calculation.
In other words, there is less information.

(Still image) Compression method
To send a lot of information at once, the sender must compress the information (still image). We will explain how to compress using the commonly used JPEG method as an example.
(JPEG is an abbreviation for Joint Photographic Experts Group, which is one of the methods for compressing still images.)

JPEG compression method
The image is decomposed into square blocks consisting of 8 x 8 dots, and the brightness information and color information are converted to frequencies for each block (DCT calculation: Discrete Cosine Transform). The high-frequency component and the low-frequency component are separated, and the high-frequency component is a number close to “0”, so it is not read as information. Only low-frequency components are converted to signal 01.

JPEG features (progressive method)
The entire image is displayed from the beginning with a rough image. And have you ever seen a gradual, finer and cleaner image? That is the characteristic of the progressive method.

(Video) Compression method
The information of the video is greater than that of the still image. In other words, moving images need to be compressed more than still images. For example, MPEG-2 is a standard for compressing video. This standard is a standard established by the Moving Picture Experts Group and is used in digital terrestrial broadcasting (abbreviation, digital terrestrial broadcasting).

Video compression
Since there is a lot of information, in addition to the method of compressing still images, the amount of information is reduced by the “send only the information that has changed” method.
For example, if you have a video of a cat wagging its tail, it will only send information about the tail change. So all the information is less.

Video compression standard
Video compression standard stream
As the amount of information we handle increases, new standards are being developed (standards are also called formats). Each standard has its own characteristics and the fields of application are different. (Researcher Akira Nakagawa was awarded the Purple Ribbon Medal in the Spring 2016 Medal for H.264 / MPEG-4 AVC “Development of Digital Video Coding Technology and Transmission Equipment”)

Video Basics and Compression Part 3

Video Basics and Compression Part 3

Video Compression

Drawing method

video compression

The drawing method is a method of scanning video signals.
There are “progressives” and “interlaced”.

Progressive performs one scan drawing at a time. Interlacing, on the other hand, is a gradual and clear drawing method.

Main video compression methods and functions
From here, I will explain the following three main video compression methods.

MPEG
H.264
Motion JPEG (MJPEG)
MPEG
MPEG is read as “Mpeg”. It is one of the standards for compressing video and audio.

MPEG Features
High degree of freedom in encoder control.
Not suitable for taking a frame clearly.
Originally, it was an abbreviation taken by the acronym for “Moving Picture Experts Group”, an international standardization organization for video encoding, but it has come to be used as the name of the encoding method (compression method) standardized by that organization. . .

MPEG processes the differences frame by frame block by block.

The “block” here refers to a group of adjacent pixels.

In video compression, groups of adjacent pixels in a square range are generally treated as a group, and this is called a macroblock. This block is compared to the block at the same position in the next frame, and only the difference is sent as data.

Quoted from Wikipedia “Data compression” (last consultation: 05/21/2020)

A frame is a “one-by-one still image”.

If multiple still images (frames) continue, “shifting portions” and “unchanging portions” will appear.
The part that does not change is the “duplicate information”, so it can be compressed.

Thus, in MPEG, the part that changes and the part that does not change for each frame are processed in block units.

H.264
H.264 is read as “H.dot Nirokuyon”. This is also the standard method for video compression.

H.264 Features
High compression rate. (More than twice that of MPEG-2)
The bit rate is low.
It is sometimes called “MPEG-4 AVC” because it is standardized as “MPEG-4 Part 10 Advanced Video Coding” in the MPEG-4 standard. (MPEG-4 AVC is read as “Mpeg for AVC”. AVC is an abbreviation for “Advanced Video Coding”).

Motion JPEG (MJPEG)
Motion JPEG is read as “Motion Jepeg”. Also written as “MJPEG”.
As the name suggests, the still images (frames) that make up a movie are “JPEG images.” (To be exact, the frame is compressed in JPEG format.)

These JPEG images are made continuous like a flip book.
So to speak, “a set of continuous JPEG images” is the video data.

Motion JPEG (MJPEG) features
It is beautiful even if you look at it in a painting.
The video capacity is great.
The compression ratio is not as high as MPEG.
However, due to the characteristics of MPEG processing in “block units”, there is a drawback that “block noise” occurs when the bit rate is low.
Also, in cases where there is a lot of movement (the change is large for each frame), the image tends to be rough, but in the case of Motion JPEG, it can be handled even in cases where there is a lot of movement. .

In addition, Motion JPEG has a powerful advantage that MPEG and H.264 do not have, ie “you can extract a frame clearly”.

Video Basics and Compression Part 2

Video Basics and Compression Part 2

Video Compression

The amount of data is huge because video is made up of a series of “still images.”

VIDEO COMPRESSION

Therefore, as it is, the amount of data is large and unwieldy (cannot be handled), so “compression” is required.

Compressing video is called “encoding.”
Encoding is “scrambling the data”, which refers to the conversion (compression in this case) of the data according to certain rules (compression algorithms).

Restoring the converted data to its original state is called “decoding.”

Please note that it does not necessarily include audio
It’s easy to think of video as “audio is a set”, but that’s not the case.

Certainly it generally comes with audio that is in sync with the video, but since “video” is just a “continuous still image” it can be called “video” even if it does not come with audio data.

Machine Vision Page

Video Data Terms
From here, I will explain the terms related to “compression” of video data.

frames per second
Bit rate
Compression rate
Drawing method (progressive, interlaced)
These words are “video specifications” and are closely related to compression.

frames per second
The frame rate represents the number of still images per unit of time.
In the case of video, it generally refers to “how many still images are composed per second”. The unit is fps (frames per second).

Explanatory frame rate drawing
For example, in the case of “5 still images per second”, 5 fps.
In the case of “10 still images per second”, it is 10 fps.

The frame rate represents the “smoothness of movement”.
For example, if the frame rate is small, it will be a “messy video”. On the other hand, the higher the frame rate, the smoother the motion of the video, but the greater the amount of data.

Bit rate
Bit rate is the amount of data per unit of time.
The frame rate was “the number of still images per second”, but in the case of bit rate, it means “the amount of data per second”.

If the frame rate is high, the amount of data will be large, so the bit rate will also be high.
Also, if the resolution of the “still image” is high, the amount of data will be large. (Comparing HD and Full HD, Full HD has a higher amount of data.)

Compression rate
It is a percentage that shows how much the amount of information in the compressed data has decreased compared to the original data.

Video and compression basics

Video and compression basics

Video Compression

On this page, we will look at “video compression format”, but why is “compression” necessary in the first place?

Video Compression

And although it is called “video compression”, several questions arise about “what does compression mean?”

In this way, I would like to take a look at the important points to understand “video compression”.

What is compression in the first place?
First, let’s look at “compression”.

When you think of “data compression”, you may think of it as “reducing the amount of data”, but in reality there is “lossless compression” and “lossy compression”.

Lossless compression reduces the amount of data while retaining the amount of information in the data.
As it is called “reversible”, it is a method that can be reverted to “before compression”. In other words, lossless compression is a method that enables complete restoration of compressed data.

Lossy compression, on the other hand, compresses data and cannot be fully restored to its pre-compressed state.

In other words, the method that can be restored before compression is “lossless compression” and the method that cannot be restored before compression is “lossy compression”.
In this way, compressed data is classified into lossless compression and lossy compression according to “whether the data can be restored before compression.”

And most video data compression methods fall under this “lossy compression”.

Why do you need “compression”?
This is because “video data” is “a continuous image data set”.

Video is “continuous still image”
The animation looks like a flip book, with several images stacked on top of each other, but the “video” is similar to this and expresses the “change” by stacking the images.

In this way, a video is made up of a series of still images.

Even if there is only one image, a certain amount of data is required, but imagine if there are multiple images … You also need to operate all the time and keep storing data as a “surveillance camera”.
If you handle it “as is” without compressing it, the amount of data will be enormous.