8000
Skip to content

Invalid resolution error & difficult-to-interpret file buffer output on Mac #208

@mrfoogles

Description

@mrfoogles

I'm on a Mac M3 and when I call camera.frame() I get a Buffer with resolution 1920 x 1080 that is purportedly in the NV12 format, but instead of being (1920 x 1080 x 3/2) = 3,110,400 bytes long, it's about twice that + 4000 or so -- about 6,224,800 bytes. I've also tried just writing the buffer to a file and opening it with mplayer as an NV12 file, but that also failed. Therefore either the file being returned is not encoded in NV12, or the resolution detection is wrong -- I don't know which. Looked around in the source for a few hours, but couldn't find the root of the problem. Below is the file I got (changed the format to txt to get it to upload):

EDIT: Removed that because I just realized that posting a possibly broken version of a webcam image of yourself on the internet is a bad idea.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0