Opened 13 years ago

Closed 12 years ago

#495 closed defect (fixed)

Full screen doesn't scale correctly on secondary display (dual head)

Reported by: boagenator@… Owned by: reimar
Priority: normal Component: vo
Version: HEAD Severity: normal
Keywords: Cc: reimar, berniyh@…
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:

Description

I have a dual head X setup using nvidia TwinView? and Xinerama.

If I load up a movie in mplayer/gmplayer on the primary display (1600x1200) and
press F, it full screens and scales correctly.

If I move the movie window to the secondary display (1280x1024) and press F it
scales the overlay to 1600x1200, effectively cutting off a proportion of the video.

Change History (11)

comment:1 Changed 13 years ago by reimar

  • Cc Reimar.Doeffinger@… added

This is really tested against latest CVS? I thought this should be fixed. Either
way, please provide full mplayer -v output, because I need more information,
like which vo you are using etc.

comment:2 Changed 13 years ago by boagenator@…

Sorry, forgot to include that before

vo is xv

MPlayer dev-CVS-060414-23:32-4.1.0 (C) 2000-2006 MPlayer Team
CPU: Advanced Micro Devices Athlon 64 X2 Manchester,Toledo (Family: 15, Stepping: 2)
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE SSE2

get_path('codecs.conf') -> '/home/ninpo/.mplayer/codecs.conf'
Reading /home/ninpo/.mplayer/codecs.conf: Can't open
'/home/ninpo/.mplayer/codecs.conf': No such file or directory
Reading /usr/share/mplayer/codecs.conf: 91 audio & 208 video codecs

comment:3 Changed 13 years ago by reimar

  • Resolution set to worksforme
  • Status changed from new to closed

1) This _still_ is not the _full_ -v output
2) Your version is too old

comment:4 Changed 12 years ago by berniyh@…

  • Cc berniyh@… added
  • Resolution worksforme deleted
  • Status changed from closed to reopened

I have got exactly the same problem, except, that my resolution on the primary
display is 1280x800 and on the secondary display it is 1600x1200.
So I have got a virtual Desktop Size of 1600x2400 of which the secondary display
takes the upper half of the desktop and the primary display takes the upper left
corner of the other half.

