Help with TV capture (mplayer/brooktree/audigy)

Jacob Meuser jakemsr at
Sat Apr 23 15:03:45 PDT 2005

On Sat, Apr 23, 2005 at 01:56:56AM -0700, Arne Wörner wrote:
> --- Mario Sergio Fujikawa Ferreira <lioux at> wrote:
> > > > > > 	2) Every few seconds the video
> > > > > >          stream seems to choke; thus,
> > > > > >          giving me an effect similar
> > > > > >          to the famous interlaced
> > > > > >          "blinders effect" so I added a
> > > > > >          deinterlacer filter
> > > > > 
> > > > > 	Sync detection problems perhaps.
> > 
> > 	Is there anything I can do to improve that? Perhaps,
> > a harder filter looking for those?  I fear that such harder
> > filtering will just decrease performance; thus, increasing
> > the choking effect.
> > 
> > 	Bear in mind that I do not mind 100% CPU occupancy for as
> > long as, I can get good quality TV capture with good audio. :)
> > 
> I mentioned, that the bktr does not issue a signal for every
> expected frame. So I use my own code, that becomes impatient, when

I do not notice this with the cards I use too often.  my code (as
well as fxtv and xawtv) uses METEORSSIGNAL, and I get all the
expected frames.  the only hitch is that it seems every once in a
while, it seems bktr spits out 2 signals for one frame.

I wouldn't be surprised if the RISC commands in bktr could be
improved some though.  that's what puts the two fields together
into a frame.

> the next frame is due, so that it just takes it (I use this old
> mmap access method).  I think, that way I get at least the right
> frame rate and possibly even the right frame (maybe the signal
> gets lost or so...).

bktr comes pretty close to 30000/1001 FPS for NTSC capture. actually
it seems to be just a tiny bit fast, but I believe this also has to
do with the signal it's receiving, as some stations behave slightly

I don't have any experience with PAL.

IMO the best thing to would would be to use some kind of ring
buffer.  grab all frames that come in at whatever time and output
them at the right rate.  drop frames when the buffer is too full
and clone them if the buffer is too low.  hopefully the dropping/
cloning is minimal, or simply stop if the buffer is too full/low.

Now, I may be partial, but I get the best quality captures with
transcode CVS:

  transcode -i /dev/bktr0 -y ffmpeg,null -F mpeg2 --encode_fields b \
	-J hqdn3d=pre,pp=de -o out

nb: --encode_fields b is for ntsc "bottom first" fields.

it would be nice if someone wrote an OSS import module for transcode.

<jakemsr at>

More information about the freebsd-multimedia mailing list