0
votes

This pipeline works with a gst-launch-1.0 using 4l2:

gst-launch-1.0 v4l2src device="/dev/video2" name=e ! 'video/x-raw, width=640, height=480' ! videoconvert ! 'video/x-raw, width=640, height=480, format=(string)YUY2' ! xvimagesink

and this is the pipeline used by the original module:

'nvarguscamerasrc ! video/x-raw(memory:NVMM), width=%d, height=%d, format=(string)NV12, framerate=(fraction)%d/1 ! nvvidconv ! video/x-raw, width=(int)%d, height=(int)%d, format=(string)BGRx ! videoconvert ! appsink' % ( self.capture_width, self.capture_height, self.fps, self.width, self.height)

1

1 Answers

0
votes

The original module begins with nvarguscamerasrc, and ends with appsink. nvarguscamerasrc reads to NVVM memory, so you need to convert it to cpu memory with nvvidconv.

For v4l it reads directly to cpu memory so you don't need nvvidconv, however you need to convert it to BGR using videoconvert so I believe this should work:

'v4l2src device=/dev/video2 ! video/x-raw, width=640, height=480 ! videoconvert !  appsink'