How to read MJPEG frames from USB camera

asked 2019-06-18 04:32:45 -0600

Hi all,

I'm trying to read frames from a USB camera using python3.6 VideoCapture(). I've built opencv 3.4.6 from source with libv4l, ffmpeg, gstreamer, etc. I also checked that my camera support uncompressed 1080P frames at 5fps and MJPEG 1080P frames at 30fps.

I want to read 1080p frames at 30fps so I need to read in MJPEG form. However, even with all the libraries included during build, cap.read() is still producing frames only at 5fps. I also tried to set the fourcc to MJPG but it didn't help.

To be specific, I'm currently working on a Nvidia Jetson TX2. I used to built opencv from source on my Ubuntu desktop and it can read the same camera at 1080P 30fps and this is so confusing. I've got no idea what is going on.

Any help is appreciated! Thanks!

edit retag flag offensive close merge delete