Enabling mp4/mpeg4/avc support for Qt5 WebEngine on Linux - qt

i installed Qt 5.4.1 x64 on LUbuntu and created an app which uses the new QtWebEngine.
I`m trying to display a html5 page with that component which is using the tag.
All works fine except if I try to playback a mp4 video. The video area remains black. It works if I use other video types like webm/ogg as source.
I know this is due to license restrictions, so that mp4 is deactivated by default in Ubuntu/Linux for Qt.
What is needed in Qt to activate it to allow mp4 playback and on what do I have pay attention in case of license terms (I read that statically linking the library is allowed?) ?
I`ve already tried to copy over the x64 distribution of libffmpegsuo.so which is included in Chrome (2,2Mb) over to the Qt directory to /plugins/webengine/ and replaced that one that was already there (1,1 Mb) but it had no effect.
In Chrome playback works fine btw.
If you need more details like paths etc. please tell me.
Thanks !

You can explicitly enable proprietary codecs (H264, MP3) when compiling Qt WebEngine:
In /path-to-qt-src-dir/qtwebengine execute:
qmake WEBENGINE_CONFIG+=use_proprietary_codecs
You should be able to see in the output that H264 codec is enabled, which is not the default configuration.

Related

Adding widevine to my QT project doesn't work

I downloaded the widevinecdm.dll file from Chrome, then in my .pro file in QT i enabled propietary codecs as said here i added also the path to the dll like this QTWEBENGINE_CHROMIUM_FLAGS=--widevine-path="C:\Users\FRANC\OneDrive\Desktop\Programacion\Proyectos\C++\widevinecdm.dll" but i still can't play netflix or any streaming service. any ideas?
This problem was solved after building QtWebEngine with proprietary codecs enabled.

Google NaCl with Qt on Windows

I have a project which is using Qt 4.7.4 version (also I can't rebuild it using qt4.8 or qt5 – there are a lot of errors appears, project is big and not mine so fixing issues would be even harder than erasing the whole code and write new code). So I need to make this project, well, working on NativeClient.
Is it even possible? I use Windows and Visual Studio, I was trying to google instructions about qt+nacl on Windows but just can’t find nothing.
Also which pepper version should I use if it depends on it?
Is your qt build supporting native client?
Please check out this
Windows
The Qt-Nacl is not support, for now, in Windows.
By the way, here is the github repository dedicated for it -> https://github.com/msorvig/qt5-qtbase-nacl
In the file nacl-readme it is written :
[...] Windows is not supported as a host platform.
Linux
If you want to compile in Linux, I have made a script that will compile Qt5.4 with NaCl with all the dependencies needed.
https://gist.github.com/theshadowx/438297ac465874a5e226
I also made a video that will show the different steps and a showCase at the end :
https://www.youtube.com/watch?v=q2pMv1Svtqw

QT5 webkit plugin issue

I have application created using QT 5.0.2. When launch the video window, blank screen is observed. I am using win8 64-bit OS(also VLC). There is no issue with QT4 in win7 32-bit. Video streaming is perfect. Using qt webit/webpage classes
Is there any way to check: whether plug-in(mainly to view the video frames) is enabled or not in qt web-kit browser ?
Qt 4.8 and latest version 5.0.2 doesn't support video.. here is the link
[http://qt-project.org/forums/viewthread/23636][1]
You can resolve the issue by using this blog. Sorry I did not tried this. may help you. You need to build qt twice and few more corrections!
[http://blog.enthought.com/open-source/fun-with-qtwebkit-html5-video/][2]
Some one already mentioned the qt open bug against it.
[https://bugreports.qt-project.org/browse/QTBUG-22883][3]

Qt - QImage works on one computer and not on another [duplicate]

I set a background image(JPEG) on a Qt widget using setStyleSheet(). This is perfectly shown on my computer, but not on another computer.
I am not getting a link error on the other computer -- the feature just doesn't work. Is there something I am missing in the distribution or build of my app, something that the Qt dev tools installs or is otherwise available, that isn't present on other machines? How can I distribute a Qt app that uses JPEG functionality?
JPEG support in Qt comes as a plugin. Make sure you have also deployed the plugin to your non-development machine. If you haven't, it will simply silently fail and you'll end up not seeing any of the JPEG images. Have a look at the official documentation for more detailed information: http://qt-project.org/doc/qt-4.8/deployment-windows.html
In short (and as a quick solution, but have a look at the documentation as well) you could create a directory named "imageformats" as a subdirectory of the folder containing your exe, into which you copy QJPEG4.dll.

Taglib 1.8 on windows 7 is not working properly like windows XP

I compiled taglib 1.8 using Mingw succesfully, then i integrated it into a Qt project.
The purpuse is to remove ID3 Tag from mp3 files.
This code :
void MainWindow::removeTagFromFile(QByteArray &fileContent)
{
TagLib::ByteVector byteVector(fileContent.constData());
TagLib::ID3v2::FrameFactory *frame = TagLib::ID3v2::FrameFactory::instance();
TagLib::IOStream *vectorStream = new TagLib::ByteVectorStream(byteVector);
TagLib::MPEG::File file(vectorStream, frame);
file.strip();
file.save();
}
Compile and works fine on XP.
Compile and doesn't work as expected on Windows 7.
Taking the ".exe compiled on XP" to seven do not solve the problem.
is it weird ? i'm afraid that this is a bug in Taglib, does it make sense ?
Any idea or an explanation is welcome,
Thanks in advance.
You can download the project here
I'm writing a tutorial in french about details of compilation and integration into a Qt project, i'll write one in english if there is interested people.
Well, finally it's not question of XP or Seven, it's about codecs installed on your computer.
There is a simple solution, you don't need to remove ID3 Tag from mp3 files to get them readable by Phonon, you need just to install K-Lite Codecs.
Explanation :
Phonon backend use DirectShow on Windows to read mp3 files.
The K-Lite Codec Pack is a collection of DirectShow filters, VFW/ACM codecs, and tools. Codecs and DirectShow filters are needed for encoding and decoding audio and video formats.
installing K-Lite solve the problem of Phonon with some mp3 files.
I hope this will save someone out there who suffer from phonon with mp3 files on windows.

Resources