On Tue, 25 Jan 2005, E.Chalaron wrote:

        HI!

        I see this item was delayed in the queue for quite some time.   I
        saw a reply long before the actual start of the thread arrived.
        Strange.

>    INFO: [mpeg2enc] Aspect ratio code: 1 = 1:1 pixels

        Oops - but I think I know what caused that problem...

> here is the line I am using
> 
> cat *.ppm | ppmtoy4m -F 18000:1000 -L | y4mscaler -I sar=1:1 -O size=720x576 
> -O chromass=420_MPEG2 -O sar=PAL | yuvdenoise -b 20,20,680,536 -r 16 -t 2 -c 

        It's probably necessary to specify the output SAR (-O sar=) before
        you give the size (-O size).  That's so that y4mscaler knows
        what output sample aspect to use when doing the scaling.

        Try putting put the -O sar before the -O size thus:

y4mscaler -I sar=1:1 -O sar=PAL -O size=720x576 -O chromass=420_MPEG2

        I would  use 704x576 instead of 720x576

y4mscaler -I sar=1:1 -O sar=PAL -O size=704x576 -O chromass=420_MPEG2

        Why?  Because 704x576 using 59:54 pixels *exactly* represents a 4/3
        image and 720x576 59:54 does NOT.   So if you're coming from 1024x768 
        (which is a 4/3 image using 1:1 pixels) it makes sense to go (exactly) 
        to another 4/3 representation (704x576 59:54).

        But if you really want the 720xN size that's fine (perhaps you're
        editing the clip into a large show and all the clips need to have
        the same encoded frame size):

y4mscaler -I sar=1:1 -O sar=PAL -O preset=DVD -O chromass=420_MPEG2

        If you're not using the latest (8.1) y4mscaler then you really 
        really want to add a "-S option=sinc:5" or similar to the options
        otherwise you'll end up using a simple 'linear' scaling kernel.

-->>    The other thing that you probably should add is a "-O infer=exact".
        For example when scaling one 16/9 picture (1920x1080 1:1) to another
        (704x480 40:33) with the default "-O infer=simplify" I get:

   INFO: [y4mscaler] <   1920x1088, SAR 1:1, top-field-first
   INFO: [y4mscaler] <   chroma subsampling:  4:2:0 MPEG-2 (horiz. cositing)
   INFO: [y4mscaler] <   chroma ss ratios:  x 1:2  y 1:2
   INFO: [y4mscaler] < active region:
   INFO: [y4mscaler] <   1877.333333x1056.000000 at 21.333333,12.000000
   INFO: [y4mscaler] < matte region:
   INFO: [y4mscaler] <   1920x1088 at 0,0  (bg Y'CbCr: 16,128,128)
   INFO: [y4mscaler] === SCALING parameters: ================
   INFO: [y4mscaler] | Scaler:  Matto's Generic Scaler
   INFO: [y4mscaler] |          kernels:  sinc:6, sinc:6
   INFO: [y4mscaler] === TARGET parameters: =================
   INFO: [y4mscaler] > stream:
   INFO: [y4mscaler] >   704x480, SAR 40:33, top-field-first
   INFO: [y4mscaler] <   chroma subsampling:  4:2:0 MPEG-2 (horiz. cositing)
   INFO: [y4mscaler] <   chroma ss ratios:  x 1:2  y 1:2
   INFO: [y4mscaler] > active region:
   INFO: [y4mscaler] >   704x480 at 0,0  (bg Y'CbCr: 16,128,128)
   INFO: [y4mscaler] > X ratio:  3/8
   INFO: [y4mscaler] > Y ratio:  5/11
   INFO: [y4mscaler] Output Stream Header:
   INFO: [y4mscaler] >>>   frame size:  704x480 pixels (506880 bytes)

        Note how the active region was cropped to '1877x1056'.  The aspect
        will be correct but the results weren't the anticipated ones.

        However adding "-O infer=exact":

   INFO: [y4mscaler] <   1920x1088, SAR 1:1, top-field-first
   INFO: [y4mscaler] <   chroma subsampling:  4:2:0 MPEG-2 (horiz. cositing)
   INFO: [y4mscaler] <   chroma ss ratios:  x 1:2  y 1:2
   INFO: [y4mscaler] < active region:
   INFO: [y4mscaler] <   1920.000000x1080.000000 at 0.000000,0.000000
   INFO: [y4mscaler] < matte region:
   INFO: [y4mscaler] <   1920x1088 at 0,0  (bg Y'CbCr: 16,128,128)
   INFO: [y4mscaler] === SCALING parameters: ================
   INFO: [y4mscaler] | Scaler:  Matto's Generic Scaler
   INFO: [y4mscaler] |          kernels:  sinc:6, sinc:6
   INFO: [y4mscaler] === TARGET parameters: =================
   INFO: [y4mscaler] > stream:
   INFO: [y4mscaler] >   704x480, SAR 40:33, top-field-first
   INFO: [y4mscaler] <   chroma subsampling:  4:2:0 MPEG-2 (horiz. cositing)
   INFO: [y4mscaler] <   chroma ss ratios:  x 1:2  y 1:2
   INFO: [y4mscaler] > active region:
   INFO: [y4mscaler] >   704x480 at 0,0  (bg Y'CbCr: 16,128,128)
   INFO: [y4mscaler] > X ratio:  11/30
   INFO: [y4mscaler] > Y ratio:  4/9
   INFO: [y4mscaler] Output Stream Header:
   INFO: [y4mscaler] >>>   frame size:  704x480 pixels (506880 bytes)

        Note the different X and Y ratios AND the fact there is  no 
        cropping/padding .   The 1920x1080 1:1 goes cleanly into 704x480 40:33
        as expected.

> Or either using yuvfps ?

        You might give yuvfps a try and see how it looks.

        Cheers,
        Steven Schultz



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to