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?


1 Like

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.


1 Like

Facing the same problem. Can’t get the video capture device. Anybody figured it out?

Hi @farhan3,

Please help to change your DevZone account to use corporate or university email address by following below links, and then create a new topic linked to this topic for your problem. Thanks! -> “Edit Profile” -> “Change email” -> “CHANGE”


Very long time ago, I posted it.

After all, I could not access GMSL cameras in the Python code.
Instead of, you could find GMSL to USB adapters on the web.
For AR0231 sensors, following would he helpful;