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?

  • tal@lemmy.today
    link
    fedilink
    arrow-up
    18
    ·
    9 months ago

    I don’t know if this is in fact the case for you, but often codecs can provide better compression if they can spend more CPU time trying to find an optimal encoding.

    Cameras have to do real-time encoding on a limited-power device. YouTube doesn’t have those constraints and may spend more computation time on encoding.

    • chunktoplane@beehaw.org
      link
      fedilink
      arrow-up
      2
      ·
      9 months ago

      Here’s the FFmpeg documentation for x264, an open source h.264 encoder: https://trac.ffmpeg.org/wiki/Encode/H.264

      So the encoding strategy is tunable for an encoder, but also there are different implementations that might perform differently. They all produce a h.264 video stream that’s decodable by any standard player.