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

Milan Gurjanov miksha at uns.ns.ac.yu
Thu Jan 20 01:58:29 CET 2005


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

Hello, Joey!                       Thursday, January 20, 2005.   01:29:58


On day Wednesday, January 19, 2005 you wrote:

> How about:
>   -vf scale=400:200,expand=400:300
> Or:
>   -vf dsize=2/1,expand=400:300

Well, this works but not with every file or aspect ratio. And also
black stripes (subtitles) don't always go to the very bottom edge of
the screen.

I know how to manage when I'm expanding video without changing
original aspect. But I need help when changing both aspect & using
expand.

e.g.

1) Monitor aspect is 4:3=1.333333333 and so on
2) Movie resolution for example: 720:288
3) 720/1.3333333=540
4) -vf expand=720:540

This way I'm getting perfect (non scaled) movie, with subtitles positioned as
much low as possible. There is another way too:

1) vop=expand=640:480,scale=640:-3

Anyway, the problem is when I want to use some other aspect ratios while still
using expand. I can't seem to find an algorithm to calculate this by frontend.
What I'm using for this (aspect 16:9 e.g.) is next:

1) -aspect 16:9 -vf expand=720:x,scale=720:y
2) x=? PROBLEM
3) y=720/(16/9)=720/1.78=404
4) So I guess x value to get at the end prescaling to value to be exactly
   720/1.333333=540
5) while testing a bit I come to the value for x=385. This way I get perfect
   movie scaled to 16:9 & expanded to proportions of monitor. Subtitles are
   positioned as much low as it is posible.

MPlayer output is next:

> MPlayer 1.0pre5-3.2.3 (C) 2000-2004 MPlayer Team
>
> ........cut
>
> ==========================================================================
> Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
> MP3lib: init layer2&3 finished, tables done
> AUDIO: 48000 Hz, 2 ch, 16 bit (0x10), ratio: 14000->192000 (112.0 kbit)
> Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
> ==========================================================================
> Opening video filter: [scale w=720 h=404]
> Opening video filter: [expand w=720 h=385]
> Expand: 720 x 385, -1 ; -1  (-1=autodetect) osd: 0
> ==========================================================================
> Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
> Selected video codec: [ffdivx] vfm:ffmpeg (FFmpeg DivX ;-) (MS MPEG-4 v3))
> ==========================================================================
> Checking audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...
> AF_pre: af format: 2 bps, 2 ch, 48000 hz, little endian signed int
> AF_pre: 48000Hz 2ch Signed 16-bit (Little-Endian)
> AO: [win32] 48000Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
> Building audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...
> Starting playback...
> VDec: vo config request - 720 x 288 (preferred csp: Planar YV12)
> Opening video filter: [pp]
> VDec: using Planar YV12 as output csp (no 0)
> Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
> SwScaler: reducing / aligning filtersize 1 -> 4
> SwScaler: reducing / aligning filtersize 1 -> 4
> SwScaler: reducing / aligning filtersize 21 -> 10
> SwScaler: reducing / aligning filtersize 21 -> 10
>
> SwScaler: Bicubic spline scaler, from Planar YV12 to Planar YV12 using MMX2
> VO: [directx] 720x404 => 720x540 Planar YV12
> A:   0.7 V:   0.7 A-V:  0.004 ct:  0.020   19/ 19   8% 19%  0.1% 0 0 0%
> Exiting... (Quit)
>
> c:\Program Files\MPlayer>

The line I talk about is:

> VO: [directx] 720x404 => 720x540 Planar YV12

Do you have any idea how to calculate this in a way of algorithm. The
problem is I don't know how MPLayer does the scaling. If I new that I
could easilly calculate what I need, but I don't know. I can't seem to
find a pattern. Maybe my eyes or brain needs upgrade or something...?

>> 2) Is there a way to play Audio CDs under Win & how?

> Yes, it's called "use other applications."  Please feel free to port
> cdparanoia to cygwin, though.  Nobody has done this yet, but that's what
> MPlayer uses for cd audio.

Yeah, I thought so. It's nothing crucial, but I wanted to know why it
didn't work. Thanks for the idea. Maybe I do so, after finishing this
one. Still, it's much more important e.g. DVD playback than Audio CD.
It was just a thought. (:

> And if you're already tackling this, go ahead and write a VCD module for
> win32, as well.  These two tasks should be in the same general vein (CD
> access using w32api) and nobody's done either one.

I didn't even know that this doesn't work. You intrigued me with this
one, you know (: Now I don't have much spare time, but later...

BTW Thank you for replying!

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


Currently Listening:       Café Del Mar vol. 2 - Haunted Dancehall
<-->Foobar 2000<-->:       PLAYING
Days to New Year   :       346
Days to My Birthday:       23
Secure Bat Lite Version:   2.12.3

Tagline of the day:

Q: How many Microsoft support staff does it take to change a light bulb?
A: Four. One to ask "What is the registration number of the light bulb?", one
   to ask "Have you tried rebooting it?", another to ask "Have you tried
   reinstalling it?" and the last one to say "It must be your hardware because
   the light bulb in our office works fine..."
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (MingW32)

iD8DBQFB7wIs1YZ39xOKLlgRAqS7AJ9PzVdOwuRFLC1FRgTzCxsBWrYeSgCfV0B8
Hptid+51gxgUYKluP/6zpYg=
=2oWb
-----END PGP SIGNATURE-----





More information about the MPlayer-cygwin mailing list