Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 563458 - dev-qt/qtwidgets-5.5.1 - backport patch for media-video/vlc-2.2.1 problem with video output
Summary: dev-qt/qtwidgets-5.5.1 - backport patch for media-video/vlc-2.2.1 problem wit...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL: https://codereview.qt-project.org/139066
Whiteboard:
Keywords:
: 563550 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-10-19 05:06 UTC by jorgicio
Modified: 2015-12-09 13:20 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
upstream patch for qtwidgets (QTBUG-48321.patch,1.02 KB, patch)
2015-10-30 08:38 UTC, Märt Bakhoff
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jorgicio 2015-10-19 05:06:26 UTC
Well... since I upgraded to QT 5.5, recompiled VLC, and this happens: the video output shows a cut image.

https://gyazo.com/e55dd5963d613913343a91ea267afbff

I tried compiling with GCC, Clang, recompiling X and Intel drivers, and it's still the same.

Thanks.

Reproducible: Always
Comment 1 Märt Bakhoff 2015-10-20 10:47:58 UTC
I see the same thing. Compiling VLC with USE="qt4 -qt5" fixes the video output for me. Using Qt 5.5.1 + KDE plasma 5.4.2 + Intel graphics.
Comment 2 William 2015-10-21 09:18:59 UTC
Same here. Preferences/all/interface/qt, disable "resize interface to native video size" helped. 

But in fullscreen I get a big black rectangle (probably where the fullscreen controller that appears when you move the mouse should be).
http://imgur.com/x9Ko0xM

If I go back to non-fullscreen, I get the uncropped video without the black rectangle. 
Fullscreen works with cvlc.
Comment 3 jorgicio 2015-10-21 13:33:21 UTC
(In reply to Märt Bakhoff from comment #1)
> I see the same thing. Compiling VLC with USE="qt4 -qt5" fixes the video
> output for me. Using Qt 5.5.1 + KDE plasma 5.4.2 + Intel graphics.

Well, I did the same and the issue is solved.

I compared this situation with other distros (even binary-based), and all their VLC versions depend on QT4 and NOT QT5 (Arch Linux, i.e.)

So I think QT5 support for VLC may be unstable.
Comment 4 Miroslav Šulc gentoo-dev 2015-10-23 07:38:06 UTC
*** Bug 563550 has been marked as a duplicate of this bug. ***
Comment 5 Märt Bakhoff 2015-10-24 09:38:16 UTC
you can also work around it by unticking "integrate video in interface" in settings. 

upstream bug: 
https://trac.videolan.org/vlc/ticket/15737
Comment 6 Ian Delaney (RETIRED) gentoo-dev 2015-10-25 03:25:04 UTC
Suggests a need for either disabling video capability with USE=qt5 or masking qt5 use flag for vlc all together
Comment 7 Märt Bakhoff 2015-10-30 08:38:04 UTC
Created attachment 415738 [details, diff]
upstream patch for qtwidgets

Fixed in QT: https://bugreports.qt.io/browse/QTBUG-48321

I tried to apply the patch to qtwidgets-5.5.1 ebuild and it fixed the issue for me
Comment 8 jorgicio 2015-10-30 13:03:00 UTC
I also confirm the patch fixes the issue.
I hope qtwidgets maintainer looks that.
Comment 9 Nathan Caldwell 2015-10-31 22:55:57 UTC
Hi, the patch attached doesn't work for me. My videos are still cropped and the larger I make the window the more cropped they become. Is there anything else I need to recompile besides qtwidgets?

I also noticed that even though I have USE="qt5 -qt4" vlc still seems to be using the QT4 interface:

> [000000000160f218] core interface debug: using interface module "qt4"

> $ emerge -pv vlc
> [ebuild   R    ] media-video/vlc-2.2.1-r1:0/5-8::gentoo  USE="X a52 alsa avcodec avformat bluray cdda dbus dts dvb dvbpsi dvd encode ffmpeg flac fontconfig gcrypt gnutls ieee1394 jpeg kde libass libav libnotify libsamplerate live lua matroska mp3 mpeg ncurses ogg opengl opus png qt5 rtsp samba schroedinger sdl svg swscale theora truetype udev upnp v4l vaapi vdpau vnc vorbis vpx x264 xcb xml xv zeroconf -aalib (-altivec) -atmo (-audioqueue) -bidi -cddb -chromaprint -dc1394 -debug -directfb (-directx) (-dxva2) -faad -fdk -fluidsynth -gme -gnome -growl -httpd -jack -kate -libcaca -libtar -libtiger -linsys -lirc (-macosx-dialog-provider) (-macosx-eyetv) (-macosx-qtkit) (-macosx-quartztext) (-media-library) -modplug -mtp -musepack (-neon) -omxil -opencv -optimisememory -postproc -projectm -pulseaudio -qt4 -rdp -run-as-root -sdl-image -sftp -shout -sid -skins -speex -taglib {-test} -tremor -twolame -vcdx -vlm -wma-fixed -x265 -zvbi" CPU_FLAGS_X86="mmx sse" 0 KiB
Comment 10 jorgicio 2015-10-31 23:46:24 UTC
(In reply to Nathan Caldwell from comment #9)
> Hi, the patch attached doesn't work for me. My videos are still cropped and
> the larger I make the window the more cropped they become. Is there anything
> else I need to recompile besides qtwidgets?
> 
> I also noticed that even though I have USE="qt5 -qt4" vlc still seems to be
> using the QT4 interface:
> 
> > [000000000160f218] core interface debug: using interface module "qt4"
> 
> > $ emerge -pv vlc
> > [ebuild   R    ] media-video/vlc-2.2.1-r1:0/5-8::gentoo  USE="X a52 alsa avcodec avformat bluray cdda dbus dts dvb dvbpsi dvd encode ffmpeg flac fontconfig gcrypt gnutls ieee1394 jpeg kde libass libav libnotify libsamplerate live lua matroska mp3 mpeg ncurses ogg opengl opus png qt5 rtsp samba schroedinger sdl svg swscale theora truetype udev upnp v4l vaapi vdpau vnc vorbis vpx x264 xcb xml xv zeroconf -aalib (-altivec) -atmo (-audioqueue) -bidi -cddb -chromaprint -dc1394 -debug -directfb (-directx) (-dxva2) -faad -fdk -fluidsynth -gme -gnome -growl -httpd -jack -kate -libcaca -libtar -libtiger -linsys -lirc (-macosx-dialog-provider) (-macosx-eyetv) (-macosx-qtkit) (-macosx-quartztext) (-media-library) -modplug -mtp -musepack (-neon) -omxil -opencv -optimisememory -postproc -projectm -pulseaudio -qt4 -rdp -run-as-root -sdl-image -sftp -shout -sid -skins -speex -taglib {-test} -tremor -twolame -vcdx -vlm -wma-fixed -x265 -zvbi" CPU_FLAGS_X86="mmx sse" 0 KiB

I also noticed that.

How did you compile? I recommend do it with the ebuild files and commands, and patching by hand.

Also, all QT-related packages must have the epatch_user command because of the same reason. The easiest way to patch.
Comment 11 jorgicio 2015-10-31 23:59:09 UTC
About using qt4 plugin when using QT5, I found this: http://stackoverflow.com/a/31259038
Comment 12 Märt Bakhoff 2015-11-01 09:09:39 UTC
I think VLC always says "core interface debug: using interface module qt4", even when you use qt5. It's just a hardcoded interface module name?

For patching you can try what I did: 
1. save the patch as portage/dev-qt/qtwidgets/files/qtwidgets-5.5.1-48321.patch
2. add PATCHES=("${FILESDIR}/${PN}-5.5.1-48321.patch") before src_configure()
3. remanifest and emerge

Emerge output should show:
>>> Preparing source in /var/tmp/portage/...
 * Applying qtwidgets-5.5.1-48321.patch  [ ok ]
>>> Source prepared.
Comment 13 Nick Andrade 2015-11-02 03:44:27 UTC
(In reply to Nathan Caldwell from comment #9)
> I also noticed that even though I have USE="qt5 -qt4" vlc still seems to be
> using the QT4 interface:

Hi Nathan, to confirm your QT version being used, I suggest the following: 
$ scanelf -n /usr/lib64/vlc/plugins/gui/libqt4_plugin.so 

If using QT4, the output to expect is:
libvlccore.so.8,librt.so.1,libidn.so.11,libpthread.so.0,libdl.so.2,libdbus-1.so.3,libQtGui.so.4,libQtCore.so.4,libX11.so.6,libstdc++.so.6,libm.so.6,libc.so.6,libgcc_s.so.1 /usr/lib64/vlc/plugins/gui/libqt4_plugin.so 


QT5 Output:
libvlccore.so.8,librt.so.1,libidn.so.11,libpthread.so.0,libdl.so.2,libdbus-1.so.3,libQt5Widgets.so.5,libQt5X11Extras.so.5,libQt5Gui.so.5,libQt5Core.so.5,libX11.so.6,libstdc++.so.6,libm.so.6,libc.so.6,libgcc_s.so.1 /usr/lib64/vlc/plugins/gui/libqt4_plugin.so
Comment 14 Nick Andrade 2015-11-02 03:48:10 UTC
I confirmed the issue is not present with QT4 (as expected), occurs with the latest QT5 in portage, and the attached patch does fix it for me (applied via epatch_user).  

I'm hoping this gets fixed fairly quick.  Upstream VLC doesn't allow users to choose their QT version, and likewise anyone who has both QT4 & QT5 installed will default to using QT5 (and be impacted).
Comment 15 Nathan Caldwell 2015-11-04 04:37:15 UTC
(In reply to Nick Andrade from comment #13)
> (In reply to Nathan Caldwell from comment #9)
> > I also noticed that even though I have USE="qt5 -qt4" vlc still seems to be
> > using the QT4 interface:
> 
> Hi Nathan, to confirm your QT version being used, I suggest the following: 
> $ scanelf -n /usr/lib64/vlc/plugins/gui/libqt4_plugin.so 

Thanks Nick. Looks like it is using QT5 after all. 

(In reply to jorgicio from comment #10)
> 
> How did you compile? I recommend do it with the ebuild files and commands,
> and patching by hand.
> 
> Also, all QT-related packages must have the epatch_user command because of
> the same reason. The easiest way to patch.

Using epatch_user. The patch successfully applied.

I tried redownloading the patch and recompiling again and now it's fixed for me too.
Comment 16 Ettore Di Giacinto (RETIRED) gentoo-dev 2015-11-19 20:10:54 UTC
I can confirm the bug, and the patch is solving the problem (well, partially in my machine, mouse isn't visible inside the video window). 
https://github.com/Sabayon/for-gentoo/tree/master/dev-qt/qtwidgets
Comment 17 Davide Pesavento (RETIRED) gentoo-dev 2015-11-27 23:10:23 UTC
The patch has been included in qtwidgets-5.5.1-r1, thanks everyone.
Comment 18 jospezial 2015-12-03 05:14:41 UTC
@Märt:
Could you please write them on the upstream bug to include the patch into 5.5 branch too?
As now it was only included upstream in 5.6.


Will the next release be a 5.5.x or 5.6.x ?
Comment 19 Michael Palimaka (kensington) gentoo-dev 2015-12-03 11:59:59 UTC
(In reply to jospezial from comment #18)
> @Märt:
> Could you please write them on the upstream bug to include the patch into
> 5.5 branch too?
> As now it was only included upstream in 5.6.
> 
> 
> Will the next release be a 5.5.x or 5.6.x ?

No further 5.5.x releases are expected AFAIK.