Now, on the bigger screen, fullscreen is working properly, but on the primary
screen, mplayer scales to 1600x1200, too, so a part of the video can not be seen. I already tried some of the ftype options, didn't work.
This is with xv output, with gl and gl2 it doesn't work either, but the output
is different. (strange scaling in case of gl and like xv, but moved up a bit
for gl2. I didn't try gl and gl2 with svn yet).

mplayer -v output:
MPlayer dev-SVN-r23009-4.1.2 (C) 2000-2007 MPlayer Team
CPU: AMD Turion(tm) 64 X2 Mobile Technology TL-50 (Family: 15, Model: 72, Stepping: 2)
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE SSE2
get_path('codecs.conf') -> '/home/berniyh/.mplayer/codecs.conf'
Reading /home/berniyh/.mplayer/codecs.conf: Can't open '/home/berniyh/.mplayer/codecs.conf': No such file or directory
Reading /usr/local/etc/mplayer/codecs.conf: Can't open '/usr/local/etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf.
Configuration: --enable-xinerama --disable-tv-v4l1 --disable-tv --disable-tv-v4l2 --disable-cddb --disable-gif --disable-ossaudio --disable-jpeg --disable-png --disable-tga
CommandLine?: '-v' '../../test.avi'
init_freetype
get_path('font/font.desc') -> '/home/berniyh/.mplayer/font/font.desc'
font: can't open file: /home/berniyh/.mplayer/font/font.desc
font: can't open file: /usr/local/share/mplayer/font/font.desc
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay?
get_path('fonts') -> '/home/berniyh/.mplayer/fonts'
Using nanosleep() timing
get_path('input.conf') -> '/home/berniyh/.mplayer/input.conf'
Can't open input config file /home/berniyh/.mplayer/input.conf: No such file or directory
Can't open input config file /usr/local/etc/mplayer/input.conf: No such file or directory
Falling back on default (hardcoded) input config
get_path('test.avi.conf') -> '/home/berniyh/.mplayer/test.avi.conf'

Playing ../../test.avi.
get_path('sub/') -> '/home/berniyh/.mplayer/sub/'
[file] File size is 225071104 bytes
STREAM: [file] ../../test.avi
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
AVI file format detected.
list_end=0x2292
======= AVI Header =======
us/frame: 33367 (fps=29.970)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (272) HAS_INDEX IS_INTERLEAVED
frames total: 35153 initial: 0
streams: 2
Suggested BufferSize?: 0
Size: 720 x 480
==========================
list_end=0x10F4
==> Found video stream: 0

STREAM Header =====

Type: vids FCC: divx (78766964)
Flags: 0
Priority: 0 Language: 0
InitialFrames?: 0
Rate: 30000/1001 = 29.970
Start: 0 Len: 35153
Suggested BufferSize?: 34750
Quality 10000
Sample size: 0
==========================
Found 'bih', 40 bytes of 40
======= VIDEO Format ======

biSize 40
biWidth 720
biHeight 480
biPlanes 1
biBitCount 24
biCompression 808802372='DX50'
biSizeImage 2073600

===========================
Regenerating keyframe table for MPEG-4 video.
list_end=0x2186
==> Found audio stream: 1

STREAM Header =====

Type: auds FCC: (0)
Flags: 0
Priority: 0 Language: 0
InitialFrames?: 1
Rate: 15963/1 = 15963.000
Start: 0 Len: 18724134
Suggested BufferSize?: 8000
Quality 4294967295
Sample size: 1
==========================
Found 'wf', 30 bytes of 18
======= WAVE Format =======
Format Tag: 85 (0x55)
Channels: 2
Samplerate: 44100
avg byte/sec: 15963
Block align: 1
bits/sample: 0
cbSize: 12
mp3.wID=1
mp3.fdwFlags=0x2
mp3.nBlockSize=417
mp3.nFramesPerBlock=1
mp3.nCodecDelay=1393
==========================================================================
list_end=0x2292
AVI: dmlh found (size=248) (total_frames=35153)
list_end=0xD592A9E
Found movie at 0x280C - 0xD592A9E
Reading INDEX block, 70212 chunks for 35153 frames (fpos=223947430).
AVI index offset: 0x2808 (movi=0x280C idx0=0x4 idx1=0x1F4C)
Auto-selected AVI audio ID = 1
Auto-selected AVI video ID = 0
AVI: Searching for audio stream (id:1)
AVI video size=204629140 (35153) audio size=18724134 (18724134)
VIDEO: [DX50] 720x480 24bpp 29.970 fps 1395.7 kbps (170.4 kbyte/s)
[V] filefmt:3 fourcc:0x30355844 size:720x480 fps:29.97 ftime:=0.0334
get_path('sub/') -> '/home/berniyh/.mplayer/sub/'
X11 opening display: :0.0
vo: X11 color mask: FFFFFF (R:FF0000 G:FF00 B:FF)
vo: X11 running at 1600x2400 with depth 24 and 32 bpp (":0.0" => local display)
[x11] Detected wm supports NetWM.
[x11] Detected wm supports FULLSCREEN state.
[x11] Detected wm supports ABOVE state.
[x11] Detected wm supports BELOW state.
[x11] Detected wm supports STAYS_ON_TOP state.
[x11] Current fstype setting honours FULLSCREEN STAYS_ON_TOP ABOVE BELOW X atoms
[xv common] Drawing colorkey manually.
[xv common] Using colorkey from Xv (0x00001e).
[xv common] Maximum source image dimensions: 2048x2048
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
dec_audio: Allocating 4608 + 65536 = 70144 bytes for output buffer.
mp3lib: using generic C decore!
MP3lib: init layer2&3 finished, tables done
MPEG 1.0, Layer III, 44100 Hz 128 kbit Joint-Stereo, BPF: 417
Channels: 2, copyright: No, original: Yes, CRC: No, emphasis: 0
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
Building audio filter chain for 44100Hz/2ch/s16le -> 0Hz/0ch/??...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
alsa-init: requested format: 44100 Hz, 2 channels, 9
alsa-init: using ALSA 1.0.14rc1
alsa-init: setup for 1/2 channel(s)
alsa-init: using device default
alsa-init: pcm opened in blocking mode
alsa-init: chunksize set to 1024
alsa-init: fragcount=16
alsa-init: got buffersize=65536
alsa-init: got period size 1024
alsa: 48000 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little Endian
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
AO: Description: ALSA-0.9.x-1.x audio output
AO: Author: Alex Beregszaszi, Zsolt Barat <joy@…>
AO: Comment: under developement
Building audio filter chain for 44100Hz/2ch/s16le -> 48000Hz/2ch/s16le...
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[libaf] Adding filter lavcresample
[dummy] Was reinitialized: 48000Hz/2ch/s16le
[dummy] Was reinitialized: 48000Hz/2ch/s16le
Starting playback...
[libaf] Reallocating memory in module lavcresample, old len = 0, new len = 65536
[ffmpeg] aspect_ratio: 1.500000
VDec: vo config request - 720 x 480 (preferred colorspace: Planar YV12)
Trying filter chain: vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.50:1 - prescaling to correct movie aspect.
VO Config (720x480->720x480,flags=4,'MPlayer',0x32315659)
VO: [xv] 720x480 => 720x480 Planar YV12 [zoom]
VO: Description: X11/Xv
VO: Author: Gerd Knorr <kraxel@…> and others
Xvideo image format: 0x32595559 (YUY2) packed
Xvideo image format: 0x59565955 (UYVY) packed
Xvideo image format: 0x32315659 (YV12) planar
Xvideo image format: 0x30323449 (I420) planar
using Xvideo port 67 for hw scaling
[xv] dx: 0 dy: 0 dw: 720 dh: 480
* [vo] Allocating (slices) mp_image_t, 720x480x12bpp YUV planar, 518400 bytes
get_path('subfont.ttf') -> '/home/berniyh/.mplayer/subfont.ttf'
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
[xv] dx: 0 dy: 0 dw: 720 dh: 480
XXX initial v_pts=0.000 a_pos=8000 (0.501) 1 ??% ??% ??,?% 0 0
* [vo] Allocating (slices) mp_image_t, 720x480x12bpp YUV planar, 518400 bytes
[xv] dx: 0 dy: 0 dw: 720 dh: 480: 0.001 234/234 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: 0.001 235/235 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: 0.000 236/236 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: 0.001 237/237 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: 0.002 238/238 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: 0.002 239/239 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: 0.002 241/241 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: 0.000 242/242 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: 0.002 243/243 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: 0.002 244/244 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: 0.001 245/245 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: -0.001 246/246 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: -0.001 247/247 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: -0.001 248/248 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: -0.001 249/249 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: 0.001 252/252 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: 0.001 253/253 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: 0.002 254/254 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: 0.001 256/256 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: 0.000 257/257 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: 0.001 260/260 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: 0.002 261/261 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: -0.001 267/267 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: 0.001 268/268 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: 0.001 269/269 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: 0.000 271/271 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: 0.001 272/272 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: 0.001 274/274 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: 0.000 275/275 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: 0.001 276/276 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: 0.002 277/277 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 720 dh: 480: 0.000 284/284 9% 0% 1.7% 0 0
[xv] dx: 0 dy: 0 dw: 1280 dh: 800 0.003 482/482 8% 0% 1.6% 0 0
[xv-fs] dx: 0 dy: 67 dw: 1600 dh: 1066
Uninit audio filters... 0.001 ct: 0.000 973/973 7% 0% 1.6% 0 0
[libaf] Removing filter lavcresample
[libaf] Removing filter dummy
Uninit audio: mp3lib
Uninit video: ffmpeg
alsa-uninit: pcm closed
vo: uninit ...

Exiting... (Quit)

comment:5 Changed 12 years ago by a.sporto+bzilla@…

I'm having the same problem, I do have a workaround though!
I'm running gentoo on amd64 with

  • mplayer-1.0.20070622-r1
  • nvidia-drivers-100.14.11
  • xorg-server-1.2.0-r3

and two tft monitors with twinview and

  • 1260x1024 on the left side
  • 1680x1050 (wide!) on the right side

I usually use -vo gl2 but I can't get it to work with others either.

When I switch to full screen on the left monitor, there is no problem at all.
If I switch to full screen on the right monitor, the image is fine with aspect and all but it is not maximized but using only the left 3/4th of the screen, as if it wouldn't be a wide screen. Therefore, that right 1/4th of the screen is blank. For a 16:9 movie it looks like this: (empty regions on 3 sides of the picture)


XXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXX


I tried to get mplayer to open the window on the right screen initially with -geometry but if I use higher values they seem to wrap around and it's still opened on the left display.

HOWEVER, if I start mplayer with two videos, move the window to the right screen and then press enter to start the second video, THEN it works! Nice full screen on my wide monitor.

It seems that some detection code is only run when a video is started and should be run whenever a switch to full screen is done.

comment:6 Changed 12 years ago by reimar

  • Owner changed from beastd to Reimar.Doeffinger@…
  • Status changed from reopened to new

If I switch to full screen on the right monitor

Hmm.. how do you make it switch to fullscreen on the right monitor? You didn't move it to the right screen and you didn't use -geometry or -xineramascreen, right?
Try using things like -fstype none, -xineramascreen 1 etc.

comment:7 Changed 12 years ago by berniyh@…

I can confirm, that the workaround does work.

You don't need to do anything with the first video. It just has to be opened
with the same vo as the second one. It doesn't need to be moved around or
made fullscreen or anything else.
When it runs, run a second mplayer instance with the same vo and it will scale
correctly without any parameter.

I don't know, if this is a possible explanation, but I think, that the reason that
this works is, that mplayer (or the vo component) thinks, the video should run
on another screen, and therefore gets the coordinates and size of the other
monitor (and the correct ones).

comment:8 Changed 12 years ago by berniyh@…

(In reply to comment #6)

Try using things like -fstype none, -xineramascreen 1 etc.

-xineramascreen is the parameter that makes this work, but shouldn't the size
of the current screen be autodetected?
Since this does work for other applications (xine for instance scales correctly,
depending on the monitor the movie is running).

comment:9 Changed 12 years ago by a.sporto+bzilla@…

(In reply to comment #6)

If I switch to full screen on the right monitor

Hmm.. how do you make it switch to fullscreen on the right monitor? You didn't
move it to the right screen and you didn't use -geometry or -xineramascreen,
right?

The second video opens up on the right screen because I moved the window of the first one to the right. mplayer remembers the position. so in sequence

  • mplayer a.avi b.avi
  • move window to right screen
  • press enter
  • b.avi opens up on right screen
  • pressing f now results in a really full screen video output

Try using things like -fstype none

works, although my task bar is still visible then

, -xineramascreen 1 etc.

Tried that earlier with -xineramascreen 1 and -xineramascreen 2, didn't change anything. BUT I just tried -xineramascreen 0, WORKS! Video opens up on the right screen and full screen is fine. Thanks! However, as expected there's again a problem when I move the window to the left screen and go to full screen, full screen is used but for only the left 3/4th of the video.

So now I'll just have to choose which monitor I want to use before I open a video and can't switch in between. I can live with that although it should probably be fixed anyway :)

comment:10 Changed 12 years ago by reimar

(In reply to comment #9)

(In reply to comment #6)

Hmm.. how do you make it switch to fullscreen on the right monitor? You didn't
move it to the right screen and you didn't use -geometry or -xineramascreen,
right?

The second video opens up on the right screen because I moved the window of the
first one to the right. mplayer remembers the position. so in sequence

  • mplayer a.avi b.avi
  • move window to right screen
  • press enter
  • b.avi opens up on right screen
  • pressing f now results in a really full screen video output

No, I meant for the case where it doesn't work.

Try using things like -fstype none

works, although my task bar is still visible then

Sounds like your WindowManager? is to blame then. Which one do you use?
Try -ontop to get rid of the task bar.

, -xineramascreen 1 etc.

Tried that earlier with -xineramascreen 1 and -xineramascreen 2, didn't change
anything. BUT I just tried -xineramascreen 0, WORKS! Video opens up on the
right screen and full screen is fine. Thanks! However, as expected there's
again a problem when I move the window to the left screen and go to full
screen, full screen is used but for only the left 3/4th of the video.

Well, actually with -xineramascreen 0 MPlayer is then supposed to got to fullscreen on the right screen, which is why it uses the resolution of your right screen. Unfortunately your Window Manager decides to put it in fullscreen on the left screen.
I do not yet know if or how an application can tell the WindowManager? which screen to use for fullscreen.

So now I'll just have to choose which monitor I want to use before I open a
video and can't switch in between. I can live with that although it should
probably be fixed anyway :)

Yes, but so far I can't reproduce, can't tell for sure whose fault it is and certainly don't know what the right fix is...

comment:11 Changed 12 years ago by reimar

  • Resolution set to fixed
  • Status changed from new to closed

Made a little debugging session with ln- on IRC and it seems to be fixed with SVN r23895 and r23896.
If you still have problems with newer versions please reopen.

Note: See TracTickets for help on using tickets.