I have a 13MP webcam connected to the Nano with USB 3 connection and for now would just like to display the camera’s live video on a monitor. Ideally looking for 4K resolution at 30 fps. The camera is supposed to be able to do 4K at 30fps with MJPEG. The camera works with gstreamer and with cheese, but gstreamer will drop frames or have green and purple lines in the video, even with 4K at 15fps, and sometimes with 1080p at 30 fps. Cheese shows relatively clean video but is similarly at a lower framerate. Here is the gstreamer command that has been working:
I am using the e-con See3CAM_CU130 autofocus. The specs given by e-con systems says the camera can do 4k MJPEG at 30fps with a USB3 connection, which I am using. The v4l2-ctl command outputs this for MJPEG:
Hi,
1 You may configure ‘-n 30’ to dump one frame and check if it is a valid JPEG.
2 The input file size has to be complete JPEG from start of frame(0xFFD8) to end of frame(0xFFD9). We have the code to search for EOF:
// v4l2_buf.bytesused may have padding bytes for alignment
// Search for EOF to get exact size
if (eos_search_size > bytesused)
eos_search_size = bytesused;
for (i = 0; i < eos_search_size; i++) {
p =(uint8_t *)(ctx->g_buff[v4l2_buf.index].start + bytesused);
if ((*(p-2) == 0xff) && (*(p-1) == 0xd9)) {
break;
}
bytesused--;
}
MJPEG_EOS_SEARCH_SIZE is 4096 bytes by default. You may extend it to 8192 or 16384 and have a try.
I tried reloading everything from the Jetson SDK manager, I can now open 4k video though it is at a very low framerate. However, all the different resolutions will occasionally show green horizontal lines and slices of previous frames, the higher resolutions more often.
I don’t think the -n is saving anything, there is an Error that says
ERROR: save_frame_to_file(): (line:197) Failed to open file for frame saving
Is there any additional parameters to give -n to make it save?