[0:00] video has become a huge part of our [0:02] internet experience these days videos [0:04] are everywhere from funny cat videos on [0:06] facebook to this video that you're [0:08] watching right now the only reason [0:11] videos are so accessible and so common [0:13] these days is because of something known [0:15] as video compression this means turning [0:18] one video source into a smaller one for [0:21] either easier video transfer or for [0:23] streaming over the internet so let's [0:26] take a look at the two most important [0:28] video compression standards currently in [0:30] use these are h.264 and the newer h.265 [0:34] standards we will look into how these [0:36] two standards work and more importantly [0:38] how do these two video compression [0:40] standards compare to each other whether [0:42] you are someone who likes to upload [0:44] nature walk videos onto the internet or [0:47] likes to stream video games on twitch [0:49] it's really interesting to understand [0:51] how video compression works hello [0:53] everyone this is mike from sabrin here [0:56] and if you enjoy tech videos and tech [0:57] related videos then make sure to hit [0:59] that subscribe button and hit that [1:01] notification bell so you get updated for [1:03] any future videos both h.264 and h.265 [1:07] are known as codex a codec is a piece of [1:10] software that can utilize hardware to [1:12] code video files during their creation [1:14] and also to decode the same type of [1:16] video for playback in fact the word [1:18] codec is a combination of the words code [1:21] and decode video compression codecs can [1:24] reduce the size of a video file by [1:26] essentially following a series of [1:28] program processes that allow a computer [1:30] system that is doing the video encoding [1:33] to squeeze the video data into smaller [1:36] file sizes without a substantial or [1:39] notable loss in quality in most cases [1:42] this is done by using a combination of [1:44] things like prediction and complex [1:46] algorithms video compression codecs like [1:49] h.264 and h.265 are used to compress raw [1:52] video data that can take up a lot of [1:54] space in your computer and then compress [1:57] it into more smaller and more manageable [2:00] file sizes for example let's say you [2:02] need to compress a video of yourself [2:03] talking to a camera with a simple static [2:06] background like this one just here now [2:08] the codec will determine that your [2:10] background isn't changing that [2:12] drastically as you're speaking so [2:14] instead of storing all of that real-time [2:17] information about your background the [2:19] codec will compress your background [2:21] information meaning that it will isolate [2:23] you from your background and only [2:25] keeping the data of the real-time [2:27] changes like of me moving my hands as [2:30] i'm speaking or for example the mouth as [2:32] i'm talking this is because your [2:34] background is static and there's no need [2:36] to keep all of that information as the [2:39] information is essentially repeating [2:41] itself throughout the video this is [2:42] obviously an over simplified way of [2:45] explaining how these codecs work but you [2:47] get the idea by using simple tricks you [2:50] can reduce the file sizes now let's look [2:53] at one of the most popular decompression [2:55] codec standards out there h.264 and its [2:58] newer and [3:00] arguably better sibling the h.265 video [3:02] standard h.264 is a well-known video [3:05] compression standard for high definition [3:07] video is also known as mpeg-4 part 10 [3:10] advanced video coding or mpeg-4 hevc for [3:14] short h.264 is an industry standard and [3:17] widely used in all kinds of video files [3:20] from recording to streaming and it's not [3:23] just used for videos and entertainment [3:25] h.264 is also widely used for things [3:27] like surveillance footage too h.264 is a [3:30] block orientated compression standard it [3:32] works by compressing frames of the video [3:35] using a block orientated motion [3:37] compensated based video compression [3:39] standard those units are called macro [3:42] blocks macro blocks typically consists [3:45] of 16 by 16 pixel samples that can be [3:48] subdivided into transform blocks and may [3:52] be further subdivided into what are [3:54] known as prediction blocks this allows [3:56] h.264 to reduce the file size of the [3:58] video without compromising much on video [4:00] quality there are many video formats [4:03] that use h.264 compression standards two [4:06] of the most popular ones are dot mov and [4:09] dot mp4 formats formats themselves are [4:12] just digital file containers both of [4:15] these formats use ht64 to compress the [4:18] information in a video file dot mov is a [4:21] proprietary file format that was made by [4:23] apple to work exclusively with their [4:25] devices and mp4 is an international [4:28] standard for video files and a lot of [4:30] streaming and video platforms recommend [4:32] that you use this file format while mp4 [4:35] is more commonly used it is a more [4:38] compressed video file format and thus [4:40] comparing it to file formats like mov [4:43] mp4 does have a slight worsening in [4:46] quality h.265 on the other hand is the [4:48] newer video compression standard and [4:51] since it is the newer one it is also the [4:53] better video compression standard first [4:55] published in 2013 h.265 has yet to [4:58] become as widely used as h.264 but it is [5:02] catching up pretty fast according to the [5:04] video developers report of 2019 is the [5:07] second most commonly used video coding [5:09] standard after h.264 h.265 is also known [5:13] as high efficiency video coding or hevc [5:16] for short while h.264 uses macro blocks [5:19] h.265 processes information by using [5:22] something called coding 3 units or ctus [5:26] a macro block could span between 4x4 to [5:29] 16x16 block sizes ctus on the other hand [5:33] can process as many as 64 by 64 blocks [5:36] giving them the ability to compress [5:38] information more efficiently this means [5:40] that h.265 can retain more information [5:43] in a video after compression as compared [5:45] to h.264 h.265 is more advanced than [5:49] h.264 in several ways the main [5:52] difference is that hevc allows for [5:54] further reduction file sizes and [5:57] therefore reduce the required bandwidth [5:59] for your live streams or video [6:01] recordings what this means in the real [6:03] world is that when you're recording a [6:05] video or streaming of a video you can [6:08] actually stream at a much higher quality [6:10] by using the same if not actually [6:12] smaller file sizes than the h.264 file [6:15] format without getting too much into [6:17] things like bitrate and such h365 needs [6:20] less bitrate to store the same level of [6:22] information as compared to h.264 [6:25] basically put the higher the bitrate the [6:27] larger the video size so real world [6:29] example just to give you a comparison [6:32] the required bandwidth to stream 4k [6:34] video is around 32 megabits per second [6:37] for h.264 for h.265 it is just under 15 [6:41] megabits per second this essentially [6:43] means that the video can be recorded or [6:45] streamed at half the bitrate without [6:47] compromising on quality this also means [6:50] that when you are recording higher [6:53] quality video you can actually use lower [6:55] bit rates meaning that you can record [6:57] things like 8k video or even 6k video [7:00] using just an sd card whereas before you [7:03] would have had to have used more [7:04] expensive media types in addition to [7:07] cutting down file sizes even further [7:09] h.265 also has much better motion [7:12] compression and spatial prediction than [7:15] h.264 what this means is that you can [7:18] have a lot of stuff going on in the [7:19] video like this or more than that really [7:23] and you can still get away with running [7:25] a lower bit rate previously recording at [7:27] a lower bit rate meant that wherever [7:29] there was a lot of motion in the video [7:31] the quality of the video would become [7:33] worse this was because in a video with a [7:36] lot of movement and action going on [7:38] there is a lot more information that [7:40] needs to be captured but at a lower bit [7:42] rate there is only so much bandwidth to [7:44] go around this is why when you are [7:46] watching a live stream of action sports [7:48] for example and then suddenly there is a [7:50] lot of action on stream it looks like [7:52] the video quality has got worse almost [7:55] immediately with h.265 compression [7:57] standards this video would actually [7:59] perform much better so you might ask if [8:02] h.265 is so great and it's been around [8:05] for almost eight years why is h.264 [8:08] still more widely used around the world [8:10] well the answer is pretty simple h.265 [8:14] requires significantly more computing [8:16] power when the video is viewed edited [8:18] and even played back the fact is is that [8:21] this is a huge barrier to entry for a [8:24] lot of people and industries however we [8:26] are seeing more and more devices with [8:29] special h.265 encoders and decoder chips [8:32] to handle this kind of codec meaning [8:34] that processors can basically be less [8:36] powerful making it easier and cheaper to [8:39] implement h.265 encoding and decoding [8:42] just a decade ago you would have had to [8:43] take out a loan to get your hands on a [8:45] 4k camera and a tv to play on but today [8:49] almost every phone has the ability to [8:51] record and play back this footage and it [8:53] won't be long until 6 and 8k video will [8:56] become the norm with h.265 as well [8:58] becoming the norm but that's it for [9:00] today's video if you've enjoyed it then [9:02] please make sure to hit that like button [9:03] and if you're new here make sure to hit [9:05] that subscribe button and notification [9:07] bell so you stay updated on all our [9:09] future videos anyway we'll see you in [9:11] the next one [9:12] bye [9:20] [Music] [9:26] you