Thursday, August 2, 2007

Re: [BLUG] Hauppauge PVR-150 s-video capture problems

There appears to be some confusion about how Video4Linux works.

Does the card work with xawtv or another Video4Linux program?

The read() interface will *only* read single frames, and it isn't
supported in all drivers. Cat'ing from the device performs the
read() operation, if available. If it isn't available, cat may
not recognize the error and may just give you garbage. (Also,
there is no way to indicate timing information with the read()
operation. It is usable for webcams, but it isn't really usable
for video streams.)

cat'ing a video device won't work. Don't try it.

To get a usable video stream you *have* to use either mmap'ed I/O
or user-pointer I/O. Both of these are shared memory situations,
it is just a matter of who allocates the memory. Not all drivers
support both methods. (Most Video4Linux2 drivers will support at
least one streaming protocol, though this need not be the case.)

There are also ioctl()s control the MPEG settings. Only key frames
are usable independantly, every other MPEG frame is a product of
the stream (up to the last key frame). This makes MPEG pretty much
unusable via the read() operation.

Additionally, typically a single device can support multiple
inputs. This would be like S/Video and Cable, for instance. In
these cases you do *not* typically get a seperate device. Instead
you need to use an ioctl to change the current input. (There's
also an ioctl to change the channel of a tuner.)

I hope this helps.

Cheers,
Steven Black


On Wed, Aug 01, 2007 at 08:41:41PM -0400, Peter G. Brown wrote:
> Hello,
>
> Running Kubuntu Feisty.
>
> dmesg | grep ivtv - looks good.
>
> [   13.289761] ivtv:  ==================== START INIT IVTV
> ====================
> [   13.289772] ivtv:  version 0.10.1 (tagged release) loading
> [   13.289776] ivtv:  Linux version: 2.6.20-16-generic SMP mod_unload 586
> [   13.289780] ivtv:  In case of problems please include the debug info
> between
> [   13.289785] ivtv:  the START INIT IVTV and END INIT IVTV lines, along with
> [   13.289789] ivtv:  any module options, when mailing the ivtv-users
> mailinglist.
> [   13.289987] ivtv0: Autodetected Hauppauge card (cx23416 based)
> [   13.303122] ivtv0: Unreasonably low latency timer, setting to 64 (was 32)
> [   13.981738] ivtv0: loaded v4l-cx2341x-enc.fw firmware (376836 bytes)
> [   14.195690] ivtv0: Encoder revision: 0x02060039
> [   14.264781] ivtv0: Autodetected Hauppauge WinTV PVR-150
> [   14.264784] ivtv0: reopen i2c bus for IR-blaster support
> [   14.341285] tuner 0-0061: chip found @ 0xc2 (ivtv i2c driver #0)
> [   14.505591] cx25840 0-0044: cx25843-23 found @ 0x88 (ivtv i2c driver #0)
> [   17.834563] wm8775 0-001b: chip found @ 0x36 (ivtv i2c driver #0)
> [   17.879873] ivtv0: Registered device video0 for encoder MPEG (4 MB)
> [   17.880198] ivtv0: Registered device video32 for encoder YUV (2 MB)
> [   17.880539] ivtv0: Registered device vbi0 for encoder VBI (1 MB)
> [   17.880707] ivtv0: Registered device video24 for encoder PCM audio (1 MB)
> [   18.210495] ivtv0: Initialized Hauppauge WinTV PVR-150, card #0
> [   18.210538] ivtv:  ====================  END INIT IVTV  
> ====================
>
>
> With my digital camcorder attached via s-video to the PVR-150 s-video I try
>
> cat /dev/video0 > /tmp/test.mpg
>
> Try to open it in mplayer and get fuzzy black with colour streaks.
>
> ivtv-tune -d /dev/video0 does not help.
>
> If I try cat /dev/video0 > /tmp/test.mpg without pressing play on the
> camcorder - I get the same display in mplayer as when I press play on the
> camcorder.
>
> Any suggestions how I can get s-video to work?
>
> Thank you,
>
> Peter Brown
>
> _______________________________________________
> BLUG mailing list
> BLUG@linuxfan.com
> http://mailman.cs.indiana.edu/mailman/listinfo/blug
_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

No comments: