How are Images Compressed? [46MB ↘↘ 4.07MB] JPEG In Depth

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 พ.ค. 2024
  • Go to brilliant.org/BranchEducation/ to sign up for free, and expand your knowledge. The first 200 people will get 20% off their annual premium membership.
    You've probably saved 1000s of JPEG images, but do you know what exactly JPEG does? Our smartphones and cameras save images in JPEG format, furthermore, the majority of images you see on the internet are saved using JPEG compression. This format is everywhere, but do you know exactly how it works? Well in this video we're going to explore the JPEG compression format. This is a rather complicated video, so it may take watching it a few times through to understand it all.
    Do you want to support in-depth engineering and technology education? Support us on: / brancheducation
    Website: www.branch.education
    On Facebook: / brancheducation
    On Twitter: / teddytablante
    On Insta: / brancheducation
    Or Join us on TH-cam Memberships: / @brancheducation
    Script, Modeling, Animation: Teddy Tablante
    Twitter: @teddytablante
    Voice Over- Phil Lee
    Nature Photography- Tobias Karlsson
    Table of Contents:
    00:00 - Intro into JPEG
    01:24 - What does JPEG do?
    02:35 - What are the Steps of JPEG?
    04:06 - Color Space Conversion
    06:06 - Discrete Cosine Transform
    09:32 - Quantization
    11:02- Run Length and Huffman Encoding
    12:04 - H.264 Video Compression
    13:25 - Rebuilding an Image
    15:01 - Notes and Caveats on JPEG
    17:06 - Sponsored by Brilliant
    18:20 - Outro
    Key Branches from this video are: How does a Camera Work? How do SSDs Work?
    Erratum:
    Tulips are not the same as Lillies.
    Animation built using Blender 3.0.0 www.blender.org/
    Post with Adobe Premiere Pro
    References:
    A Trip Through the Graphics Pipeline 2011: Index
    fgiesen.wordpress.com/2011/07...
    DCT (Discrete Cosine Transform)
    asecuritysite.com/comms/dct2
    H.264 is Magic
    sidbala.com/h-264-is-magic/
    How JPEG Works
    cgjennings.ca/articles/jpeg-c...
    Jack, Keith. Video Demystified. Fifth Edition. Elsevier 2007.
    JPEG 101 - How does JPEG Work?
    arjunsreedharan.org/post/1460...
    JPEG: Image Compression Algorithm
    pi.math.cornell.edu/~web6140/T...
    What is H.264?
    www.streamingmedia.com/Articl...
    Wikipedia contributors. "Chroma Subsampling", "Chrominance", "Chroma Subsampling", "Discrete Cosine Transform", , "JPEG" , "
    Wikipedia, The Free Encyclopedia. Wikipedia, The Free Encyclopedia, Visited December, 2021
    Music Credits
    Kindred
    #JPEG #Camera #Picture

