22
submitted 9 months ago by sarmale@lemmy.zip to c/technology@beehaw.org

A 4 min 1080p30fps video taken with my phone camera is 518MB, While a 12 min 1080p30fps video ripped from youtube is 341MB, both are using mp4 h.264 as codec and the youtube one isnt of lower quality, so why this big difference?

you are viewing a single comment's thread
view the rest of the comments
[-] BarryZuckerkorn@beehaw.org 2 points 9 months ago

Video encoding has several tradeoffs:

  • Bitrate
  • Resolution/frame rate
  • Perceived quality
  • Computational complexity of encoding
  • Computational complexity of decoding

The cell phone encoding chips for video encoding on device make sacrifices to preserve speed of encoding and preserve battery life (higher computational complexity costs more processing cycles and tends to use more power). So it's simpler encoding, in exchange for inefficient bitrate compression.

YouTube (and all the social media sites) have huge server farms with highly specialized encoding chips for making the videos more efficient with bitrate for quality. That makes sense because videos designed to be watched millions of times could benefit from even a very slight improvement of bitrate in exchange for a one-time cost of complex encoding. It's also why YouTube tends not to convert to AV1 (very efficient in bitrate for quality, but computationally complex to encode) until a video has a few hundred views, because it's not clear whether that tradeoff is worth it until they know a lot of people will be watching it.

Netflix customizes even further for a per-video basis and looks for even more specialized tricks on a scene-by-scene basis, because every single one of its videos only needs to be encoded once for each quality/format but will be watched millions of times.

In other words, it's like any other engineering problem. The engineers choose different tradeoffs based on context, which means that the cell phone applies a different set of tradeoffs compared to the social media site's server farm.

this post was submitted on 18 Feb 2024
22 points (100.0% liked)

Technology

37702 readers
472 users here now

A nice place to discuss rumors, happenings, innovations, and challenges in the technology sphere. We also welcome discussions on the intersections of technology and society. If it’s technological news or discussion of technology, it probably belongs here.

Remember the overriding ethos on Beehaw: Be(e) Nice. Each user you encounter here is a person, and should be treated with kindness (even if they’re wrong, or use a Linux distro you don’t like). Personal attacks will not be tolerated.

Subcommunities on Beehaw:


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 2 years ago
MODERATORS