Skip to content

Cannot access camera device /dev/video0 when added to Gramine manifest #2163

@Obessiveness

Description

@Obessiveness

I'm exploring the use of Gramine to create a Trusted Execution Environment (TEE) that can ensure video streams come from a trusted physical camera rather than a virtual device. My goal is to provide hardware-based attestation that video data originates from a genuine physical camera.

When I add my camera device (/dev/video0) to the Gramine manifest file, my application fails to open the camera device with an error:

[ WARN:[email protected]] global cap_v4l.cpp:914 open VIDEOIO(V4L2:/dev/video0): can't open camera by index
[ERROR:[email protected]] global obsensor_uvc_stream_channel.cpp:163 getStreamChannelGroup Camera index out of range
[ WARN:[email protected]] global cap.cpp:779 open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.12.0) /io/opencv/modules/videoio/src/cap_images.cpp:415: error: (-215:Assertion failed) !filename_pattern.empty() in function 'CvVideoWriter_Images'

The same program works correctly when run natively outside Gramine.

I attached my code file and log file below.

camera_test.py

debug_cv2.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions