Thanks to visit codestin.com
Credit goes to programming.dev

    • khannie@lemmy.world
      Codestin Search App
      Codestin Search App
      English
      Codestin Search App
      4
      ·
      4 days ago

      I think the pixels themselves are still square, they just get scaled by the player to display, a bit like looking at a 1080p video on a 4k screen.

      I remember this being a thing a long long time ago when TV rips were more common and would display janky on playback unless you forced the aspect ratio but I haven’t come across it in forever.

  • quilan@lemmy.world
    Codestin Search App
    Codestin Search App
    Codestin Search App
    4
    ·
    4 days ago

    I used to develop code for reading barcodes, and dealing with pixel aspect ratio was always annoying. It was one of those cases where 99.9% of images were square, but that tail always made for weird cases that had to be accounted for. Good times.

  • Glitchvid@lemmy.world
    Codestin Search App
    Codestin Search App
    English
    Codestin Search App
    2
    ·
    3 days ago

    I typically just specify the height of the video and let the browser figure out the width and aspect ratio. The most annoying layout shift is the vertical kind anyway, so that solves it to my satisfaction.

    That said, I also use the poster feature of the video tag and set preload to none, this produces vastly faster page loading, as images are a fast-path compared to browsers loading a video chunk and then decoding it just to display a cover image. I have a set of scripts that generate the poster images for me, I just specify the frame number I want to use in the video and ffmpeg produces an avif.

  • verstra
    Codestin Search App
    Codestin Search App
    Codestin Search App
    2
    Codestin Search App
    1
    ·
    4 days ago

    Does anyone know why anyone would want to encode their video using PAR != 1? Reducing the file size, by storing less pixels in one dimension, but not the other?

    • verstra
      Codestin Search App
      Codestin Search App
      Codestin Search App
      3
      ·
      4 days ago

      Wikipedia to the rescue:

      However, some formats (ex., HDV, DVCPRO HD) use non-square pixels internally for image storage, as a way to reduce the amount of data that must be processed, thus limiting the necessary transfer rates and maintaining compatibility with existing interfaces.

      Actual displays do not generally have non-square pixels, though digital sensors might;

      TLDR; some formats use non-square pixels for reducing file size, some digital sensors has non-square pixels.