4

I have a HDMI capture card and I'm using raspbian.

I want to get one single frame with v4l2-ctl command, then convert it to something common:

Get a frame:

# v4l2-ctl --device /dev/video0 --stream-mmap --stream-to=frame.raw --stream-count=1

Convert it:

# convert -size 1280x720 -depth 16 uyvy:frame.raw frame.png

1280x720 is the resolution what v4l2-ctl --query-dv-timings reports as active.

The problem is that I can not get a clean capture, it always has a green ending at the bottom (sometimes smaller, sometimes larger!):

enter image description here

How can I get the whole picture captured with v4l2-ctl? Maybe the conversion is wrong (I get that from http://trac.gateworks.com/wiki/linux/v4l2).

Thanks!

0

Try steaming with jpg, below code i have tried .

v4l2-ctl --device /dev/video0 --set-fmt-video=width=1280,height=720,pixelformat=MJPEG --stream-mmap --stream-to=frame.jpg --stream-count=1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.