[MPlayer-users] v4l documentation

Jindrich Makovicka makovick at kmlinux.fjfi.cvut.cz
Mon Oct 28 20:08:02 CET 2002


Emmanuel Anne wrote:

>[Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
>On Mon, 28 Oct 2002, Jindrich Makovicka wrote:
>
>  
>
>>   A more sophisticated example. This makes MEncoder capture the full PAL
>>   image, crop the margins, and deinterlace the picture using a linear blend
>>   algorithm. This setup is suitable for capturing movies.
>>       mencoder -tv on:driver=v4l:width=768:height=576 \
>>       -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=900 \
>>       -oac mp3lame -lameopts cbr:br=64 \
>>       -vop pp,crop=720:540:24:18 -npp lb -o output.avi
>>    
>>
>
>Ok, I took the time to test this on my setup. A miro dc10+ to capture
>pal frames.
>
>1) outfmt is not detected with my card, I have to force it (rgb16,
>rgb24, rgb32 and yuy2 are working...). Maybe it's related to the kernel
>driver, but maybe it should be mentioned...
>
what driver do you exactly use?

>2) The max size of the frame is more 760x576 for pal for me, but it's a
>trivial problem (writen in the docs of the driver).
>
>3) My cpu is not fast enough to encode with such parameters !!! I know
>it's not directly related to mplayer, but do you have any suggestions
>for some faster video codec (which is not mjpeg) ? The cpu is a p3-1Ghz
>by the way.
>
It depends on the memory bandwith, too. My machine is a Duron 
overclocked to 960MHz(138MHz FSB), with 266MHz DDR ram and i have CPU 
load floating ~ 85%. If you really have to specify another outfmt than 
YV12 of I420, your cpu is wasting a lot of cpu cycles converting to YV12.

> 
>  
>
>>   This will additionally rescale the image to 384x288 and compresses the
>>   video with the bitrate of 350kbps in high quality mode. The vqmax option
>>   looses the quantizer and allows the video compressor to actualy reach so
>>   low bitrate even at the expense of the quality. This can be used for
>>   capturing long TV series, where the video quality isn't so important.
>>       mencoder -tv on:driver=v4l:width=768:height=576 \
>>       -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=350:vhq:vqmax=31:keyint=300
>>   \
>>       -oac mp3lame -lameopts cbr:br=48 \
>>       -vop scale=384:288,pp,crop=720:540:24:18 -npp tn,lb -sws 1 -o
>>   output.avi
>>    
>>
>
>Well I have hardware scaling capabilities to grab frames, so I do better
>without the scale plugin.
>
This gives a bit better results, because the bt8x8 can do the pixel 
averaging only in the horizontal direction (a pretty obvious hardware 
limitation - this approach needs just a small ring buffer) while the 
software scaler uses all the available information.

>Except these little details, this piece of doc is most usefull,
>especially the part about interlacing (I thought interlacing was only
>relevant for ntsc, excuse me !).
>
NTSC is even much worse than PAL. Just read something about so-called 
"Telecine" which is a technique of getting 24FPS movie displayed thru 
29.97FPS interlaced video. Compared to this, deinterlacing a PAL video 
is a piece of cake :)

Regards,

-- 
Jindrich Makovicka





More information about the MPlayer-users mailing list