vlc-qt libraries not working in Qt 5 in Ubuntu 14.04

This forum is about all development around libVLC.
manojpatidar
Blank Cone
Blank Cone
Posts: 10
Joined: 13 Feb 2015 14:15

vlc-qt libraries not working in Qt 5 in Ubuntu 14.04

Postby manojpatidar » 13 Feb 2015 14:22

At my end vlc-qt libraries working in Qt 4.8.6 but not working in Qt 5 in Ubuntu 14.04.
In Qt5 vlc-qt libraries compiled successfully but getting crashed while run the project into Qt5 in Ubuntu 14.04. Can anyone help me in this ?

Thanks.

Rémi Denis-Courmont
Developer
Developer
Posts: 15216
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: vlc-qt libraries not working in Qt 5 in Ubuntu 14.04

Postby Rémi Denis-Courmont » 13 Feb 2015 16:11

You can´t have two versions of Qt in the same process. Since Ubuntu currently compiles VLC with Qt4, you need to do likewise.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

manojpatidar
Blank Cone
Blank Cone
Posts: 10
Joined: 13 Feb 2015 14:15

Re: vlc-qt libraries not working in Qt 5 in Ubuntu 14.04

Postby manojpatidar » 14 Feb 2015 07:36

You can´t have two versions of Qt in the same process. Since Ubuntu currently compiles VLC with Qt4, you need to do likewise.
Thanks for your post. Are you sure that vlc-qt libs could not compile on QT5 in Ubuntu ?
Because somewhere in my research I read that vlc libraries version 2.2 or onwards can be work in QT5 on Ubuntu ( But I have vlc libs vesrion 2.1.4 Rincewind which are working fine in QT 4.8.6 in Ubuntu ) .

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: vlc-qt libraries not working in Qt 5 in Ubuntu 14.04

Postby RSATom » 14 Feb 2015 07:52

You could link your libvlc application with qt5, but you have to remove libqt4_plugin.so to be able to run it.

manojpatidar
Blank Cone
Blank Cone
Posts: 10
Joined: 13 Feb 2015 14:15

Re: vlc-qt libraries not working in Qt 5 in Ubuntu 14.04

Postby manojpatidar » 14 Feb 2015 08:50

You could link your libvlc application with qt5, but you have to remove libqt4_plugin.so to be able to run it.
Thanks for your reply. Do you able to link vlc-qt libs with QT5 in Ubuntu at your end ?

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: vlc-qt libraries not working in Qt 5 in Ubuntu 14.04

Postby RSATom » 14 Feb 2015 09:19

Yes, I do. On Xubuntu 14, but not vlc-qt - my own wrapper. But it doesn't matter, since problem is in compatibility between qt4 and qt5.

manojpatidar
Blank Cone
Blank Cone
Posts: 10
Joined: 13 Feb 2015 14:15

Re: vlc-qt libraries not working in Qt 5 in Ubuntu 14.04

Postby manojpatidar » 14 Feb 2015 09:35

Yes, I do. On Xubuntu 14, but not vlc-qt - my own wrapper. But it doesn't matter, since problem is in compatibility between qt4 and qt5.
Thanks for your answer. Can you please let me know which wrapper you have used in QT5 in Xubunutu 14 instead of vlc-qt libs ?
One more thing, now is it sure that vlc-qt libs not compatible with QT5 in Ubuntu ?

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: vlc-qt libraries not working in Qt 5 in Ubuntu 14.04

Postby RSATom » 14 Feb 2015 09:39


RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: vlc-qt libraries not working in Qt 5 in Ubuntu 14.04

Postby RSATom » 14 Feb 2015 09:50

and again, problem is not with vlc-qt (or any other wrapper). Problem is Vlc uses Qt for gui on Linux. And this day it's usually Qt4. When you link your own application with Qt5 and libvlc, on start libvlc anyway loads all plugins (even if some of them will not be used), and GUI plugin is one of them. And you get crash.

So, finally solution is just remove libvlc's Qt GUI plugin = libqt4_plugin.so

Rémi Denis-Courmont
Developer
Developer
Posts: 15216
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Postby Rémi Denis-Courmont » 14 Feb 2015 13:14

