public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Walls <awalls@md.metrocast.net>
To: Michael PARKER <michael.parker@st.com>
Cc: "Daniel Glöckner" <daniel-gl@gmx.net>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: RE: Format of /dev/video0 data for HVR-4000 frame grabber
Date: Tue, 09 Nov 2010 07:28:32 -0500	[thread overview]
Message-ID: <1289305712.2075.12.camel@morgan.silverblock.net> (raw)
In-Reply-To: <A3BF01DB4A606149A4C20C4C4C808F6C2A2CACB0B5@SAFEX1MAIL1.st.com>

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



  reply	other threads:[~2010-11-09 12:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-09  8:43 Format of /dev/video0 data for HVR-4000 frame grabber Michael PARKER
2010-11-09  9:10 ` Daniel Glöckner
2010-11-09  9:34   ` Michael PARKER
2010-11-09 12:28     ` Andy Walls [this message]
2010-11-09 15:06       ` Michael PARKER
  -- strict thread matches above, loose matches on Subject: below --
2010-11-09 17:39 Andy Walls

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1289305712.2075.12.camel@morgan.silverblock.net \
    --to=awalls@md.metrocast.net \
    --cc=daniel-gl@gmx.net \
    --cc=linux-media@vger.kernel.org \
    --cc=michael.parker@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox