[MPlayer-cygwin] -=[ Few Questions ]=-

Milan Gurjanov miksha at uns.ns.ac.yu
Fri Jan 21 15:30:53 CET 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello, Joey !                       Friday, January 21, 2005.   14:41:52


On day Thursday, January 20, 2005 you wrote:

First, thank you for giving me ideas & for reply, too. Even your
algorythm wasn't perfect you cleared some things for me.

> Don't use -vop anymore, it's syntax is backward and deprecated.

This one for example! Even though I read almost whole man for MPlayer,
I wasn't really clear with some options. Some options don't have
examples, and some have very minimal explanation. The thing is that I
was confused with that filter sequence.

> -vf expand=720:x,scale=720:y is incorrect.
> -vf scale=720:y,expand=720:x is what you want.

Exactly that & you'll se how I'm doing it.

> The filters (for -vf) are applied in left-to-right order.  That's one
> big reason not to use -vop.  It confuses things and makes you use -vf in
> the wrong order.

Right again. (:

>> ==========================================================================
>> > Opening video filter: [scale w=720 h=404]
>> > Opening video filter: [expand w=720 h=385]

> Okay, here ^^^^
> Scale to 720x404, then _expand_ to 720x385?
> Maybe you meant to _scale_ to 720x385, then expand to 404.
> It doesn't make sense to expand to a _smaller_ resolution.

Indeed, but this combination, though strangely, worked just fine. I really
don't know how. This is what confused me most. So, I thought things go
backwards!

> Also note that expand has two other options you might care about.
> -vf expand=w:h:x:y lets you set the size of the new area, as well as the
> location of the old picture in that area.  The default is centered.
> So if you call -vf scale=720:385,expand=720:405:0:0 then you will have a
> 20 pixel bar on the bottom instead of 10 on top, 10 on bottom.

I know, but I like things centered. (: Thanks for the tip, though.


> You want video at aspect A.
> Your monitor is at aspect M.
> Your video is naturally WxH (aspect V=W/H).

> You want to convert video to aspect A, expand to fill monitor aspect M,
> and keep black bars on bottom.

>  // Try this...
>  if (V < A) {
>    X1 = H * A;
>    Y1 = H;
>  } else {
>    X1 = W;
>    Y1 = H * A;
>  }
>  if (A < M) {
>    X2 = Y1 * M;
>    Y2 = Y1;
>  } else {
>    X2 = X1;
>    Y2 = Y1 * M;
>  }
>  mplayer -vf scale=X1:Y1,expand=X2:Y2:0:0

This has sometimes changed width! And I didn't wanted to do that.
Sometimes it worked just fine & sometimes not. But here's how the
final command goes:

Video res. (original aspect=V=W1:H1)
Wanted aspect A=W2:H2
Monitor aspect M (4:3 in my case)

if (A!=V)   (wanted aspect differs from orig. aspect)
{
   X1=W1    (orig. width)
   Y1=W1/A  (orig. width divided by wanted aspect coef.)

   X2=W1    (orig. width)
   Y2=W1/M  (orig. width divided by wanted monitor aspect)
}
else        (keep orig. aspect) see *note!
{
   X1=W1    (orig. width)
   Y1=H1    (orig. height)

   X2=W1    (orig. width)
   Y2=W1/M  (orig. width divided by wanted monitor aspect)
}

   mplayer -aspect A -vf scale=X1:Y1, expand=X2:Y2

*note: If I want to keep orig. aspect, and just use expand, I dont pass
       "-aspect A" command to MPlayer, just "-vf scale=X1:Y1, expand=X2:Y2"

This works perfect. It works in both directions - if you want to scale
picture to smaller size or to larger size according to orig. aspect &
by height only. It was quite simple, but...

Thanks again, you helped a lot. Now I almost finished it. I see you use
Mutt, so I suppose you don't use MPlayer under Windows, at least not a
lot. But if you do, can you tell me what's your choice of GUI under
Win?


- --
Kind Regards,
          Milan
                                      \|||/
                                      (o o)
       _______           +-------oooO--(_)------------+
   ---'   ____)____      |                            |
             ______)     | mailto:miksha at uns.ns.ac.yu |
          __________)    |                            |
         (____)          +-------------------Ooo------+
   ---.__(___)                       |__|__|
                                      || ||
                                     ooO Ooo


Currently Listening:       Café Del Mar vol. 2 - Sabor De Verano (The Way Out West Mix)
<-->Foobar 2000<-->:       PLAYING
Days to New Year   :       345
Days to My Birthday:       22
Secure Bat Lite Version:   2.12.3

Tagline of the day:

Windows 98 is guaranteed to make your system 98% slower.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (MingW32)

iD8DBQFB8RIO1YZ39xOKLlgRAqnXAKCIOtFGQ0qbT1dYJKPFG0+bPcxUNQCfVf/h
8dHKlW4FtNG1rVVcle7SrQ8=
=4chd
-----END PGP SIGNATURE-----





More information about the MPlayer-cygwin mailing list