Opened 10 years ago

Closed 7 years ago

#2213 closed defect (fixed)

Fullscreen mplayer crops menubar area and does not cover Dock area in OS X Yosemite

Reported by: machsna Owned by: beastd
Priority: normal Component: vo
Version: unspecified Severity: normal
Keywords: osx Cc:
Blocked By: Blocking:
Reproduced by developer: yes Analyzed by developer: yes

Description

Summary of the bug:

  1. When you enter fullscreen mode in Mac OS X 10.10 "Yosemite" by hitting the interactive keyboard control for Toggle fullscreen (f), the areas of the screen that are normally occupied by the menubar is cropped from the fullscreen image, while the are normally occupied by the Dock remains outside of the fullscreen image. The menubar and the Dock are not displayed. Instead, the desktop wallpaper shines through.
  1. When you start mplayer with the fullscreen playback flag (-fs), it does not open in a fullscreen window. Instead, it opens in a window with a normal title bar. The areas normally occupied by the menubar and the Dock remain outside of this window. Again, the desktop wallpaper shines throuth in these areas.

This affects the following versions of mplayer:

  • MPlayer SVN-r36986-4.2.1 (C) 2000-2014 MPlayer Team from MPlayer OSX Extended.app rev15 (1511) – not the GUI app, but instead, the proper CLI mplayer that is hidden within the app bundle:
    /Applications/MPlayer\ OSX\ Extended.app/Contents/Resources/Binaries/mpextended.mpBinaries/Contents/MacOS/mplayer
    
  • MPlayer UNKNOWN-4.2.1 (C) 2000-2014 MPlayer Team from macport's mplayer-devel @37268_0
  • MPlayer 1.1-4.2.1 (C) 2000-2012 MPlayer Team from macport's MPlayer @1.1_8 (except that in this older build, the -fs flag has the same effect as hitting the interactive keyboard control for Toggle fullscreen)

I am sorry I have failed at building mplayer from the latest SVN. However, seeing as several versions of mplayer are equally affected, it seems likely that this is really a problem in the mplayer core, and not in some particular build of macports or MPlayer OSX Extended.app.

Ultimately, this bug is probably caused by a change in the handling of fullscreen apps that must have been introduced with Yosemite. There were no such issues with mplayer in previous versions of Mac OS X. Other players such as MPlayer OSX Extended.app (in normal GUI mode) or VLC handle Yosemite fullscreen mode just fine, but of course, they lack the CLI power of proper mplayer.

Attachments (5)

toggle_fullscreen.png (668.9 KB ) - added by machsna 10 years ago.
mplayer after hitting f for toggle fullscreen, menubar is cropped, the file is https://commons.wikimedia.org/wiki/File:His_Majesty,_the_Scarecrow_of_Oz_%281914%29.webm ca. 00:00:20
fs_flag.2.png (667.3 KB ) - added by machsna 10 years ago.
mplayer with -fs flag, menubar and Dock areas are not covered, the file is https://commons.wikimedia.org/wiki/File:His_Majesty,_the_Scarecrow_of_Oz_%281914%29.webm ca. 00:00:20
fs_flag.png (667.3 KB ) - added by machsna 10 years ago.
mplayer with -fs flag, menubar and Dock areas are not covered, the file is https://commons.wikimedia.org/wiki/File:His_Majesty,_the_Scarecrow_of_Oz_%281914%29.webm ca. 00:00:20
mplayer-verbose.txt (6.8 KB ) - added by Vorb 10 years ago.
Verbose output
beastd-mplayer-vo-gl-sdl2-hack.diff (10.8 KB ) - added by beastd 9 years ago.
SDL2 patch for use with vo gl

Download all attachments as: .zip

Change History (19)

by machsna, 10 years ago

Attachment: toggle_fullscreen.png added

mplayer after hitting f for toggle fullscreen, menubar is cropped, the file is https://commons.wikimedia.org/wiki/File:His_Majesty,_the_Scarecrow_of_Oz_%281914%29.webm ca. 00:00:20

by machsna, 10 years ago

Attachment: fs_flag.2.png added

mplayer with -fs flag, menubar and Dock areas are not covered, the file is https://commons.wikimedia.org/wiki/File:His_Majesty,_the_Scarecrow_of_Oz_%281914%29.webm ca. 00:00:20

by machsna, 10 years ago

Attachment: fs_flag.png added

mplayer with -fs flag, menubar and Dock areas are not covered, the file is https://commons.wikimedia.org/wiki/File:His_Majesty,_the_Scarecrow_of_Oz_%281914%29.webm ca. 00:00:20

comment:1 by beastd, 10 years ago

Status: newopen

Can you paste console output of MPlayer (mplayer -v) here?

Also it seems a bit strange no one else reported this yet.

by Vorb, 10 years ago

Attachment: mplayer-verbose.txt added

Verbose output

comment:2 by Vorb, 10 years ago

I have the same issue on my Macbook Air 13 with Yosemite. Please find "mplayer-verbose.txt" attached to the ticket. Let me know if you need anything else.

Thanks

comment:3 by reimar, 10 years ago

Thanks for the effort in reporting the bug, however to my knowledge there are no active developers running that OSX version, so chances of getting a fix any time soon are quite low.
Especially since right now we have no idea at all what causes this.

in reply to:  2 comment:4 by beastd, 9 years ago

Replying to Vorb:

I have the same issue on my Macbook Air 13 with Yosemite. Please find "mplayer-verbose.txt" attached to the ticket. Let me know if you need anything else.

Sorry I do not use OSX and I could not find anything suspicious in the log you provided.

But I thought I might at least ask if you can still reproduce the annoying fullscreen behaviour?

