[MPlayer-users] rescaling NTSC video streams

D Richard Felker III dalias at aerifal.cx
Mon Mar 3 05:04:26 CET 2003


On Sun, Mar 02, 2003 at 01:46:45PM -0800, Florin Andrei wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> 
> (using mplayer-0.90rc4)
> 
> This is how my DV files (NTSC format) are detected:
> 
> VIDEO:  [dvsd]  720x480  24bpp  29.97 fps  28771.8 kbps (3512.2 kbyte/s)
> 
> I'm playing them with mplayer, using -aspect 4:3.
> mplayer performs the rescale by bumping up the vertical size from 480 to
> 540:
> 
> #######################
> Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
> SwScaler: reducing / aligning filtersize 1 -> 4
> SwScaler: reducing / aligning filtersize 1 -> 4
> SwScaler: reducing / aligning filtersize 1 -> 1
> SwScaler: reducing / aligning filtersize 9 -> 8
> 
> SwScaler: BICUBIC scaler, from Packed YUY2 to Planar YV12 using MMX2
> VO: [xv] 720x480 => 720x540 Planar YV12
> Selected video codec: [qdv] vfm:dshow (Sony Digital Video (DV))
> #######################
> 
> I feel that it is somewhat unnatural to rescale NTSC streams this way. I
> believe NTSC DV should be rescaled to 640x480. Here's why:
> 
> 1. NTSC DV has a frame size of 720x480 with non-square pixels which
> coresponds to a real image of 640x480; that is, the _information_
> contained in the 720x frame is really only 640x.

No. 640 is just the number that makes pixels square. There is no such
thing as a "real" number of pixels in a video signal; it's a
continuous signal which you can sample at whatever rate you want. Only
vertical resolution has an actual discrete number.

> When played by any player (hardware or software) that is aware of the
> NTSC DV format, the standard rescaling should be (and it actually is in
> all cases i've seen with the exception of mplayer) down to 640x480. This

No. It's not "scaled" at all. The 720 samples are just output at the
appropriate rate.

> is how non-square-pixel NTSC streams are displayed, even on high-end
> digital video gear, because the NTSC square-pixel frame is 640x480.

Irrelevant.

> 2. When bumping up the vertical size, if the original stream is
> interlaced (usually it is, and mine surely is) and if you _must_
> preserve the interlaced format (such as when using an interlaced NTSC
> display [480 lines], or for weird technicalities like debugging the
> camera - i won't go there, it's kinda offtopic), then you _must_ leave
> the vertical size (the scanlines) untouched. Otherwise interlacing gets
> all wrong and you can't figure out the details you were looking for.
> 
> Also, i feel that reducing the horizontal must be overall simpler for
> the software than increasing the vertical, at least from a performance
> perspective (and every bit of performance _does_ matter when playing DV,
> because this format is a son of a b**** CPU-wise), but perhaps i'm
> wrong.

Normally only the hardware scaler will be doing any auto-scaling.
Apparently you're using -zoom or something. Why not just use -vop
scale=640:480 instead? Or use -vop scale=-2:480 so everything gets
scaled to ???x480 automatically based on aspect.

Or better yet, why not avoid scaling altogether and just set the video
mode to 720x480?!?

> This is why i suggest to modify the -rescale parameter so that

Since when is there a -rescale parameter?

> non-square-pixel 480i NTSC streams (720x480 interlaced in "normal
> speak") are rescaled down to 640x480.
> I believe this should apply to all non-square-pixel NTSC formats, not
> just DV, but for now i'm speaking only about DV.

The relevant code has no way of knowing it's an "NTSC format", and
shouldn't have to have access to such info.

...

Rich



More information about the MPlayer-users mailing list