Are you sure that vlc-qt libs could not compile on QT5 in Ubuntu ?
I never wrote or implied that. It is just a fact that all released versions (as of today) of Ubuntu provide (Lib)VLC compiled with Qt4, not with Qt5.

That being said, the only reason why it crashes is a bug in Debian/Ubuntu packaging: https://bugs.debian.org/cgi-bin/bugrepo ... bug=755154
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

manojpatidar
Blank Cone
Blank Cone
Posts: 10
Joined: 13 Feb 2015 14:15

Re: vlc-qt libraries not working in Qt 5 in Ubuntu 14.04

Postby manojpatidar » 16 Feb 2015 09:39

and again, problem is not with vlc-qt (or any other wrapper). Problem is Vlc uses Qt for gui on Linux. And this day it's usually Qt4. When you link your own application with Qt5 and libvlc, on start libvlc anyway loads all plugins (even if some of them will not be used), and GUI plugin is one of them. And you get crash.

So, finally solution is just remove libvlc's Qt GUI plugin = libqt4_plugin.so
Thanks for your post. Yes you are right. In research I also found the same.
Can you please let me know do I need to delete /usr/lib/vlc/plugins/libqt4_plugin.so from my machine or I can just move to the same at other place in my machine. Because I just moveed the /usr/lib/vlc/plugins/libqt4_plugin.so to some other path in my machine and it still not working.

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: vlc-qt libraries not working in Qt 5 in Ubuntu 14.04

Postby RSATom » 16 Feb 2015 09:43

move libqt4_plugin.so away from Vlc plugins folder should be enough.

at least for me it worked. Maybe you have some another problem too.

manojpatidar
Blank Cone
Blank Cone
Posts: 10
Joined: 13 Feb 2015 14:15

Re:

Postby manojpatidar » 16 Feb 2015 09:52

Are you sure that vlc-qt libs could not compile on QT5 in Ubuntu ?
I never wrote or implied that. It is just a fact that all released versions (as of today) of Ubuntu provide (Lib)VLC compiled with Qt4, not with Qt5.

That being said, the only reason why it crashes is a bug in Debian/Ubuntu packaging: https://bugs.debian.org/cgi-bin/bugrepo ... bug=755154
Actually the issue I am facing is that when I build the vlc-qt libs in QT 4.8.6 then it built and run successfully in Ubuntu but getting some efficiency issue during setting the volume of vlc media by setVolume() method.
It will set the volume to the vlc media after a delay of 1 second, that is why I was looking to build vlc-qt libs in QT 5 so that it can fix the volume setting delay issue. Btw Thanks for your help.

manojpatidar
Blank Cone
Blank Cone
Posts: 10
Joined: 13 Feb 2015 14:15

Re: vlc-qt libraries not working in Qt 5 in Ubuntu 14.04

Postby manojpatidar » 16 Feb 2015 12:50

move libqt4_plugin.so away from Vlc plugins folder should be enough.

at least for me it worked. Maybe you have some another problem too.
Can you please let me know on Ubuntu and QT version on which it worked at your end ? I am using QT 5.4 and Ubuntu 14.04, 64bit.

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: vlc-qt libraries not working in Qt 5 in Ubuntu 14.04

Postby RSATom » 16 Feb 2015 13:46

Checked right now on latest Linux Mint x64 + qt 5.4 + https://github.com/RSATom/QmlVlcDemo:
With libqt4_plugin.so it's crushed on start, after rename it to libqt4_plugin.so_ - it runs ok.

manojpatidar
Blank Cone
Blank Cone
Posts: 10
Joined: 13 Feb 2015 14:15

Re: vlc-qt libraries not working in Qt 5 in Ubuntu 14.04

Postby manojpatidar » 16 Feb 2015 15:55

Checked right now on latest Linux Mint x64 + qt 5.4 + https://github.com/RSATom/QmlVlcDemo:
With libqt4_plugin.so it's crushed on start, after rename it to libqt4_plugin.so_ - it runs ok.
I downloaded the code from the above link but I get the empty folder QmlVlcDemo-master/deps/libvlc-sdk and mlVlcDemo-master/deps/QmlVlc so I am getting the error QmlVlc.h file not found while I run this project into QT creater.

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: vlc-qt libraries not working in Qt 5 in Ubuntu 14.04