comment:5 by machsna, 9 years ago

Yes, the issue persists on OS X 10.11.

There is a workaround now: When you set the system not to display the menubar, and then start mplayer, and then hit f for entering fullscreen mode, mplayer displays all over the screen. However, if you start mplayer with the -fs flag, then it displays the window title bar, and you have to hit f twice so mplayer covers the entire screen (more or less like in the original report).

The only real workaround is using VLC instead of mplayer, even though it lacks a decent CLI.

in reply to:  5 comment:6 by beastd, 9 years ago

Replying to machsna:

Yes, the issue persists on OS X 10.11.

Can you check if other video output modules are available

mplayer -vo help

and test with e.g. gl or sdl or whatever else is available?

comment:7 by machsna, 9 years ago

The only output module that actually produces video output is corevideo. The other output modules are null and various modules that produce different kinds of files (mpegpes yuv4mpeg png jpeg tga pnm md5su).

comment:8 by machsna, 9 years ago

I have rebuilt mplayer with more output modules (port -c install mplayer-devel +fribidi +glx +osd +sdl +x11). This gives the following additional video output modules, but it disables corevideo:

  • glx, xv, xover, gl_tiled produce no video output;
  • gl, gl_nosw, matrixview produce an output, but fail to deliver a picture (it is just an empty window), and in fullscreen the menubar area is transparent;
  • x11 produces an output with picture, but in fullscreen the menubar area is transparent (and the picture is not scaled up);
  • sdl works fine, but when it is in fullscreen it hijacks all keyboard and mouse input (not even alt-tab works or the trackpad swipes for switching between desktops or the dedicated key for "mission control").

in reply to:  8 comment:9 by beastd, 9 years ago

Thanks for testing.

Replying to machsna:

  • sdl works fine, but when it is in fullscreen it hijacks all keyboard and mouse input (not even alt-tab works or the trackpad swipes for switching between desktops or the dedicated key for "mission control").

Could you also test -vo gl:backend=2 and -vo gl:backend=4?

comment:10 by machsna, 9 years ago

-vo gl:backend=2 behaves like -vo sdl. BTW, when the output is not in fullscreen, keyboard and trackpat input works as expected (e.g. alt+tab will open the application switcher, the dedicated mission control key or the assigned trackpat gesture will open mission control, etc. etc.). They only stop working when the output is in fullscreen.

-vo gl:backend=4 produces no video output, just like glx, xv, xover, gl_tiled. To be exact, they produce a featureless mplayer instance that you can alt-tab to, just like mplayer normally does (with the corevideo output module). However, no window ever appears, and you cannot click on the menu bar menues – if you try to do so, you just get the spinning beachball of death cursor. I think it indicates that the application is unresponsive. The terminal and the audio output, however, are perfectly responsible: You can skip forward etc., and there are no constant error messages such as appear with the corevideo output module (see https://trac.macports.org/ticket/48823 ). Instead, the error message is:

Error opening/initializing the selected video_out (-vo) device.

in reply to:  10 comment:11 by beastd, 9 years ago

First of all thanks for the continued testing.

Replying to machsna:

-vo gl:backend=2 behaves like -vo sdl. BTW, when the output is not in fullscreen, keyboard and trackpat input works as expected (e.g. alt+tab will open the application switcher, the dedicated mission control key or the assigned trackpat gesture will open mission control, etc. etc.). They only stop working when the output is in fullscreen.

I think SDL and probably OpenGL via SDL could work fine on OSX.

If I understand correctly the remaining problem is that SDL uses real fullscreen which bears the problems you described. (alt+tab switching not working etc.)

SDL2 should be able to avoid that problem by "emulating" fullscreen. Thus supporting SDL2 is what I will look into next. Not sure how difficult it is and if I will be able to make it this year. If anyone else wants to look into this please tell me so we can avoid duplicate work.

[...]

by beastd, 9 years ago

SDL2 patch for use with vo gl

comment:12 by beastd, 9 years ago

Replying to beastd:
[...]

If I understand correctly the remaining problem is that SDL uses real fullscreen which bears the problems you described. (alt+tab switching not working etc.)

SDL2 should be able to avoid that problem by "emulating" fullscreen. Thus supporting SDL2 is what I will look into next. Not sure how difficult it is and if I will be able to make it this year. If anyone else wants to look into this please tell me so we can avoid duplicate work.

I was able to come up with an experimental patch. I uploaded it here.

I would be grateful if anyone could test on OSX. It should be applied from the top of mplayer source directory (e.g. patch -p1 < beastd-mplayer-vo-gl-sdl2-hack.diff).

The patch will remove vo sdl from the build and you will have to test with -vo gl:backend=2 (the title of the window should read "SDL2").

It has some known and probably some unknown shortcomings:

  • fullscreen window disappears if i click something on another monitor (at least on Windows)
  • resize does not work as expected
  • it re-creates the video window at least once
  • no -wid support

But I believe at least for single screen (full screen) it should be nicer on OSX.

comment:13 by Vorb, 8 years ago

It worked for me, thank you. Mplayer is complaining about performance issues (on my latest macbook pro 2016 15 inches) but so far I didn't notice any lags, possibly that happens when the window is being expanded, in OSX it takes some time and is animated.
It would be great to get it fixed with corevideo driver if it's possible though.

Thanks!

comment:14 by beastd, 7 years ago

Analyzed by developer: set
Component: corevo
Reproduced by developer: set
Resolution: fixed
Status: openclosed

Should be fixed in SVN after commit r37959 by Reimar.

Please reopen if it is not.

Note: See TracTickets for help on using tickets.