Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#8072 closed defect (fixed)

ffplay does not scale video to window size when exiting fullscreen

Reported by: jimbo1qaz Owned by:
Priority: normal Component: ffplay
Version: unspecified Keywords:
Cc: Marton Balint Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
How to reproduce:

% ffplay file.mp4
ffplay version N-94500-g2828f5b0d8 Copyright (c) 2003-2019 the FFmpeg developers
  built with gcc 9.1.1 (GCC) 20190807
  • While video is playing, rress F to enter fullscreen. The video will resize to fit the entire screen.
  • Press F to exit fullscreen. The video will not resize to fit the window, and only the top-left portion is visible until the window is resized.

This bug happens on both NUT holding raw video frames from stdin, and x264 MP4 files.

OS: Windows 10 x64.

I tested historical builds from https://ffmpeg.zeranoe.com/builds/win64/shared/ :

Unaffected: ffmpeg-4.1.
Affected: ffmpeg-4.1.1, 20190101, and 20190811.

Change History (13)

comment:1 by Marton Balint, 5 years ago

Cc: Marton Balint added

Seems SDL version related rather than ffmpeg version related, as ffplay did not change between 4.1 and 4.1.1. Can you check the SDL version used by zeranoe on the two builds?

comment:2 by Carl Eugen Hoyos, 5 years ago

Resolution: invalid
Status: newclosed

This cannot be fixed within FFmpeg, please report to Zeranoe.

comment:4 by Carl Eugen Hoyos, 5 years ago

Resolution: invalid
Status: closedreopened

comment:5 by jimbo1qaz, 5 years ago

This patch has been pushed to master: https://github.com/FFmpeg/FFmpeg/commit/a1c70148471c528104d64dffbc7af70e5d1ce33e

zeranoe dev is https://github.com/FFmpeg/FFmpeg/commit/8fcc5d9 and several days old. Should I wait for zeranoe to build something including this commit, or try to setup ffmpeg build myself?

Last edited 5 years ago by jimbo1qaz (previous) (diff)

comment:6 by Marton Balint, 5 years ago

Resolution: fixed
Status: reopenedclosed

I think zeranoe will auto-build a new version on git master every couple of days, so you only have to wait.

comment:7 by Balling, 5 years ago

Resolution: fixed
Status: closedreopened

Hello! Excuse me for hijacking the issue but there is still one problem.

(After testing letest zeranoe build.)

It is that when you press F ffplay first changes the window's location to left top angle of the screen (not changing its size) while it should immediatelly change to full screen with size change. You can press F for a long time to understand what is the problem. (Really it is bad.)))

Thank you very very much)

Last edited 5 years ago by Balling (previous) (diff)

comment:8 by Marton Balint, 5 years ago

Resolution: fixed
Status: reopenedclosed

FFPlay is only calling SDL_SetWindowFullscreen, it is not positioning the window any way. I suggest you report this to SDL.

in reply to:  8 ; comment:9 by Balling, 5 years ago

Replying to cus:

FFPlay is only calling SDL_SetWindowFullscreen, it is not positioning the window any way. I suggest you report this to SDL.

No, please! I do not know how to report this to SDL! At least tell me can YOU reproduce it? I.e. do you understand what I am talking about? Thanks.

in reply to:  9 ; comment:10 by Marton Balint, 5 years ago

Replying to Balling:

Replying to cus:

FFPlay is only calling SDL_SetWindowFullscreen, it is not positioning the window any way. I suggest you report this to SDL.

No, please! I do not know how to report this to SDL! At least tell me can YOU reproduce it? I.e. do you understand what I am talking about? Thanks.

I can see that the window positions itself to the top left corner for a fraction of a second before going full screen, but I guess I am used to this. Definitely has been this way as long as I can remember, going fullscreen never was "smooth". I also don't see why it is a big deal. A bit ugly, but does not affect usability.

https://bugzilla.libsdl.org/

comment:11 by jimbo1qaz, 5 years ago

Confirming that the original bug seems to be fixed. Exiting fullscreen scales the video to the proper size on Zeranoe ffmpeg-20190824.

in reply to:  10 ; comment:12 by Balling, 5 years ago

Replying to cus:

Replying to Balling:

Replying to cus:

FFPlay is only calling SDL_SetWindowFullscreen, it is not positioning the window any way. I suggest you report this to SDL.

No, please! I do not know how to report this to SDL! At least tell me can YOU reproduce it? I.e. do you understand what I am talking about? Thanks.

I can see that the window positions itself to the top left corner for a fraction of a second before going full screen, but I guess I am used to this. Definitely has been this way as long as I can remember, going fullscreen never was "smooth". I also don't see why it is a big deal. A bit ugly, but does not affect usability.

https://bugzilla.libsdl.org/

The same problem is in media player classic AND VLC((( I did not see it but now I always see it. Damn it. I open https://github.com/clsid2/mpc-hc/issues/128

in reply to:  12 comment:13 by Balling, 4 years ago

The same problem is in media player classic AND VLC((( I did not see it but now I always see it. Damn it. I open https://github.com/clsid2/mpc-hc/issues/128

It is fixed now! We used

if (IsWindows8OrGreater()) {//DWMWA_CLOAK not supported on 7
            BOOL setEnabled = FALSE;
            ::DwmSetWindowAttribute(m_hWnd, DWMWA_CLOAK, &setEnabled, sizeof(setEnabled));
        }

New CLOAK API that was added in windows 10! Cool, right! See https://github.com/clsid2/mpc-hc/pull/206/files

Last edited 4 years ago by Balling (previous) (diff)
Note: See TracTickets for help on using tickets.