|
From: Matto M. <ma...@mi...> - 2004-01-06 00:58:53
|
Hiya,
>How does its speed compare to yuvscaler when encoding to
>similar quality (it that is possible anyway)? I have been
>using yuvscaler with the command line call:
>
> yuvscaler -v 0 -O SVCD -n n
>
>as a filter. What would be the scaling method whose resulting
>quality best aproximates to the yuvscaler call above?
I believe that for downscaling, yuvscaler defaults to its "RESAMPLE" mode,
which is similar to y4mscaler's "box" kernel. The other yuvscaler mode
is "BICUBIC", which should/would be similar to y4mscaler's "cubic" kernel.
However, last time I checked, it still wasn't implemented quite correctly.
(I need to re-check again, and record the version numbers when I do it.)
I haven't run any speed benchmarks lately.
So, to answer your second question:
This is probably equivalent quality to the above yuvscaler command:
y4mscaler -v 0 -I norm=ntsc -O preset=svcd -S option=box
And this is definitely equivalent, if not much better, quality:
y4mscaler -v 0 -I norm=ntsc -O preset=svcd -S option=cubic
>Do the presets set a good scaling method? Or should I worry
>about learning them to choose one?
No (and not really)... the current default is 'linear'; a better would be
'cubic', and even better is something like 'sinc:8'. I haven't had the
time/attention yet to do more research into this question, so I haven't
changed the default yet.
>I am trying it with the following commands:
>
>$ mkfifo -m 660 stream.yuv
>$ mplayer -noframedrop -vo yuv4mpeg -nosound -v -osdlevel 0 \
> the.two.towers.avi -sub the.two.towers.srt -subpos 78 \
> -vf expand=:504
>$ cat stream.yuv |
> y4mscaler -O preset=SVCD |
> mpeg2enc -v 0 -I 0 -s -f 5 -V 230 -S 800 -a 2 -F 1 -n n -4 2 -2 1 \
> -b 2800 -B 284 -q 6 -K FILE=matrix.txt -R 0 -E -11 \
> -o the.two.towers.m2v
>
>But y4mscaler gives the messages:
>
> INFO: [y4mscaler] Input Stream Header:
> INFO: [y4mscaler] <<< frame size: 672x504 pixels (508032 bytes)
> INFO: [y4mscaler] <<< frame rate: 239759/10000 fps (~23.975900)
> INFO: [y4mscaler] <<< interlace: none/progressive
> INFO: [y4mscaler] <<< sample aspect ratio: ?:?
>**ERROR: [y4mscaler] Unknown norm; cannot determine SVCD format.
>
>Adding the option "-I norm=NTSC" to the y4mscaler command line does
>not help (the error message is the same from y4mscaler).
You need to add "-I norm=NTSC" *before* the "-O preset=SVCD"; options are
evaluated in order. (This is not clear in the manpage. I'll fix that.
In fact, it might make more sense to evaluate all -I options before any
-O options...)
The 'norm' is inferred from the frame rate (not the frame size). mplayer
has provided a lame approximation to "24000/1001", and y4mscaler is looking
for an exact match. (Hmm... y4mscaler could be more lenient on the norm
heuristic; that also goes on the TODO list.)
After that, y4mscaler will probably complain that it doesn't know the
sample aspect ratio (SAR) of the input --- and, really, it can't do much
without that. mplayer should have provided that info; but maybe even
mplayer doesn't know. Or, maybe mplayer is rescaling everything, and
pumping out plain old 1:1 pixels? Or, mabye not, and the source still
has a standard NTSC (10:11), or PAL (59:54) SAR.
If this is just some bootleg movie warez, it's probably in pretty sad shape
as it is, and no one will notice anyway; just say "-I sar=1:1".
Remember: Digital video is like heroin. If you want the best quality,
you must "Know your Source." Otherwise you get what you get.
-matt m.
|