Introduction to the

Last article we built a player development environment in Linux platform, this article mainly introduces how to build QT and FFmpeg development environment in Windows platform. If you are running on a MAC or Linux environment, you can use the following article to build

QT for MAC OS & FFmpeg

(2) QT for Linux & FFmpeg environment construction

Environment to prepare

Since I use a MAC myself, if I wanted to run code on Linux or Windows, I had to install a virtual machine. You can use this article to install a vmware virtual machine for your MAC

Windows

QT installation

Enter theQT’s official website

QT does not support offline installation since version 5.15.0. So we can only apply for an account and install online.

Download the Qt Online Installer by clicking Go Open Source -> Download the Qt Online Installer.

Double-click to execute the downloaded software:

Follow the prompts and click Next:

Then select the QT SDK development package. I have installed 6.1.1

Once selected, click Next to enter the download state:

QT is installed successfully until the following page is displayed:

Finally QT for Windows GUI looks like this:

Compile FFmpeg

If you are familiar with FFmpeg on Windows, you can download FFmpeg from FFmpeg’s official website. So you can compile it directly from source code by putting the dynamic library and the header file in QTFFplayer/libs.

1, source code compilation

  • Cygwin Installation and Configuration – Build and install FFmpeg under Windows

(PS: LATER I have time to compile it myself, and then make up the compilation script)

2. Download from the official website

First go to FFmpeg Builds and then select the dynamic library you want. I’m using FFmPEG-N4.4-72-g91AA49218e-win64-Gpl-shared-4.4.zip

After downloading it, unpack it and put it in the following directory:

Now that the FFmpeg environment is in our project, let’s compile and see the results

Select the compilation environment

C:\ QT \6.1.1\ mingw81_64bin; C:\ QT \6.1.1\ mingw81_64bin; C:\ QT \6.1.1\ mingw81_64bin;

Now we compile and run again, find or crash, the following error ffmPEG*.dllWe can’t find it. We’ll just take itQTFFplayer/libs/binThe *.dllCopy toc:\windows\System32\The following page is displayed during compilation and operation, indicating success:

In Windows, FFmpeg and QT APIS can be called for development.

conclusion

QT for Mac OS, Linux, and Windows development environments are all set up. You can find that QT is almost the same on all platforms, but FFmpeg compilation is not very smooth, especially in Windows.

Now that the environment is set up, you can develop directly on the main platform. Once the player is developed, we’ll run it on MAC OS, Linux, Windows, IOS and Android to see what it looks like.

The next article mainly explains FFmpeg unpack knowledge, please wait!

The project address