Re: extend video capture example to capture mpeg video file

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

 



On Mon, 2010-09-13 at 21:43 -0700, bad boy wrote:
> Hi

Please note, the video4linux-list is about dead; use
linux-media@xxxxxxxxxxxxxxx instead.

> I have a Hauppage TV capture card that seems to be working . I can use the
> 
> cat /dev/video0 > test.mpeg to capture a video file to hard disk.
> 
> I am trying to adapt the video capture example, source  "capture.c" to  capture 
> the mpeg file.
> 
> The example code ins capture.c calls the read_frame() function that then calls 
> process image, which writes a "." to the screen.
> 
> 
> What do I need to modify to capture a proper mpeg file ? 

If you have a Hauppauge card whose driver supports the read() method and
provides MPEG output (ivtv or cx18?), then 'cat /dev/video0' does
capture a proper MPEG file to standard output.  

Drivers that support the read() method, like ivtv and cx18, usually do
not support the methods that use mmap().  I'm guessing capture.c uses
the one of the mmap() methods, which is a completely different way of
reading from a video device node than a read() call.  By the time you
are done rewriting capture.c, you will end up with something close to
cat.c.


> Your help would be deeply appreciated.

$ mplayer /dev/video0 -cache 8192

will display the video and audio as it is captured.

Regards,
Andy

> Thanks
> badam


--
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