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?
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.