[MPlayer-users] thanks!

D Richard Felker III dalias at aerifal.cx
Fri Mar 28 17:37:40 CET 2003


On Fri, Mar 28, 2003 at 01:35:47AM -0500, Yan Seiner wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> OK, Thanks everyone!
> 
> I now have the ability to take my PAL tapes, run them through my
> PAL/NTSC tape deck, edit them to cut the cruft out, and play them back!
> 
> Wow!
> 
> Here's a collection of my *limited* and probably erroneous wisdom. 
> Hopefully this will be useful to other newbies as a starting point:
> 
> grabbing videos from a regular VHS:
> 
> mencoder -tv
> on:fps=29.97:driver=v4l:input=1:norm=NTSC:width=320:height=240:adevice=/dev/dsp -ofps 29.97 -ovc xvid -xvidencopts bitrate=800 -oac mp3lame -lameopts vbr=3 -o movie5.avi
> 
> For some reason I have to specify the fps for both the grabber and the
> output.  I think that's because my deck does a digital conversion from
> PAL to NTSC, and somehow puts in a rate of 29.00 fps (at least that's
> what the playback says...)  This leads to jerky videos.

Where do you see 29.00 reported?

> There's no reason to use a greater than 320x240 resolution on the
> capture since 240 is the resolution of a VHS tape. (I tried the
> recommended 352x240 but it came out squished.)  This may be different
> for S-Video; ordinary composite is 240 lines of resolution.

Wrong. VHS has the same vertical resolution as always, which is ~576
for PAL, but that will get downsampled to ~480 by the PAL->NTSC
conversion. Keep in mind that this resolution is for a whole *frame*,
so each field is only 240 lines, but you're capturing frames, not
fields.

> A word on resolution: if your resolution is not a multiple of 16,
> strange things will happen.  Like a field of green with your image
> smushed into the top 3 lines.  Or other, equally strange things.  Why? 
> I have no idea.  I'm guessing it has to do with the compression used. 
> For display on a normal TV, make sure your resolution is at a 4:3 ratio.

This is only an issue if you're using broken windows/other proprietary
encoders. However, width%16!=0 will waste a lot of space in the file,
so it's best to keep width a multiple of 16!!

> For some strange reason, I have to specify a much higher bitrate for
> cartoons (800) than live action (500) to get comparable quality.  Again,
> I guess this has to do with the compression used.  Or possibly it's an
> artifact of the PAL to NTSC conversion and the multiple
> analog-digital-analog conversions that happen with my setup. (analog PAL
> - digital conversion inside deck - analog NTSC - composite in to
> computer - digital). YMMV.

Hmm, why don't you configure your deck to just output PAL and capture
with your computer in PAL format???

> For grabbing DVDs:
> 
> mencoder -dvd 1 -vop crop=320:240:54:40,scale=432:320 -ovc lavc
> -lavcopts vcodec=mpeg4:vbitrate=500 -oac mp3lame -lameopts vbr=3 -o
> movie3.avi
> 
> The hardest thing for me was figuring out the cropping.  I wanted to end
> up with a 320x240 resolution.  The cropping is done after the scaling,
> so first you have to back out what the whole screen resolution is and
> then crop to your desired resolution.
> 
> BTW, the cropping I use still leaves a slight band of black along top
> and bottom.  It works for me.  YMMV.

You should crop before scaling -- then it's easier to get right and
also keep size a multiple of 16! Also, You need to make sure you
eliminate ALL of the black border, and perhaps the adjacent few pixels
too, or you will waste a HUGE amount of space and butcher the quality.

Rich



More information about the MPlayer-users mailing list