Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mplayer aspect ratio problems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
scottf
n00b
n00b


Joined: 14 May 2004
Posts: 6

PostPosted: Fri May 14, 2004 4:19 am    Post subject: mplayer aspect ratio problems Reply with quote

I am having a problem controlling the aspect ratio that mplayer uses to display streams. Regardless of the command line or mplayer.conf settings, it always displays the stream in my monitor's perspective, unless I use "-vo x11". I am using the nvidia twinview option with 2 monitors at 1024x768, which makes it look like one monitor at 2048x768. Effectively my monitor ratio is 8x3 and that is always the window ratio mplayer uses, except in the x11 case. If I disable twinview and only boot with one screen, it plays as expected. If I use gmplayer, it uses the correct perspective. I've tried DVD and ivtv sources all with the same improper ratio. I have been using this setup for years, and mplayer was happy until a few days ago. I had some drive damage (repaired), upgraded some packages and can't get this fixed. I've re-emerged xfree, mplayer (.9 & 1.0pre4) with no luck. The following is my mplayer output.

$ mplayer dvd://
MPlayer 1.0pre4-3.3.2 (C) 2000-2004 MPlayer Team

CPU: Intel Celeron 2/Pentium III Coppermine,Geyserville 1005 MHz (Family: 6, Stepping: 6)
Detected cache-line size is 32 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 SSE

Reading config file /usr/share/mplayer/mplayer.conf
Reading config file /home/scott/.mplayer/config
Reading /home/scott/.mplayer/codecs.conf: Can't open '/home/scott/.mplayer/codecs.conf': No such file or directory
Reading /usr/share/mplayer/codecs.conf: 66 audio & 176 video codecs
font: can't open file: /home/scott/.mplayer/font/font.desc
Font /usr/share/mplayer/font/font.desc loaded successfully! (206 chars)
Failed to open /dev/rtc: Device or resource busy (/dev/rtc should be readable by the user.)
Using usleep() timing
Can't open input config file /home/scott/.mplayer/input.conf: No such file or directory
Input config file /usr/share/mplayer/input.conf parsed: 53 binds

Playing dvd://.
Reading disc structure, please wait...
There are 35 titles on this DVD.
There are 38 chapters in this DVD title.
There are 1 angles in this DVD title.
DVD successfully opened.
MPEG-PS file format detected.
VIDEO: MPEG2 720x480 (aspect 3) 29.970 fps 7500.0 kbps (937.5 kbyte/s)
==========================================================================
Opening audio decoder: [liba52] AC3 decoding with liba52
Using SSE optimized IMDCT transform
AC3: 5.1 (3f+2r+lfe) 48000 Hz 384.0 kbit/s
Using MMX optimized resampler
AUDIO: 48000 Hz, 2 ch, 16 bit (0x10), ratio: 48000->192000 (384.0 kbit)
Selected audio codec: [a52] afm:liba52 (AC3-liba52)
==========================================================================
vo: X11 running at 2048x768 with depth 24 and 32 bpp (":0.0" => local display)
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 720 x 480 (preferred csp: Mpeg PES)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.3.1
Selected video codec: [mpeg12] vfm:libmpeg2 (MPEG 1 or 2 (libmpeg2))
==========================================================================
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: [oss] 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 480 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [xv] 720x480 => 854x480 Planar YV12
A: 0.5 V: 0.5 A-V: 0.016 ct: 0.023 15/ 12 0% 0% 0.0% 0 0 98%
demux_mpg: 24fps progressive NTSC content detected, switching framerate.
A: 3.3 V: 3.3 A-V: 0.012 ct: 0.058 83/ 80 15% 10% 2.2% 0 0 78%
Exiting... (Quit)

I would really appreciate some advice.

Thanks,

Scott
Back to top
View user's profile Send private message
SZwarts
l33t
l33t


Joined: 13 Oct 2003
Posts: 629
Location: Sydney, NSW, Australia

PostPosted: Fri May 14, 2004 4:54 am    Post subject: Reply with quote

I have some options you can try, but I'm not in the position to try so I don't know if any of them will work... I just give them and good luck

Code:

mplayer dvd://1 -vop scale=1024:768

This scales the movie quite hard, for -vo x11 you also need zoom I assume...

or

Code:

 -monitoraspect 4:3


or
Code:

-vop dsize=1024:768

You also can fill in an aspect ratio instead of quite hard numbers here... Look in the man pages.

Hope any of them was any good,
good luck
Back to top
View user's profile Send private message
scottf
n00b
n00b


Joined: 14 May 2004
Posts: 6

PostPosted: Fri May 14, 2004 1:27 pm    Post subject: mplayer aspect ratio problems Reply with quote

Code:
mplayer dvd://1 -vop scale=1024:768
-monitoraspect 4:3
-vop dsize=1024:768

None of these have the expected result of producing a 4:3 ratio (or the proper stream ratio) with xv. They do change the x11 output, but x11 is very cpu intensive and I'd prefer to use xv. I've got the man page memorized and tried just about every option with no luck. This was working without any special options before my incident. I guess I need to dig through the code to see where that ratio is being set.

Thank you for your suggestions.

Scott
Back to top
View user's profile Send private message
timmfin
Guru
Guru


Joined: 04 Sep 2002
Posts: 336
Location: Maryland, USA