ความคิดเห็น • 2K

  • @jontrout2010
    @jontrout2010 2 ปีที่แล้ว +4596

    It never ceases to amaze me how much computation goes into things we take for granted and how inconceivably fast it happens over and over again...

    • @xeridea
      @xeridea 2 ปีที่แล้ว +111

      Still images are fairly easy, the compression is relatively simple. Video is a lot harder to do quickly in software, especially compression, which is much slower. Computers, and especially smartphones have ASICs (Application Specific Integrated Circuit), to do it much more efficiently. Instead of general purpose CPU doing it, a circuit that is hardwired to do exactly one thing is used, offering massive efficiency gains, which are absolutely critical for use in low power devices. Software is more flexible, and tends to be able to get higher compression, or better quality for the same compression, at the expense of processing time and power usage.

    • @rockraphlegal
      @rockraphlegal 2 ปีที่แล้ว +19

      What amazes me the most to this day is how we can have phonecalls moving at high speeds without an issue. It's like, how fast does it really happens??

    • @GreenDriveIndia
      @GreenDriveIndia 2 ปีที่แล้ว +6

      @@rockraphlegal that's where processing power matter, that's why some chips are better in image Manipulation wrt to other

    • @weizhen77
      @weizhen77 2 ปีที่แล้ว +19

      No need to be amazed. Just take a simple can of soda, the time and efforts it took takes years to come out with today's design.

    • @jontrout2010
      @jontrout2010 2 ปีที่แล้ว +8

      @@weizhen77 that too amazes me :P

  • @ffk1466
    @ffk1466 2 ปีที่แล้ว +2597

    This channel is researching and (perfectly) presenting exactly what you think in your spare time

    • @dongekon199
      @dongekon199 2 ปีที่แล้ว +4

      You are extremely right!

    • @RyoukenJake
      @RyoukenJake 2 ปีที่แล้ว +5

      Ohhhh so this is where our google data goes!

    • @NovaBny
      @NovaBny 2 ปีที่แล้ว +1

      @@sifanikalsa9790 88

    • @Cooliofamily
      @Cooliofamily 2 ปีที่แล้ว

      @@sifanikalsa9790 damn this is hot

    • @barbecue1617
      @barbecue1617 2 ปีที่แล้ว +1

      th-cam.com/video/fx6jtJrvJzU/w-d-xo.html

  • @microcolonel
    @microcolonel 2 ปีที่แล้ว +565

    As somebody who has worked on JPEG implementations, I am still amazed by how perfect they got it on the first try. JPEG has been around for ages, and is still so good; only recently have meaningful replacements emerged, and JPEG still has some benefits over these.

    • @eduardmart1237
      @eduardmart1237 2 ปีที่แล้ว +11

      What is this replacement?

    • @allkillhon5209
      @allkillhon5209 2 ปีที่แล้ว +18

      @@eduardmart1237 webp maybe ?

    • @SomeRandomPiggo
      @SomeRandomPiggo 2 ปีที่แล้ว +40

      @@allkillhon5209 avif is good too, although not widely supported yet. webp is much better than jpeg, don't really know why it hasn't been adopted widely yet

    • @SomeRandomPiggo
      @SomeRandomPiggo ปีที่แล้ว +7

      @@zxbryc JXL is definitely very interesting, although I don't know too much about it. I just think with rising performance in almost everything, and hardware decoders for AV1 & AVIF in new phones it might be a viable option in the future, for fast image loading on bad mobile connections for example

    • @Mic_Glow
      @Mic_Glow ปีที่แล้ว +60

      webp is trash though.... not much advantage vs jpeg and lots of compability issues. Instances when a site uses webp for own images but doesn't allow webp image upload is annoying. Windows can't open it out of the box, PS needs a plugin.... And that despite the format being out for 12 years
      10% better compression might have been nice 10-15 years ago, today people have 100mb/s in their phones and gigabit via fiber, whether an image takes 1mb or 1.1mb doesn't make any difference.

  • @levonja
    @levonja 2 ปีที่แล้ว +150

    Up until now, I just thought JPEG lumps some similar colours together to save on file size. This was literally eye-opening. What an algorhythm!

    • @lolerie
      @lolerie 2 ปีที่แล้ว +11

      That is like 5% of it. There is alogoritmoc coding, and other things.

    • @larsjonasson2959
      @larsjonasson2959 ปีที่แล้ว +12

      You were probably confusing it with the GIF format. It stores images with a limited palette so the numbers of colours in each imge is reduced. But unlike JPEG it allows transparency and animation, so despite the greater file size it was popular on the early web.

    • @plashplash-fg6hd
      @plashplash-fg6hd ปีที่แล้ว +2

      Tbh, I didn’t even know JPEGs were compressed.

    • @Micro-Moo
      @Micro-Moo ปีที่แล้ว +2

      @@plashplash-fg6hd Moreover, JPEG is not just the image format, it is a compression algorithm. For example, one can use it in TIFF images. Damn, what obsolete trash! And it was obsolete trash already at the time of this publication.

    • @plashplash-fg6hd
      @plashplash-fg6hd ปีที่แล้ว +1

      @@Micro-Moo Never knew that.

  • @ariyagozlo7983
    @ariyagozlo7983 2 ปีที่แล้ว +264

    as someone whos on youtube a lot, these still manage to be some of the best videos. The research, editing, the pace of the lesson. Thank you guys for the hard work

  • @DerpyNetworking
    @DerpyNetworking 2 ปีที่แล้ว +1096

    You cover topics that I've always wanted to know and in the right amount of detail.🥰

    • @Kynatosh
      @Kynatosh 2 ปีที่แล้ว +4

      Not compressed too much ;)

    • @crewrangergaming9582
      @crewrangergaming9582 2 ปีที่แล้ว

      true that

    • @itzhexen0
      @itzhexen0 2 ปีที่แล้ว

      The perfect reason to cancel all school loans. If youtube is going to tell everyone everything for free. You do know one day there won't be a pandemic right or a bunch of chaos coming from trump and his followers right? One day. You're just going to be competing with everyone who knows the same crap as you.

    • @anshik.k.t
      @anshik.k.t 2 ปีที่แล้ว

      Exactly so relatable for me

    • @shegerketema6622
      @shegerketema6622 2 ปีที่แล้ว

      YES SIR

  • @AA-bd
    @AA-bd 3 หลายเดือนก่อน +1

    It's truly impressive how you managed to explain these complex processes in less than 20 minutes! The clarity and conciseness of your explanations made understanding these concepts much easier. Thank you!

  • @TheDarrenJones
    @TheDarrenJones ปีที่แล้ว +4

    An absolute masterpiece of explanation. I've tried to understand how DCT works in JPEG before, and never understood the dry maths-only explanation. This video changed that and the image tables explained it perfectly. Thanks for filling in a gap that's been in my head for many years!

  • @iamtheusualguy2611
    @iamtheusualguy2611 2 ปีที่แล้ว +463

    I have a degree in computer science and I'm still amazed how good your channel is! Always wondered how JPEG compression worked. You have illustrated it in super simple terms and visualizations have as always been awesome! Happy to see more content like that, maybe more details on H.264.

    • @kangarht
      @kangarht 2 ปีที่แล้ว +4

      lol I dont have a degree, but I already knew this.

    • @m.moonsie
      @m.moonsie 2 ปีที่แล้ว +34

      @@kangarht good for you

    • @pedor5965
      @pedor5965 2 ปีที่แล้ว +1

      @@m.moonsie you look happy and healthy, not me, if you ever cared to aaask

    • @TheFourthWinchester
      @TheFourthWinchester 2 ปีที่แล้ว +6

      Having a degree means nothing though. It doesn't guarantee that you know even a tenth of what's there in your own field.

    • @rrrr2150
      @rrrr2150 2 ปีที่แล้ว +1

      @@pedor5965 lol

  • @abbottabbott1120
    @abbottabbott1120 2 ปีที่แล้ว +119

    There's just nothing like these videos, really. I'm blown away every time. The voice-over and writing are just so far beyond anything else out there. I wish all information could be presented in this calm, clear, and concise manner than also somehow manages to never dumb it down.

    • @YszapHun
      @YszapHun 2 ปีที่แล้ว +11

      you mean his compression algorithm is pretty good?

    • @ck-dl4to
      @ck-dl4to 3 หลายเดือนก่อน

      dumb ​@@YszapHun

  • @robfitzsimmons8003
    @robfitzsimmons8003 ปีที่แล้ว +7

    Great explanation on JPEG. I knew it compressed in blocks, and I vaguely knew it averaged color, but seeing this level of detail is amazing. Well done!

  • @mikeogden6655
    @mikeogden6655 ปีที่แล้ว +2

    I never thought that there was so much computing behind each image. I am truly humbled by your work team. Thanks!

  • @anderson_maciel
    @anderson_maciel 2 ปีที่แล้ว +17

    18 minutes to teach us what our smartphones does in miliseconds. Awesome!

    • @lucasrem1870
      @lucasrem1870 2 ปีที่แล้ว

      You sould try CPU! post video!

  • @Slettador
    @Slettador 2 ปีที่แล้ว +740

    Great Video, just a little feedback on chroma subsampling: The reason why the human eye can perceive more luminance resolution than chroma isn't because of the number of rods vs cones. The rods are actually inactive in all but the darkest lit environments, and their density in the fovea i.e. the center of the visual field on the retina is actually rather low. So the RGB cone cells are solely responsible for tristimulus color vision.
    The actual reason for the color resolution difference is because there is some amount of cell level processing happening in the eye before the signal reaches the visual nerve. This is very much analogous to the Lightness chroma separation done in digital images. Also, there is some correlation between spatial resolution of each of the red, green and blue cones in terms of the lightness but little correlation between them in terms of the color. Those effects together cause the lower chroma resolution of the human visual system.

    • @k3d4rcodes45
      @k3d4rcodes45 2 ปีที่แล้ว +8

      Thanks for your input

    • @blackpepper2610
      @blackpepper2610 2 ปีที่แล้ว +1

      No

    • @Slettador
      @Slettador 2 ปีที่แล้ว +18

      @@blackpepper2610 What are you saying?

    • @gaurdein
      @gaurdein 2 ปีที่แล้ว +31

      "..actually inactive in all but the darkest lit environments, and their density in the fovea i.e. the center of the visual field on the retina is actually rather low." So that's why when I am in dark I see some very dimly lit stuff more clearly when not looking directly at it, but the moment I move my vision towards it, it disappears?

    • @Neteruk
      @Neteruk 2 ปีที่แล้ว +3

      What's the likelyhood of having hexastimulus color vision...like prawns...but in humans. Is it possible to design a baby capable of this?

  • @Drag0nStorm1
    @Drag0nStorm1 2 ปีที่แล้ว +1

    really love the little details, the secondary animations in each text header for each step in compression being unique to that compression technique itself.
    praise your mograph artist/animator/editor!

  • @Zveebo
    @Zveebo ปีที่แล้ว +1

    The is the best and clearest explanation of JPEG compression that I have seen anywhere - great job!

  • @Adrian-nq2bp
    @Adrian-nq2bp 2 ปีที่แล้ว +42

    It is incredible how complex things that we take for granted on a daily basis can be

    • @temp50
      @temp50 2 ปีที่แล้ว +11

      And this is the reason why religions are accepted and exists in the first place.
      Because it is more convenient for a LOT of people to think about complex topics as 'magic' and 'just works'...

    • @nickwilson3499
      @nickwilson3499 2 ปีที่แล้ว +2

      @@temp50 I don’t think any religion says that

    • @noobestofdamall
      @noobestofdamall 2 ปีที่แล้ว +8

      @@nickwilson3499 They don't say anything meaningful anyway.

  • @rahulkumarbsf
    @rahulkumarbsf 2 ปีที่แล้ว +13

    One of the best educational channels on TH-cam!

  • @Dayta
    @Dayta 2 ปีที่แล้ว +6

    usualy videos like this claim to explain something but they just talk about it and dont explain anything .... but THIS video does actualy explain the techniques behind it i love it ... those vids are rare and hard to find .thank you for all the work you put into this

  • @absence9443
    @absence9443 2 ปีที่แล้ว +1

    This channel is a treasure to preserve, it covers modern and intriguing topics that are both mesmerizing and reaching for curiosity in technological mindsets, I love it.

  • @joachim2464
    @joachim2464 2 ปีที่แล้ว +166

    Another factor that compression works so well is that your brain all the time fills in the «gaps» in information. Especially when watching video. Our eyes is actually worse than you think. The brain does a huge amount of work filling in various gaps in information. For example each of our eyes has a blind spot. We usually do not see it since the brain erases it and fills in the missing information

    • @prateekpanwar646
      @prateekpanwar646 2 ปีที่แล้ว +32

      We have built in image upscaler.

    • @spider853
      @spider853 2 ปีที่แล้ว +15

      @@prateekpanwar646 with great edge detection neuron layer 😁

    • @markjacobs1086
      @markjacobs1086 2 ปีที่แล้ว +21

      It also combines 2 separate images with slightly different angles into 1 👀

    • @NKY5223
      @NKY5223 2 ปีที่แล้ว

      @@markjacobs1086 like 3d glasses but free

    • @snoudoubts1745
      @snoudoubts1745 2 ปีที่แล้ว

      Is there anybody in this world I can trust?

  • @vgfxworks
    @vgfxworks 2 ปีที่แล้ว +14

    Since the very 1st video I watched, this channel is one of a very few that I clicked the bell button without even thinking twice, each subject is presented with great clarity, beautifully illustrated and great narration as well. well planned, edited and organized by key topics.

  • @Stripcherry3
    @Stripcherry3 ปีที่แล้ว +3

    As someone who has studied image and video compression at university, I can say this is a GREAT video and it's spot on. It explains the basics in just the right amount of detail to get a general understanding. Would have helped me a lot in the beginning.

    • @pajeetsingh
      @pajeetsingh 3 วันที่ผ่านมา

      Any book to recommend?

  • @douglas2lee929
    @douglas2lee929 ปีที่แล้ว +13

    my brain hurts

  • @ZheHongGuo
    @ZheHongGuo 2 ปีที่แล้ว +5

    I never thought I can understand the basic of JPEG algorithm in less than 20 minutes.
    Brilliant video!

  • @alessioulivi6734
    @alessioulivi6734 2 ปีที่แล้ว +7

    Every time I remain surprised by the amount of quality and work behind your videos, wow

  • @Dukenukem
    @Dukenukem 2 ปีที่แล้ว +7

    "Can you see the difference?" - Actually not, the video is compressed as well

  • @imranq9241
    @imranq9241 2 ปีที่แล้ว

    Wow how have I not discovered this channel before. The production values are off the charts !!

  • @kencarp57
    @kencarp57 2 ปีที่แล้ว +71

    Your videos are SPECTACULAR! It's obvious that you put a lot of work into them, and it shows. You seem to intuitively know how to achieve the perfect balance of technical detail and higher-level concepts to enable the viewer to develop a solid overall understanding of the subject matter. THANK YOU!

  • @johelsen5776
    @johelsen5776 2 ปีที่แล้ว +124

    This is... AMAZING. It's probably almost impossible to explain this even just marginally better. The amount of well-considered effort you go through to make things more clear is extremely impressive. Subbed!

  • @spider853
    @spider853 2 ปีที่แล้ว

    Been through multiple articles and videos about JPEG compression, I must say this is one of the best!

  • @rutvijtrikmani7541
    @rutvijtrikmani7541 2 ปีที่แล้ว

    Underrated Chanel, this channel has everything you would like to know with details, good content. Keep going 👍🏻

  • @StreetComp
    @StreetComp 2 ปีที่แล้ว +8

    Even though I always knew the basic idea behind compression this video finally gave me some real understanding - well done for a very complex subject

  • @Diegomarvid
    @Diegomarvid 2 ปีที่แล้ว +7

    Fantastic video, as an electronics engineer its pretty amazing to see topics such as frequency response being used everyday in our lifes

  • @unknownplayer8397
    @unknownplayer8397 หลายเดือนก่อน

    I watched so many of your videos but this jpeg algorithm for image compression is so complicated that no one can understand in first time but you are amazing

  • @porsuwannashom1715
    @porsuwannashom1715 ปีที่แล้ว +1

    I'm mechanical engineer.
    I've learn fourier transform since Bachler degree , one of the most unintuitive subject in my opinion...
    And this video, i think this is one of the most intuitive way to explain "DCT" discrete cosine transform.
    Great work !

  • @victorboechat5370
    @victorboechat5370 2 ปีที่แล้ว +8

    I love this channel! Super informative, great presentation and one with the best content in TH-cam. Thanks for making those videos and please keep up the good work!

  • @surajvkothari
    @surajvkothari 2 ปีที่แล้ว +33

    I am amazed by the 3D transitions between different 2D text/diagram sections. This form of presenting learning feels closer to learning in VR. I wonder if one day this channel will create VR episodes which we can move around in. Great delivery of a new way of learning!

  • @azharcassim2795
    @azharcassim2795 ปีที่แล้ว

    Came across your channel this week. Must say that your explanations are exceptional in the sense that they convey technical details very clearly and also very quickly grab the attention of the viewer. Exceptional i tell you. Keep it up. You should he used as the benchmark for teachers and lecturers all around the world.

  • @NeilRoy
    @NeilRoy 2 ปีที่แล้ว +1

    Fascinating stuff. I still remember when JPEGs first came out and waiting for my DOS machine to encode and decode them. It took some time back then and not so instant as it is today. I think the two file formats that made the biggest impact in sizes that I recall in my life were JPEGs and MP3s.

  • @d4lCngs
    @d4lCngs 2 ปีที่แล้ว +18

    Amazing video as always!! The detail of explanation is precise and technically correct. I think that, once understood how JPEG works, MPEG should be not very difficult to understand.
    If you plan on doing videos about electric engineering topics, I'd love to see a video about OFDM access, and how it is used in 4G for letting hundreds of users connect at the same time at an e-Node B. Can't wait for the next video though!

  • @Abhi00111
    @Abhi00111 2 ปีที่แล้ว +7

    The amount of efforts you are putting in your video is amazing

  • @anthonysaunders345
    @anthonysaunders345 ปีที่แล้ว

    Digital imagery takes up a great deal of my time for what I do, and I know from practice what file formats and compression do, but I never really looked into how they work. Thank you!

  • @frien_d
    @frien_d 2 ปีที่แล้ว +5

    I'm a programmer and I've never bothered deep diving into jpeg, always treating it like some kind of magic.
    This just cleared my mind on everything about it in less than 10 minutes. I can now explain it to people, and it's almost worrying how fast this went.
    Damn, you're good.

  • @CrashCarson14
    @CrashCarson14 2 ปีที่แล้ว +3

    WOW this is so detailed! So much more information than most videos will tell you. Down to a fundamental level, not just “it works better”. Thanks! I’ve been interested in how video/pictures are compressed

  • @yenchey3270
    @yenchey3270 2 ปีที่แล้ว +24

    Ah, JPEG. The greatest friend of a web designer, the worst enemy of a digital artist.

    • @Mic_Glow
      @Mic_Glow ปีที่แล้ว +2

      webp is worse... XD
      or fake-transparent png's

    • @DarkGladiator
      @DarkGladiator ปีที่แล้ว

      @@Mic_Glow omg I really hate those types of pngs like why just why

    • @erikziak1249
      @erikziak1249 11 หลายเดือนก่อน

      The worst enemy of a photographer who is asked to post-process jpeg images from cell phones and make them look as if the scene was taken with a DSLR with a proper lens and saved as RAW data. A nightmare.

  • @riddleraryan
    @riddleraryan 2 ปีที่แล้ว +1

    I am really amazed by the research and hard work you put into making this video. Subscribed !!

  • @davidkennedy9794
    @davidkennedy9794 2 ปีที่แล้ว +3

    I'm a photographer and I always wanted to know this. I didn't understand anything. But great video. One day I will watch it again. Hopefully I will, then, understand it.

  • @redakaafarani2289
    @redakaafarani2289 2 ปีที่แล้ว +56

    Great video, I basically knew everything as my research is in video compression, I love the fact that he said video compression is extremely complex while giving an example of H.264, which is quite old now, it's still the most used for sure, but the newest codec VVC (versatile video coding) is times more complex than even HEVC which is newer than H.264, my work is in VVC, believe me it's a nightmare, don't take the videos you watch on the internet for granted ;)

    • @AdrienBurg
      @AdrienBurg 2 ปีที่แล้ว +7

      I am curious to learn about the potential of the new codecs to be developed. I tried some google search but it looks difficult to find understandable source of information. Do you have any recommendations to start with ?

    • @TheDoomerBlox
      @TheDoomerBlox 2 ปีที่แล้ว +2

      Used to be I followed these things out of curiosity - where does one do that now? 🤔

    • @sgbench
      @sgbench 2 ปีที่แล้ว +4

      Interesting, I hadn't heard about VVC until now. As the successor to HEVC, which competes mostly with VP9, is VVC seen as a competitor to AV1 (since AV1 is the successor to VP9)?

    • @barbecue1617
      @barbecue1617 2 ปีที่แล้ว

      th-cam.com/video/fx6jtJrvJzU/w-d-xo.html

    • @achtsekundenfurz7876
      @achtsekundenfurz7876 2 ปีที่แล้ว

      @@barbecue1617 th-cam.com/video/dQw4w9WgXcQ/w-d-xo.html

  • @Tristoo
    @Tristoo 2 ปีที่แล้ว +8

    and they say perfection isn't achievable.
    this is an honestly amazing video and now I'm going to write a jpg parser and decompressor just for fun because you made it.
    I also do embedded development, and a microprocessor I was working with had hardware jpg decoding - yet I never really thought it could be something this simple because when I googled it all these complicated terms came up. I didn't stop to think that hardware implementation are usually only feasible with simple algorithms. but now I'll know better in the future
    I've also been aching to implement h.264 decoding on an fpga for direct network playback (so I don't need a nasty closed source firmware raspberry pi to do it), so I can't wait for that video too! I've been trying to read up on the subject but good resources are essentially non-existent. this video alone already helped me a lot in that regard, so even if you only release the h264 one in a few months and I'm done with at least a simple software implementation by then - I'll still watch it just because your videos are great, and much of that will still be owed to this very video right here.
    thank you!!!

    • @JimBob1937
      @JimBob1937 2 ปีที่แล้ว +1

      " I didn't stop to think that hardware implementation are usually only feasible with simple algorithms."
      Any algorithm can be implemented in hardware (chip/transistor level), simple or complex. Logic gate structures can form turing complete computation, just the same as the general processors that use them. This also can drastically speedup the computation due to less clock cycles for the same task (no overhead for instruction sets and less data shuffling).

    • @JimBob1937
      @JimBob1937 2 ปีที่แล้ว

      Still had my window up and figured I'd clarify another thing:
      "yet I never really thought it could be something this simple because when I googled it all these complicated terms came up."
      The actual implementation is much more complex than this video lets on. It's an excellent video for a general overview, but he skips through pretty much all of the math and even gets a few things wrong (like misusing the term 'vector' when discussing issues with Jpeg compressing a raster... but vector is entirely orthogonal to raster). The actual implementation deals with the math of fourier series and fourier transform, whereby an arbitrary signal can be represented by a summed series of cosine (and sine for complex) signals with a specific amplitude coefficient and phase. If you write a Jpeg parser, it would likely be beneficial to understand this math, though you can probably implement the algorithm without understanding it, just by running through the format documentation.
      As for the h.264, I'd be surprised if there isn't already an FPGA implementation of that floating around out there. However, it is licensed, so maybe they're protective of direct implementations just floating around, not sure.

  • @Viki-zo1bc
    @Viki-zo1bc 29 วันที่ผ่านมา +1

    Mind-boggling amount of work goes into things we take for granted!

  • @theelephantintheroom69
    @theelephantintheroom69 2 ปีที่แล้ว

    Lol I just got shown this random channel with great quality narration, animation and explanation. Subscribed

  • @BluishGreenPro
    @BluishGreenPro 2 ปีที่แล้ว +6

    Phenomenally well explained as usual!

  • @paranoiia8
    @paranoiia8 2 ปีที่แล้ว +49

    Nice, love details and simplicity in explanation of how it work.
    Small tip for far future video idea: accelerometers and gyro/magnetic sensors.... I always loved to read on how they managed to make those sensors.

    • @sierra991
      @sierra991 2 ปีที่แล้ว

      I think they have like 2 pieces of metal that change resistance based off the orientation. not sure tho I just remember reading that somewhere

    • @paranoiia8
      @paranoiia8 2 ปีที่แล้ว +1

      @@sierra991 It actually use MEMS in scale like one or two µm that is insane(as most of stuff that is in nano scale) but in that small scale it need to be super accurate and still robust.
      Its just mind blowing that we managed to create few atom size transistors for eg SSD or OLED screens but mechanical components is just another level as its need to move in very specific way and best part is that MEMS technology is "low-cost"... its easier to make than grow damn tomato plant -_-

  • @guyfawkes9720
    @guyfawkes9720 ปีที่แล้ว +1

    Beautiful video! Great transitions, intuitive and relaxing

  • @Pasce1998
    @Pasce1998 2 ปีที่แล้ว +1

    I've just seen the video and realized that you released the video just two days after I submitted my bachelor thesis about forensic jpeg algorithms :D Would have been great to have these visualizations back then but nonetheless great and simple explanation with really good animations!

  • @RickTrajan
    @RickTrajan 2 ปีที่แล้ว +3

    I was wondering why I was subscribed to this channel then after a minute in I remembered how well the bluetooth explanation you(your team) have made. Thanks, the explanation is topnotch (imo of course) but there were few graphical error and some color selection could have been better.

  • @strangeWaters
    @strangeWaters 2 ปีที่แล้ว +5

    Good thing to emphasize about the dct is that it's also reversible -- you get the same amount of information out as you put in, just arranged in a different way. (I explain this to myself by noticing that the frequency samples are all linearly independent -- none of them can be added to each other to make a third, no redundancy -- so you've switched from one 8x8 block of data to another 8x8 block of data.) This sort of thing (fourier transforms and cousins) are super important for signal processing

  • @ReneHoffmann194
    @ReneHoffmann194 ปีที่แล้ว

    Incredibly well explained and visualized. Thank you so much!
    I like the slower pace because it helps me to understand/think through what you say (but I'm no native speaker).

  • @DaedalusYoung
    @DaedalusYoung 2 ปีที่แล้ว +113

    16:28 Well, vector images are a different beast altogether. They aren't rasterised, so _any_ bitmapping format will result in quality loss, even bmp and png. Vectors are made to be scaled and work by having nodes and lines that make up the image.
    Instead, what you probably meant, was that jpg doesn't perform well on digital images, such as pixel art, or anything with sharp contrast, such as text overlaying on any other image.
    Jpg also isn't preferred when working with intermediate copies. If you have a photo that you want to use in a video, for example, where it may undergo additional colour grading, you do not want to use a jpg image. This is because any additional grading can highlight artefacts, and because the image would be compressed twice; once by the jpg algorithm and again by the video compression.

    • @thedeathcake
      @thedeathcake 2 ปีที่แล้ว +6

      I think he might have meant when saving a vector image to a bitmap format, to retain alpha.

    • @LucienHughes
      @LucienHughes 2 ปีที่แล้ว +7

      I think what he meant was that when rasterising a vector graphic (which you literally have to do to view one) JPEG is a bad choice.

    • @DaedalusYoung
      @DaedalusYoung 2 ปีที่แล้ว +4

      @@LucienHughes Yeah, but any format is a bad choice for saving vectors, except for vector formats.
      You rasterise it for viewing (unless you use a vector display, like an analog oscilloscope), but you can still scale it without losing detail. You can't do that with a bitmapped format, not even png.

    • @SerBallister
      @SerBallister 2 ปีที่แล้ว +3

      @@DaedalusYoung Distance fields are an interesting compromise between vectors and bitmaps. Some game developers use that for fonts for example.

    • @zugo-tg7125
      @zugo-tg7125 2 ปีที่แล้ว

      How about TIFF?

  • @Kapil__Lanjewar
    @Kapil__Lanjewar 2 ปีที่แล้ว +5

    You can clearly see those artifacts in H.264 compression in an MKBHD video where he re-uploaded the same video for 1000 times.👍

  • @mikaericson726
    @mikaericson726 2 ปีที่แล้ว +7

    JPEG stands for “Joint Photographic Experts Group”. It's a standard image format for containing lossy and compressed image data.

    • @lucasrem1870
      @lucasrem1870 2 ปีที่แล้ว +1

      We needed an open standard, the CompuServe GIF Image Format was dominant, PNG for professional use and for reviewing only JPG

    • @moczikgabor
      @moczikgabor หลายเดือนก่อน

      @@lucasrem1870PNG and JPG are two very different kinds of compression, and as such, good for very different things.
      PNG is a lossless compression which deals the best with "blocky" images, i.e. where there are a bunch of consecutive pixels with the exact same color adjacent to each other. This is, for example, includes (rendered) text or (vector, engineerinng) drawing on solid color background, or similar ideas. These can be compressed to very small sizes with PNG without any artifacts, while the JPG-compressed counterpart will be worse in quality and most of the cases even bigger in file size (than the PNG version).
      However, compressing natural images where there are a lot of color gradients and edges, while it is possible with PNG, it is rather "encapsulation" and not really compression, as the file size will not be meaningfully smaller in most of the cases. This is the territory where JPG is better, provided that you are okay with it's lossy nature.

  • @ECRAGUNATHP
    @ECRAGUNATHP 2 หลายเดือนก่อน

    Hey really thanks man! I was tod to take a seminar for mpeg conversion even though I saw many articles in Wikipedia and watched many videos I can't able to understand but your video about jpeg conversion have given me enough knowledge to explain the concept of mpeg conversion

  • @thephoenixking1086
    @thephoenixking1086 ปีที่แล้ว

    I was expecting a normal TH-cam video that rushes through everything and makes no sense, but wow was I wrong, these videos are easily understandable yet also really in depth.

  • @ikannunaplays
    @ikannunaplays 2 ปีที่แล้ว +5

    I remember when JPEG first came into existence and it would take forever to compress and decompress that you would see the image go from a pixely mess into a nice image. This was the only format of image shared across BBS's over dialup, that and GIF. Bitmaps (BMP's) could be found rarely but it would take a decade to download. This by far is the most handy format for quickly sharing images.

    • @Oshroth
      @Oshroth ปีที่แล้ว +3

      JPEGs going from a pixely mess to the proper image is because the image is a Progressive JPEG and not a Baseline JPEG.
      Baseline JPEGs are displayed line by line as they are downloaded while Progressive JPEGs contain a number of Level of Detail versions of the image. Progressive JPEGs will load and display the lowest LoD, and then when a higher LoD has finished downloading, it will switch to it, and it does this switching through the higher LoD images until the proper image is downloaded and displayed. Progressive JPEGs are larger than Baseline JPEGs because of the additional LoD images.

    • @ikannunaplays
      @ikannunaplays ปีที่แล้ว +2

      @@Oshroth Yes. The many LOD's were useful over slower connections as they showed you roughly what the image was quickly so you can make a choice without having to wait for the full image to load. This was back when browsing a webpage was faster cause they optimized it for speedy loading of the text and progressive loading of images.

  • @zzco
    @zzco 2 ปีที่แล้ว +7

    Also, you should take a super deep-dive into how Laserdisc works. I get the basics of it, but still would be nice to dig into the actual nuts and bolts of the format. :D

  • @Agnostic_Mind
    @Agnostic_Mind 3 หลายเดือนก่อน

    I just came here to say I perfectly understood how JPEG works from thumbnail . I love you branch education so high class

  • @DanielM111
    @DanielM111 2 ปีที่แล้ว

    I haven't had my mind blown like this in quite a while.
    Partially also because of the fantastic presentation.

  • @TheExileFox
    @TheExileFox 2 ปีที่แล้ว +68

    This video is great and I would really like to see a follow up video for another popular image format called PNG, which is orders of magnitudes better than JPEG for vector images. The reason being that it is so widely supported while having other strengths and weaknesses compared to JPEG.

    • @pinakadhara7650
      @pinakadhara7650 2 ปีที่แล้ว +13

      Yes. A similar video on PNG would be great!

    • @BigOlSmellyFlashlight
      @BigOlSmellyFlashlight 2 ปีที่แล้ว +1

      run length encoding

    • @ztl6711
      @ztl6711 2 ปีที่แล้ว

      more widely supported but blur

    • @joshix833
      @joshix833 2 ปีที่แล้ว +15

      png is a raster image format and not a vector image format. svg is a vector image format.

    • @marro643
      @marro643 2 ปีที่แล้ว +3

      @@joshix833 But for being a raster format, it's fantastic at compressing vector-type images. No compression artifacts, and incredibly small file sizes

  • @johnwellbelove148
    @johnwellbelove148 ปีที่แล้ว +9

    Back in the early 1990's I designed and worked on 'Slowscan' security systems over dialup modems.
    This was in the early days before the JPEG standard was published. We used our own Discrete Cosine Transform (DCT) based image compression, empirically tuned for the product's target usage. We actually used a hardware circuit to detect when an 8x8 block had changed enough to mark it as 'to be updated'. Due to the low processor computing power available at the time, the DCT was performed by an INMOS DCT/IDCT transform chip. The compression stage was left to the modem's built-in algorithm, such as V42bis.

    • @blocksrey
      @blocksrey ปีที่แล้ว +1

      Awesome history lesson, thank you for writing this.

    • @KrisFlix
      @KrisFlix 4 หลายเดือนก่อน

      That’s amazing… amazes me that humans created all this.

  • @alphabetagamma4142
    @alphabetagamma4142 2 ปีที่แล้ว

    I'm so glad that because of some great people out there, this channel exists.👏👏

  • @VorpalMethod
    @VorpalMethod 2 ปีที่แล้ว

    This is incredible. Easy like, easy subscribe. Time to go through your entire video history!

  • @PS4sos21
    @PS4sos21 2 ปีที่แล้ว +3

    Compression is amazing technology. I remember when the Surge 1 was been released. It was only 6gigs or so but the game was really large with many enemy types, a lot of music and many weapons and amour. I was wrecking my brain trying to figure out how in the world could they fit such a large game into such a small file size. I am still at a loss ist at how they did it. Even with this upload, it still feels like magic haha

  • @WigWoo1
    @WigWoo1 2 ปีที่แล้ว +89

    the JPG at the beginning has richer contrast and deeper colors

    • @jamesvogenthaler6501
      @jamesvogenthaler6501 2 ปีที่แล้ว +3

      Thank you! I was wondering if anyone else noticed this. It was so immediately apparent

    • @barbecue1617
      @barbecue1617 2 ปีที่แล้ว

      th-cam.com/video/fx6jtJrvJzU/w-d-xo.html

    • @thecommenter578
      @thecommenter578 2 ปีที่แล้ว +8

      to me, the compressed example looks more colorful and with more contrast. If anything, the uncompressed image has slightly better dynamic range in the shadows

    • @alecargnin
      @alecargnin 2 ปีที่แล้ว +2

      Câmeras when shoot jpg aply on algorithm saturation sharpening etc... Things that you would do to a raw file on a editing software

    • @teem9675
      @teem9675 2 ปีที่แล้ว

      no xD

  • @4n0nym0u5
    @4n0nym0u5 2 ปีที่แล้ว

    Quality oozes out of these videos. Thank you. Amazing work!

  • @jwh001
    @jwh001 6 หลายเดือนก่อน +1

    I like compressed photos. Every time I see such a small amount of data that can express such rich photo content, I feel very comfortable.❤

  • @ArduinoHocam
    @ArduinoHocam ปีที่แล้ว +2

    Those signal processing algorithms behind the scenes are amazing. Especially the transforms that have been taught in the colleagues should not be rely on the mathematical calculations, instead there should be more visual explanations like this. Amazing video by the way!

  • @davidjames1684
    @davidjames1684 2 ปีที่แล้ว +6

    I must say that 10:1 compression ratio using JPG is quite impressive. For special images that are easily prone to artifacting, I just use the highest quality setting and that pretty much does the "trick". It would have been nice had they included a lossless option in original JPG for people that want a mathematically identical representation of the original image, but 1/2 to 1/3rd the size of a 24 bit RGB image. So basically getting it down to the filzesize of 8 or 12 bit color, but still retaining the original 24 bit color information.

  • @heitortremor
    @heitortremor ปีที่แล้ว

    This video gives me flashbacks to my Digital Image Processing course. Man, I had a blast with this kind of stuff

  • @wdavis6814
    @wdavis6814 2 ปีที่แล้ว

    Learned to appreciate the engineering behind the jpeg today. Very cool stuff!

  • @mic08242000
    @mic08242000 2 ปีที่แล้ว +6

    as a person working with image processing, this is absolutely fascinating. Also, that is a great explanation of DCT!

  • @ArgumentumAdHominem
    @ArgumentumAdHominem 2 ปีที่แล้ว +5

    Great video! JPEG is actually significantly simpler than I thought, thanks to your explanation. Would be great to have a video outlook into machine-learning based methods and the future of compression.

  • @boredesmo9506
    @boredesmo9506 4 หลายเดือนก่อน

    incredible, I would never have thought that there is so much complexity behind a jpeg image

  • @nicoz4122
    @nicoz4122 2 ปีที่แล้ว

    Amazing content, as usual ! This channel is pure gold !

  • @krioshhh7384
    @krioshhh7384 2 ปีที่แล้ว +4

    I'm glad you mentioned Tom Scott when talking about Hoffman algorithm, I watched that video, and also the interframe compression that makes any confetti video look ugly😂

  • @YTChannel344
    @YTChannel344 2 ปีที่แล้ว +6

    Can't wait for the x264 and x265 video, how P (Prediction) frames, I (Intra Frames) and B (Bidirectional Frames), AQ-Mode, AQ-Strength, block-size, B-Pyramid, etc., options work, how well it compresses data and why sometimes x264/x265 compress dark scenes badly along with artifacts or why x265 tends to blur out certain scenes while failing to apply proper DCT and quantization to such scenes properly to try and do an effective job at the compression or blur without any perceptive detail loss (which I believe such codecs need improvement in such area). Really need in-depth research video on it for innovation of future technologies!

  • @gregorycharnnhielee5800
    @gregorycharnnhielee5800 ปีที่แล้ว

    உங்கள் மதிப்புமிக்க அறிவைப் பகிர்ந்தமைக்கு நன்றி.
    Thank you for sharing your valuable knowledge.

  • @ranjanadissanayaka5390
    @ranjanadissanayaka5390 5 หลายเดือนก่อน +1

    Wow I'm so happy and excited for this video... videos that give deep understanding like this are rare.

  • @otv9005
    @otv9005 2 ปีที่แล้ว +5

    Well put together and very structured. I'd be interested to know what caused the change in the audio quality on the voice over (example 7:44 / 7:46).

    • @Sukigu
      @Sukigu 2 ปีที่แล้ว

      Those parts were probably recorded at a separate time, with a different microphone and/or settings. It's noticeable enough that it honestly kinda distracts me.

    • @otv9005
      @otv9005 2 ปีที่แล้ว

      @@Sukigu That part on separate times is obvious, I noticed this with other channels as well. There is an unintentional sound effect on the 'second take' that i can sometimes hear even in movies (like a sort of high frequency tremelo on male voices) and i always wondered what caused it.

  • @Surannhealz
    @Surannhealz 2 ปีที่แล้ว +3

    Legend has it that JPEG was the result of computer nerds getting aggravated with getting lady pictures over slow dial up. So they designed an efficient algorithm to make high quality pictures take up less space. And JPEG is the result of this. But that could be hearsay. Great video by the way. 👏

    • @otofoto
      @otofoto 2 ปีที่แล้ว +1

      ASCII art is for that.

  • @franical
    @franical ปีที่แล้ว

    This channel really goes in-dept. to the nano things a computing does. Makes you appreciate more the geniuses that invented these things

  • @arizmohammadi5354
    @arizmohammadi5354 5 หลายเดือนก่อน

    I really appreciate it. This tutorial video was perfect. So far I have watched more than 10 videos to understand the JPG process and your video was more beneficial than those videos.
    Good Job man!

  • @karlramberg
    @karlramberg 2 ปีที่แล้ว +11

    Do l look like I know what a jpeg is?

    • @alexs1932
      @alexs1932 หลายเดือนก่อน +1

      I just want a picture of a gat dang hot dog

  • @ranjan_v
    @ranjan_v 2 ปีที่แล้ว +15

    Do I look like I want to know what a jpeg is,
    I just want a picture of a god dang hotdog 🌭

  • @richardterrell5309
    @richardterrell5309 2 ปีที่แล้ว

    A remarkable understanding to appreciate whether or not, how the conversion process to JPEG takes decision of how the human eye accepts what it is seeing.

  • @chregig7967
    @chregig7967 6 หลายเดือนก่อน

    Thank you so much for this video, my professor wasn't really explain DCT and Qunatization to me, but the visuals used in your video helped so much, and I feel like I finally understand it!

  • @smergthedargon8974
    @smergthedargon8974 2 ปีที่แล้ว +9

    Due to the square/rectangular artifacts associated with lower-quality instances of the format, I'd always assumed JPG worked in some recursive way where it divides the image up into quadrants, throws out the least-used/prominent colors in each, and gets more "aggressive" about throwing out colors with each subdivision of quadrants, as the smaller the area the harder a discrepancy is to notice.

    • @gianluca.g
      @gianluca.g 2 ปีที่แล้ว +10

      That's another algorithm, called JPEG2000. It works by subdividing the original image in four quadrants, and recursively subdividing the top left quadrant into other four quadrants, and so on. Each quadrant is described by a weighted combination of wavelets

    • @smergthedargon8974
      @smergthedargon8974 2 ปีที่แล้ว +2

      @@gianluca.g Ah, interesting - thanks for the info!

    • @jackl2254
      @jackl2254 2 ปีที่แล้ว

      @@gianluca.g this is what we call a quadtree. i heavily work with bin/quad/oct tree with my 3d engine. the first box is call the root, the smallest division/box are the leaf.
      i made a combination of all of those which i call a polymorphic tree (polytree for short)

    • @gianluca.g
      @gianluca.g 2 ปีที่แล้ว

      @@jackl2254 as a software engineer myself I find quadtrees really elegant! Jpeg2000 however doesn't really use quadtrees, it just divides recursively the top left quadrant, not the other 3 quadrants. The top left quadrant get subdivided while the other 3 quadrants are described by some wavelet polinomial (similar to the cosine table in jpeg).
      OT: I rememeber binary trees being used in Doom to speed up sector rendering.

    • @jackl2254
      @jackl2254 2 ปีที่แล้ว

      @@gianluca.g i see, i though they were all divided and sub divided etc.. that seem to be some weird algorithm there. heh

  • @ZybakTV
    @ZybakTV 2 ปีที่แล้ว +3

    JPEG amazes the shit out of me.

  • @AmitMachhiwal3
    @AmitMachhiwal3 2 ปีที่แล้ว

    The information and the presentation is just amazing! Great work!

  • @ghostware6057
    @ghostware6057 2 ปีที่แล้ว

    this is brilliant for someone who's only "hobby-ist" computer literate like myself. thank you for breaking it down!