"Hans Verkuil" <[EMAIL PROTECTED]> wrote:
> Actually, it would be quite nice if someone would make a C/C++ utility
> that would implement a simple snapshot application and save the resulting
> image in a normal image format like png. I wouldn't mind including that
> with the ivtv utilities.

I extended your(?) example hm12 decoder from README.hm12 to a program
I call hm12toyuv.  Get it by http or bzr here:

    http://highlab.com/~seb/hm12toyuv/


This program reads one frame from the IVTV HM12 interface (normally
/dev/video32), converts it to Abekas YUV format (4:2:2), and writes it
to a file.

The netpbm tools understand the Abekas YUV format, so from there you
can easily convert to many other formats, eg:

hm12toyuv --width 720 --height 480 - | yuvtoppm 720 480 | pnmtopng > frame.png

netpbm is part of most distributions and probably installed on most
machines that do video stuff, if not you can download the source here:
<http://netpbm.sourceforge.net/>


hm12toyuv does not read or write the configuration of the v4l2 device
at all, that needs to be done by v4l2-ctl before calling it.


-- 
Sebastian Kuzminsky     The "portability to every insane system" disease
                        causes insanity on *all* platforms.  -hpa

_______________________________________________
ivtv-users mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-users

Reply via email to