[mythtv-commits] Ticket #13618: Issue in macOS for playback of 480p/i videos on retina display
MythTV
noreply at mythtv.org
Tue May 19 11:30:41 UTC 2020
#13618: Issue in macOS for playback of 480p/i videos on retina display
-------------------------------------+------------------------------
Reporter: John Hoyt | Owner: mark-kendall
Type: Bug Report - General | Status: infoneeded
Priority: minor | Milestone: needs_triage
Component: MythTV - Video Playback | Version: v31-fixes
Severity: medium | Resolution:
Keywords: MacOS VideoToolbox | Ticket locked: 0
-------------------------------------+------------------------------
Comment (by mark-kendall):
OK - progress of sorts:)
Firstly, video mode switching is accessed through
'Setup->Appearance->Separate video modes for GUI and TV playback'
If you enable that, you should then be able to select 2560x1600 for the
GUI. Then just select the same resolution for 'Video output', 'Auto' for
rate and 'Default' for 'Aspect'. (Using anything else for video playback
may just confuse the issue and is not required for this case - as the
display is native 2560x1600 and has a variable display rate - so there is
no benefit in trying to use other video modes).
It would be interesting to see playback logs if that helps - though it is
not a proper fix (it should work out of the box imho).
So I think the root cause of the problem is this line from the Qt docs:-
{{{
Typically, most applications work with device independent pixels; except
for OpenGL and code for raster graphics.
}}}
So with a retina display, the windowing system is using 1280x800 for the
mythfrontend window/widget, and this is what Qt is using/reports, but the
underlying OpenGL context will be using the native display size
(2560x1600).
The reason the HD video works and SD does not is not due to the different
resolutions but because, in this case, the SD video is interlaced and the
HD video is not. The mythtv opengl video code uses an intermediate
framebuffer for deinterlacing (to improve performance) which triggers an
OpenGL viewport change. The switch back to the regular/fullscreen viewport
after deinterlacing is presumably where it all goes wrong - as the OpenGL
context should be using 2560x1600 but is only set to 1280x800 (because
that is the window size).
If you go into the details of the video display profile
(Setup->Video->Playback->Current video Playback Profile - and then into
the specific profile details) and disable all deinterlacing, playback
*should* work.
The real head scratcher here, however, is why does the GUI work without
issue? I note you said that sometimes it starts displaying in the bottom
left and then reverts. Based on the assumption that the windowing system
and OpenGL are using different resolutions, I don't honestly understand
how it ever gets it right:)
I can only assume that there is some event received, perhaps after our
window is setup, that triggers a change.
I'll pull together a debugging patch to see what is going on.
Longer term, we need a fix that works out of the box, regardless of system
settings etc. Personally I don't think we want to be using a downscaled UI
at all - if you are playing HD/4k material, it will just be unnecessarily
downscaled - and then scaled up again by the OS; which is far from ideal.
Ideally we want to try and encourage/ensure Qt starts up with 2560x1600
(or the proper native resolution at least). I really want to avoid having
to add workarounds for scaling factors etc (i.e. using
https://doc.qt.io/qt-5/qwindow.html#devicePixelRatio).
What setting are you using for you macbook display?
(https://support.apple.com/en-us/HT202471)
--
Ticket URL: <https://code.mythtv.org/trac/ticket/13618#comment:7>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list