Postby RSATom » 16 Feb 2015 15:58

you should run
git submodule update --init --recursive
before build

manojpatidar
Blank Cone
Blank Cone
Posts: 10
Joined: 13 Feb 2015 14:15

Re: vlc-qt libraries not working in Qt 5 in Ubuntu 14.04

Postby manojpatidar » 17 Feb 2015 08:38

Thanks RSATom . Now I am able to play Qmlvlcdemo which is shared by you in QT 5.4, Ubuntu 14.04 as per suggestion.
But my need is to run vlc-qt libs in QT 5, Ubuntu 14.04. It would be great for me if anyone suggest me to run vlc-qt libs in QT 5, Ubuntu 14.04.
Anyway, I am very thankful to all Videolan members who have given their precious time to advice me to resolve my issue.

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: vlc-qt libraries not working in Qt 5 in Ubuntu 14.04

Postby RSATom » 17 Feb 2015 08:46

then it will be better ask about vlc-qt at https://github.com/ntadej/vlc-qt

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: vlc-qt libraries not working in Qt 5 in Ubuntu 14.04

Postby RSATom » 11 Mar 2015 12:15

I've found the way how to build application with Qt5 and libvlc on linux and don't get crash on start:

Code: Select all

sudo /usr/lib/vlc/vlc-cache-gen -f /usr/lib/vlc/plugins
It will rebuild plugins cache and Qt4 gui plugin will not load on libvlc init.

Rémi Denis-Courmont
Developer
Developer
Posts: 15216
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: vlc-qt libraries not working in Qt 5 in Ubuntu 14.04

Postby Rémi Denis-Courmont » 11 Mar 2015 13:19

Yes, that is the Debian bug linked above already
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: vlc-qt libraries not working in Qt 5 in Ubuntu 14.04

Postby RSATom » 11 Mar 2015 13:23

Yes, exactly, link above just not contain exact command to fix it.

manojpatidar
Blank Cone
Blank Cone
Posts: 10
Joined: 13 Feb 2015 14:15

Re: vlc-qt libraries not working in Qt 5 in Ubuntu 14.04

Postby manojpatidar » 11 Mar 2015 13:34

I've found the way how to build application with Qt5 and libvlc on linux and don't get crash on start:

Code: Select all

sudo /usr/lib/vlc/vlc-cache-gen -f /usr/lib/vlc/plugins
It will rebuild plugins cache and Qt4 gui plugin will not load on libvlc init.
Thanks RSATom for your post. FYI I have already done with this command and tried it again now but still geting the same issue.
I am using Qt 5.4, Ubuntu 14.04. FYI, I have also posted the same issue here https://github.com/ntadej/vlc-qt/issues/69. It says that there is packaging bug of vlc-qt libs with QT 5.

Did you test your suggestion/idea with vlc-qt libs with Qt5 into Ubuntu 14.04 ? Is it working at your end ?

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: vlc-qt libraries not working in Qt 5 in Ubuntu 14.04

Postby RSATom » 11 Mar 2015 13:37

it works at least on Linux Mint 17 (I'm on it right now) and at least with QmlVlcDemo

Vinz
New Cone
New Cone
Posts: 1
Joined: 01 Aug 2016 06:11

Re: vlc-qt libraries not working in Qt 5 in Ubuntu 14.04

Postby Vinz » 01 Aug 2016 06:28

If you still end up with configure: error: "You cannot build VLC with Qt-5.5.0. You need to backport I78ef29975181ee22429c9bd4b11d96d9e68b7a9c"

Simple solution is uninstall the qt5 temporary, compile your Vlc and then reinstall them.

On my Ubuntu 16.04.1 x64 it was the:
qt5-default qt5-qmake qtbase5-dev qtbase5-dev-tools libqt5opengl5-dev libqt5x11extras5-dev

!!!WARNING!!!
After you uninstall them dont reboot, just compile your Vlc and then reinstall them.

(In my Case they were needed for the Nvidia Driver.)

I Compiled the VLC 2.2.4 Sucessesfully and it runs great. ;)


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 0 guests