GMSL camera(s) access by Python


I’m trying to access GMSL camera(s) from python.

Even some related threads as follow:

I’m not sure the issue was cleared.

Does anyone have an idea to access GMSL camera(s) with Python?


Dear ddpx2,

Do you have any reason to use Python?
Because the souce codes for DriveWorks/NvMedia are all based on C++. Thanks.
BTW I hope this link helps for your topic. Thanks.

Thanks Steve,

I’ll test it and update~


I’ve installed OpenCV on DRIVE AGX Xavier Dev. system and tested with Python.
Then, how can I access GMSL camera here?

To capture frame at Python as follow;

import cv2

cap = cv2.VideoCapture(<b>0</b>)

    # Capture frame-by-frame
    ret, frame =

Python requires the device index or video file name.
e.g /dev/video0, /dev/video1… or 0, 1 etc

And, when multiple GMSL cameras are installed, how can I pass mask info like selector_mask.