This repository contains scripts, simple sample programs and documentation to build qtmultimedia support with gstreamer on windows 10 and Visual Studio 2017/19. Additonally a simple test program is provided , which shows an publicly available(at the time of this writing) rtsp stream inside a qml application.
Note that I only did this for the 64 bit version of Qt and gstreamer on Windows 10.
- Install Visual Studio 2017 or 2019 (recommended). Community version is sufficient.
- Install Qt for windows >= 5.13 (my tests were made with Qt 5.15.0) for your Visual Studio version
- Install gstreamer-1.0 packages for windows and msvc.
- https://gstreamer.freedesktop.org/data/pkg/windows/1.18.0/msvc/gstreamer-1.0-msvc-x86_64-1.18.0.msi
- https://gstreamer.freedesktop.org/data/pkg/windows/1.18.0/msvc/gstreamer-1.0-devel-msvc-x86_64-1.18.0.msi
Note that Windows 10 will probably block the installation, as the msi is unsigned. Click on the More info link in the warning box, which appears and press the appearing Run Anyway Button. See also https://www.youtube.com/watch?v=_JZNCypATOY
- Open a command shell
- clone this repository
- cd into the repository directory
- clone the qtmultimedia repository
git clone http://code.qt.io/qt/qtmultimedia.git
cd qtmultimedia
git checkout <version>
<version> should match the qt version tag, you have installed, e.g. v5.15.1cd ..
- execute
bld_qtmultimedia.bat <qt_install_dir> [<installdir>]}
( you can give an alternative install directory as second parameter without the volume, for examplebld_qtmultimedia.bat C:\Qt\5.15.0 \Users\<myuser>\qtmultimedia
to get a add-on installation, which you can copy onto other Qt installations of the same type and version )
- execute
setupqtbldenv.bat c:\Qt\5.15.1
or where you have qt installed. (You can also give the full path to the qt bin directory as parameter) cd videotst
qmake
jom
ornmake
release\videotst
Now the rtsp stream rtsp://170.93.143.139/rtplive/470011e600ef003a004ee33696235daa showing a highway will be displayed.
- download and unzip http://www.happytimesoft.com/downloads/happytime-rtsp-server-x64.zip
- start rtspserver.exe in the unzipped directory
- copy the url shown below "stream from camera device." in the appearing dos box.
- I had to add 1 to the end of the url (making it videodevice1), when setting it as source property in the Video element in main.qml.
- After a rebuild with nmake or jom, start
release\videotst
and you will hopefully see yourself ;-).