Posted inInformation Technology

Qt 5.4 and MP4

This question keeps coming up. There are many “half answers” posted on-line. I call them “half answers” because they ass-u-me you have already built Qt from source or have some other expert level knowledge. Here are the instructions for the hapless schmoe.

First you have to “find” the source. This isn’t quite as easy as it sounds. You need to visit the official releases site for Qt. Then you need to select the version you wish to use. Please use the link above to save yourself some grief. If you try to navigate to it via the main Qt Web site you will receive continual nagging about purchasing a commercial license.

Now that you have navigated to the directory for the version you want, you have to find the source. (They are directories, not folders, I don’t care what bs Microsoft tries to sell, they are directories.) Is it in a directory named “source?” No, it is in a directory named “single,” now isn’t that intuitive?

qt-download-tree

Download the archive file type you most like. I downloaded for Ubuntu so the rest of these instructions may have to be tweaked for your desired platform.

Please note: There are some licensing issues with MP4. Qt can be built so QWebEngine, and thus QML, supports MP4, but your company’s legal team must jump through the fine print to see if you meet all of the license requirements. I’m going to assume you want to do this for yourself for purely educational reasons.

Make a directory in your home directory qt_5_4_2_source (putting in correct version numbers) and extract the download into this directory.

Open terminal window
 cd qt_<tab>
 cd qt<tab>

you will now be in the qt-everywhere-opensource* directory

./configure -qt-xcb -alsa
 type o for opensource
 type yes to accept license

after successful configuration

make
sudo make install

** Note: the make step can take a couple of hours on a good machine and longer on an underpowered machine.

cd qtwebengine
/usr/local/Qt-5.4.2/bin/qmake WEBENGINE_CONFIG+=proprietary_codecs -r

# ignore the warnings about missing object files as they get created later this is a known issue and there is a qtbug about it

make
sudo make install

REBOOT

You are done.

Note, this is a two step install. You have to build Qt and install it to get the tools in the correct places THEN you can rebuild the Web Engine with proprietary codecs.

Roland Hughes started his IT career in the early 1980s. He quickly became a consultant and president of Logikal Solutions, a software consulting firm specializing in OpenVMS application and C++/Qt touchscreen/embedded Linux development. Early in his career he became involved in what is now called cross platform development. Given the dearth of useful books on the subject he ventured into the world of professional author in 1995 writing the first of the "Zinc It!" book series for John Gordon Burke Publisher, Inc.

A decade later he released a massive (nearly 800 pages) tome "The Minimum You Need to Know to Be an OpenVMS Application Developer" which tried to encapsulate the essential skills gained over what was nearly a 20 year career at that point. From there "The Minimum You Need to Know" book series was born.

Three years later he wrote his first novel "Infinite Exposure" which got much notice from people involved in the banking and financial security worlds. Some of the attacks predicted in that book have since come to pass. While it was not originally intended to be a trilogy, it became the first book of "The Earth That Was" trilogy:
Infinite Exposure
Lesedi - The Greatest Lie Ever Told
John Smith - Last Known Survivor of the Microsoft Wars

When he is not consulting Roland Hughes posts about technology and sometimes politics on his blog. He also has regularly scheduled Sunday posts appearing on the Interesting Authors blog.