[MPlayer-dev-eng] Re: [PATCH] v4l capture RC1(?)

Jindrich Makovicka makovick at KMLinux.fjfi.cvut.cz
Sat Aug 10 11:20:32 CEST 2002


On Sat, Aug 10, 2002 at 09:48:06AM +0200, Wander Winkelhorst wrote:
> Hi,
> 
> > Hi,
> >
> > > Greetings,
> > > this patch adds the following features to V4L module:
> > >
> > > - multithreaded audio/video buffering (I know mplayer crew hates threads
> > > but it seems to me as the only way of doing reliable a/v capture)
> > i agree. i don't like threads, but it seems it's th only way here, as v4l
> > ioctl blocks and you can't delay more than 1 frames...
> >
> > > - a/v timebase synchronization (sample count vs. gettimeofday)
> > > - "immediate" mode support for mplayer
> > > - fixed colorspace stuff - RGB?? and YUY2 modes now work as expected
> 
> I don't know exactly what you were trying to fix, but i still need I420 or
> else I get those blue faces again
> 
> > > - native ALSA audio capture (optional - just #define ALSA_CAPTURE)
> >
> > sounds cool :)
> >
> > could others - with v4l card, i don't have any - test it with various
> > configuration/hardware and report results?
> >
> 
> I have a (very cheap) Bt848 TV card, an AthlonXP 1600+ and 320 mb ram,
> running Linux 2.4.19
> 
> This code works far better than the old. The old code would drop frames
> *and sound* while capturing to 640x480. The new code does 786x576 without
> dropping any frames or sound. When it does drop frames, it drops a frame every
> second or so and not a bunch of frames at once. It never has dropped any audio.
> The a/v sync is good as well.
> 
> For those intrested in what i use to capture, here is how i start mencoder:
> 
> mencoder  -tv on:driver=v4l:width=768:height=576:outfmt=I420 -vc rawi420 -npp
>  lb -oac pcm -lavcopts vcodec=mpeg4:vbitrate=1500 -o /tmp/movie.avi
> 
> Especially the "-npp lb" option improves video quality greatly :)
> I reencode the sound later on: (don't have enough power left to do mp3 encoding
> as well)
> 
> mencoder /tmp/movie.avi -oac mp3lame -lameopts q=0:aq=0:mode=3 -ovc copy -o
> /tmp/movie2.avi
> 
> The new code does eats quite a bit of memory though, especially when you set
> the gbuffers values of bttv high
> (insmod bttv card=39 gbuffers=32 ate 1G of ram when capturing)

Thanks for information, I didn't even know about this option :). Current code
allocates a video ringbuffer, which is a fixed multiple of v4l capture
buffers. I'll try to fix this, possibly using sysinfo() to get an amount of
available physical ram.

> 
> Regards,
> 
> Wander Winkelhorst
> 
> > A'rpi / Astral & ESP-team
> >
> > --
> > Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu
> >
> > --__--__--
> >
> 
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng

-- 
Jindrich Makovicka



More information about the MPlayer-dev-eng mailing list