PostPosted: Fri May 14, 2004 2:10 pm    Post subject: Reply with quote

I have the same problem. I also use twin view and cannot set the correct aspect ratio when using mplayer, but it does work with gmplayer.
Back to top
View user's profile Send private message
aplesch
n00b
n00b


Joined: 26 Feb 2004
Posts: 70

PostPosted: Fri May 14, 2004 11:28 pm    Post subject: Reply with quote

Here the same exact setup and problem. I seem to remember that before my latest emerge mplayer it used to work, no ?
Did not try unstable.
I player with the -v option to find any difference between mplayer and gmplayer but there is nothing obviously helpful.

I also would like to have fullscreen in correct aspect ratio and this also used to worked AFAIK. Now fs stretches across the whole screen and distorts.
_________________
Andreas
Back to top
View user's profile Send private message
aplesch
n00b
n00b


Joined: 26 Feb 2004
Posts: 70

PostPosted: Wed May 19, 2004 8:53 pm    Post subject: Reply with quote

I found now that the command line option
Code:
mplayer -monitoraspect 8:3

triggers the correct display.

This works but is somewhat unclear since the underlying reason for the existance of this option seems to be non-square physical pixels on cinema-type wide displays which we do not have. Apparently the given aspect is compared to the xy pixel resolution of the given graphics, right ?

Also I would like to retrict fullscreen to one of the two monitors in my twin view setup. This used to be the default but now I do not know how to invoke mplayer to force this. Anybody ?
_________________
Andreas
Back to top
View user's profile Send private message
aplesch
n00b
n00b


Joined: 26 Feb 2004
Posts: 70

PostPosted: Wed May 19, 2004 9:49 pm    Post subject: twinview fullscreen Reply with quote

aplesch wrote:

Also I would like to retrict fullscreen to one of the two monitors in my twin view setup. This used to be the default but now I do not know how to invoke mplayer to force this. Anybody ?


Apparently one needs to use the
Code:
-xineramascreen 0

option. And this requires the 'xinerama' USE flag for mplayer. Apparently nvidia twinview also return xinerama information, not only xfree xinerama.

I added 'xinerama' to my global make.conf USE flags since it seems to make sense for KDE and qt as well. I hope all xinerama aware application are satisfied with nvidia twinview xinerama, as opposed to 'proper' xfree xinerama ?

emerge -pv mplayer does not show the xinerama flag but the emerge script itself appears to check for it ('use-enable xinerama'). Seems to be a bug (IUSE definition). I submitted.

Reemerging mplayer now, lets see how it works out with that option ...
_________________
Andreas


Last edited by aplesch on Wed May 19, 2004 10:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
aplesch
n00b
n00b


Joined: 26 Feb 2004
Posts: 70

PostPosted: Wed May 19, 2004 10:18 pm    Post subject: Re: twinview fullscreen Reply with quote

aplesch wrote:
aplesch wrote:

Also I would like to retrict fullscreen to one of the two monitors in my twin view setup. This used to be the default but now I do not know how to invoke mplayer to force this. Anybody ?


Apparently one needs to use the
Code:
-xineramascreen 0

option.
...
Reemerging mplayer now, lets see how it works out with that option ...


Hey, it worked. Now mplayer correctly full-screens to one monitor only.

It also does not need the
Code:
-monitoraspect 8:3

any more, in fact 4:3 is necessary which seems to be the default. Also,
Code:
-xineramascreen 0

seems to be implied as well (default) and does not need to be spelled out, meaning no options are necessary at all. So, use the 'xinerama' USE flag and all will be well.
_________________
Andreas
Back to top
View user's profile Send private message
Psych0
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jan 2004
Posts: 127
Location: Carson City, Nevada USA

PostPosted: Fri May 21, 2004 1:31 am    Post subject: Reply with quote

Yay! Thanks for figuring it out. It stumped me ;)
_________________
Proud GNU/Linux user 158149
Back to top
View user's profile Send private message
timmfin
Guru
Guru


Joined: 04 Sep 2002
Posts: 336
Location: Maryland, USA

PostPosted: Fri May 21, 2004 4:44 pm    Post subject: Reply with quote

Cool, putting
Code:
monitoraspect=8:3


in my .mplayer/config fixed it for me.
Back to top
View user's profile Send private message
BlackEdder
Advocate
Advocate


Joined: 26 Apr 2004
Posts: 2588
Location: Dutch enclave in Egham, UK

PostPosted: Sat May 22, 2004 10:53 am    Post subject: Reply with quote

I had the same problem with xine, gimp and mplayer. Apparently they check your size setting in XF86Config to figure out what width to their window.
I put DisplaySize 590 230 for both my monitors and then it worked
Back to top
View user's profile Send private message
Sabbie
n00b
n00b


Joined: 23 May 2004
Posts: 24
Location: Netherlands

PostPosted: Fri Jul 02, 2004 11:39 pm    Post subject: Reply with quote

Yay!! I've been searching for this for a while now.. xinemara use flag does the trick indeed!
Back to top
View user's profile Send private message
scottf
n00b
n00b


Joined: 14 May 2004
Posts: 6

PostPosted: Sat Jul 17, 2004 2:31 pm    Post subject: Reply with quote

Sorry for the delay in replying. monitoraspect=8:3 fixed my situation too. Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum