RE: Format of /dev/video0 data for HVR-4000 frame grabber

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2010-11-09 at 10:34 +0100, Michael PARKER wrote:
> Daniel,
> 
> Many thanks for your mail. Please excuse the naivety of my questions -
> I'm a h/w guy and a nube to the s/w world.


> Do you know which of these is the default format or how to determine
> the format I'm seeing coming out of /dev/video0? 

$ v4l2-ctl -d /dev/video0 --list-formats
$ v4l2-ctl -d /dev/video0 --get-fmt-video
$ v4l2-ctl --help

> Do you have a suggestion for how data captured from /dev/video0 can be
> converted into a recognisable image format (JPEG, GIF, PNG etc.)?
> 
> I'm keen, if possible, to grab the single frame image using just
> command line tools and without recourse to ioctls, compiled code etc.

v4l2-ctl can set up the device.  As you and Daniel mentioned, dd can
read off a frame given the proper parameters.


> Also, how do I synchronise dd to the beginning of a new frame (and
> thus avoid capturing sections of two frames)?

When dd open()s the device and does a read() it should start a capture.
When dd close()s the device and exits, it should stop the capture.  I'm
fairly certain stopping and restarting a capture should resynchronize
things, but I'm not sure.  The overhead of stopping and starting a
capture may cause you some noticeable delays, but again, I'm not sure.

I think the answer is to write some code and use the Streaming I/O
ioctl()s interface to get frame based data. I know you were hoping to
avoid that.

Regards,
Andy

> Thanks again,
> 
> Mike


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux