A simple but powerful multimedia player library designed for Qt Quick.

QtMediaPlayer

A simple but powerful multimedia player library designed for Qt Quick.

Features

  • Full-featured multimedia player
  • Cross-platform: support Windows, Linux, macOS, and mobile platforms in theory
  • Easy to build and use

Build

Since this project makes heavy usage of Qt RHI, you'll need at least Qt 5.14 to use this project. It's recommended to use Qt 6.

cmake .
cmake --build .
cmake --install .

Currently two backends are available: MDK and MPV. VLC is on plan. All backends will be loaded dynamically at run-time.

Usage

See example.

License

MIT License

Copyright (C) 2021 by wangwenx190 (Yuhang Zhao)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Owner
Yuhang Zhao
Feel free to contact me privately through e-mail, but please don't write something like "contact to me to have a detailed discussion", just tell me your topic.
Yuhang Zhao
Similar Resources

A clone of Media Player Classic reimplemented in Qt.

A clone of Media Player Classic reimplemented in Qt.

Media Player Classic Qute Theater A clone of Media Player Classic reimplemented in Qt. Media Player Classic Home Cinema (mpc-hc) is considered by many

Nov 26, 2022

🤟Super fast H.264/H.265 FLV player

🤟Super fast H.264/H.265 FLV player

🤟Super fast H.264/H.265 FLV player

Nov 26, 2022

Implement a universal video player based on FFmpeg

qiaopcmusic 实现一个万能视频播放器 添加依赖方式: To get a Git project into your build: Step 1. Add the JitPack repository to your build file Add it in your root build.

Oct 15, 2021

FFmpeg powered audio player in node.js

sange FFmpeg powered audio player in node.js prerequisites node.js cmake sudo apt install cmake c++ compiler sudo apt install g++ gcc ffmpeg sudo apt

Nov 25, 2022

Poppy Music Player

Poppy Music Player poppy is a simple music player that is controlled by process signals. Build Before anything: meson setup build cd build Compiling n

Apr 26, 2022

RTSP Wasm Player

RTSP Wasm Player

RTSP Wasm Player Overview # RTSP WebSocket Proxy RTSP/Webcam/File FFmpeg open Packets WebSocket # WS Wasm Player WebSocket Packets Wasm FFm

Nov 27, 2022

Kodi is an award-winning free and open source software media player and entertainment hub for digital media

Kodi is an award-winning free and open source software media player and entertainment hub for digital media

website • docs • community • add-ons Welcome to Kodi Home Theater Software! Kodi is an award-winning free and open source software media player and en

Dec 1, 2022

Free and open-source media player written in C++

Liquid Media Player Free and open-source media player written in C++. Currently in development. Build Guide Windows Install the MSYS2 Building Platfor

Sep 20, 2022

Console based Streaming Music Player [W.I.P]

🎵 quanta It's a command line music player that can streams same music to multiple devices, hence creating a surround sound system. Or just use it as

Jan 27, 2022
Comments
  • Windows下example编译失败

    Windows下example编译失败

    mingw64 编译失败 Qt 6.2.4 mingw64 (gcc 11.2.0) cmake 3.25.0-rc2 ninja 1.11.1

    D:/QtMediaPlayer-1.0.0/example/application.cpp: In function 'int Application::run(int, char**)':
    D:/QtMediaPlayer-1.0.0/example/application.cpp:294:43: error: no matching function for call to 'qmlRegisterAnonymousType<QWindow, 254>(const char [31], int)'
      294 |     qmlRegisterAnonymousType<QWindow, 254>(DEMO_APP_URI, 1);
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
    In file included from E:/Qt/6.2.4/mingw_64/include/QtQml/qqmlengine.h:47,
                     from E:/Qt/6.2.4/mingw_64/include/QtQml/qqmlapplicationengine.h:43,
                     from D:/QtMediaPlayer-1.0.0/example/application.cpp:31:
    E:/Qt/6.2.4/mingw_64/include/QtQml/qqml.h:92:5: note: candidate: 'template<class T> int qmlRegisterAnonymousType(const char*, int)'
       92 | int qmlRegisterAnonymousType(const char *uri, int versionMajor)
          |     ^~~~~~~~~~~~~~~~~~~~~~~~
    E:/Qt/6.2.4/mingw_64/include/QtQml/qqml.h:92:5: note:   template argument deduction/substitution failed:
    D:/QtMediaPlayer-1.0.0/example/application.cpp:294:43: error: wrong number of template arguments (2, should be 1)
      294 |     qmlRegisterAnonymousType<QWindow, 254>(DEMO_APP_URI, 1);
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
    In file included from E:/Qt/6.2.4/mingw_64/include/QtQml/qqmlengine.h:47,
                     from E:/Qt/6.2.4/mingw_64/include/QtQml/qqmlapplicationengine.h:43,
                     from D:/QtMediaPlayer-1.0.0/example/application.cpp:31:
    E:/Qt/6.2.4/mingw_64/include/QtQml/qqml.h:92:5: note: provided for 'template<class T> int qmlRegisterAnonymousType(const char*, int)'
       92 | int qmlRegisterAnonymousType(const char *uri, int versionMajor)
          |     ^~~~~~~~~~~~~~~~~~~~~~~~
    
    D:/QtMediaPlayer-1.0.0/example/qtwinextras/qwintaskbarbutton.cpp:51:10: fatal error: atlbase.h: No such file or directory
       51 | #include <atlbase.h>
          |          ^~~~~~~~~~~
    compilation terminated.
    

    MSVC 2019编译失败 Qt 6.2.4 cmake 3.25.0-rc2

      mocs_compilation_Debug.cpp
    E:\QtMediaPlayer-1.0.0\example\Demo_autogen\include_Debug\EWIEGA46WW\../../../constants.h(37,5): error C3083: “QQmlPriv
    ate”:“::”左侧的符号必须是一种类型 [E:\QtMediaPlayer-1.0.0\example\Demo.vcxproj]
    E:\QtMediaPlayer-1.0.0\example\Demo_autogen\include_Debug\EWIEGA46WW\../../../constants.h(37,5): error C2039: "QmlSingl
    eton": 不是 "`global namespace'" 的成员 [E:\QtMediaPlayer-1.0.0\example\Demo.vcxproj]
    E:\QtMediaPlayer-1.0.0\example\Demo_autogen\include_Debug\EWIEGA46WW\../../../constants.h(37,5): error C2039: "qmlRegis
    terTypesAndRevisions": 不是 "`global namespace'" 的成员 [E:\QtMediaPlayer-1.0.0\example\Demo.vcxproj]
      console.cpp
      logger.cpp
      application.cpp
    E:\QtMediaPlayer-1.0.0\example\application.cpp(294,5): error C2672: “qmlRegisterAnonymousType”: 未找到匹配的重载函数 [E:\QtMediaP
    layer-1.0.0\example\Demo.vcxproj]
    E:\QtMediaPlayer-1.0.0\example\application.cpp(294,59): error C2977: “qmlRegisterAnonymousType”: 模板 参数太多 [E:\QtMediaPla
    yer-1.0.0\example\Demo.vcxproj]
    E:\Qt\6.2.4\msvc2019_64\include\QtQml/qqml.h(92): message : 参见“qmlRegisterAnonymousType”的声明 [E:\QtMediaPlayer-1.0.0\exa
    mple\Demo.vcxproj]
      main.cpp
      qwintaskbarbutton.cpp
      qwintaskbarprogress.cpp
      qquickiconloader.cpp
      qquicktaskbarbutton.cpp
      qrc_qmake_wangwenx190_QtMediaPlayer_Demo.cpp
      constants.cpp
    E:\QtMediaPlayer-1.0.0\example\constants.h(37,5): error C3083: “QQmlPrivate”:“::”左侧的符号必须是一种类型 [E:\QtMediaPlayer-1.0.0\e
    xample\Demo.vcxproj]
    E:\QtMediaPlayer-1.0.0\example\constants.h(37,5): error C2039: "QmlSingleton": 不是 "`global namespace'" 的成员 [E:\QtMediaP
    layer-1.0.0\example\Demo.vcxproj]
    E:\QtMediaPlayer-1.0.0\example\constants.h(37,5): error C2039: "qmlRegisterTypesAndRevisions": 不是 "`global namespace'"
    的成员 [E:\QtMediaPlayer-1.0.0\example\Demo.vcxproj]
      history.cpp
    E:\QtMediaPlayer-1.0.0\example\history.h(39,5): error C3083: “QQmlPrivate”:“::”左侧的符号必须是一种类型 [E:\QtMediaPlayer-1.0.0\exa
    mple\Demo.vcxproj]
    E:\QtMediaPlayer-1.0.0\example\history.h(39,5): error C2039: "QmlSingleton": 不是 "`global namespace'" 的成员 [E:\QtMediaPla
    yer-1.0.0\example\Demo.vcxproj]
    E:\QtMediaPlayer-1.0.0\example\history.h(39,5): error C2039: "qmlRegisterTypesAndRevisions": 不是 "`global namespace'" 的成
    员 [E:\QtMediaPlayer-1.0.0\example\Demo.vcxproj]
      i18n.cpp
    E:\QtMediaPlayer-1.0.0\example\i18n.h(39,5): error C3083: “QQmlPrivate”:“::”左侧的符号必须是一种类型 [E:\QtMediaPlayer-1.0.0\exampl
    e\Demo.vcxproj]
    E:\QtMediaPlayer-1.0.0\example\i18n.h(39,5): error C2039: "QmlSingleton": 不是 "`global namespace'" 的成员 [E:\QtMediaPlayer
    -1.0.0\example\Demo.vcxproj]
    E:\QtMediaPlayer-1.0.0\example\i18n.h(39,5): error C2039: "qmlRegisterTypesAndRevisions": 不是 "`global namespace'" 的成员 [
    E:\QtMediaPlayer-1.0.0\example\Demo.vcxproj]
      settings.cpp
    E:\QtMediaPlayer-1.0.0\example\settings.h(40,5): error C3083: “QQmlPrivate”:“::”左侧的符号必须是一种类型 [E:\QtMediaPlayer-1.0.0\ex
    ample\Demo.vcxproj]
    E:\QtMediaPlayer-1.0.0\example\settings.h(40,5): error C2039: "QmlSingleton": 不是 "`global namespace'" 的成员 [E:\QtMediaPl
    ayer-1.0.0\example\Demo.vcxproj]
    E:\QtMediaPlayer-1.0.0\example\settings.h(40,5): error C2039: "qmlRegisterTypesAndRevisions": 不是 "`global namespace'" 的
    成员 [E:\QtMediaPlayer-1.0.0\example\Demo.vcxproj]
      theme.cpp
    E:\QtMediaPlayer-1.0.0\example\theme.h(38,5): error C3083: “QQmlPrivate”:“::”左侧的符号必须是一种类型 [E:\QtMediaPlayer-1.0.0\examp
    le\Demo.vcxproj]
    E:\QtMediaPlayer-1.0.0\example\theme.h(38,5): error C2039: "QmlSingleton": 不是 "`global namespace'" 的成员 [E:\QtMediaPlaye
    r-1.0.0\example\Demo.vcxproj]
    E:\QtMediaPlayer-1.0.0\example\theme.h(38,5): error C2039: "qmlRegisterTypesAndRevisions": 不是 "`global namespace'" 的成员
    [E:\QtMediaPlayer-1.0.0\example\Demo.vcxproj]
      framelesswindow.cpp
      os.cpp
    E:\QtMediaPlayer-1.0.0\example\os.h(37,5): error C3083: “QQmlPrivate”:“::”左侧的符号必须是一种类型 [E:\QtMediaPlayer-1.0.0\example\
    Demo.vcxproj]
    E:\QtMediaPlayer-1.0.0\example\os.h(37,5): error C2039: "QmlSingleton": 不是 "`global namespace'" 的成员 [E:\QtMediaPlayer-1
    .0.0\example\Demo.vcxproj]
    E:\QtMediaPlayer-1.0.0\example\os.h(37,5): error C2039: "qmlRegisterTypesAndRevisions": 不是 "`global namespace'" 的成员 [E:
    \QtMediaPlayer-1.0.0\example\Demo.vcxproj]
    
  • Compile errors

    Compile errors

    Trying to compile this on openSUSE Tumbleweed, but compilation fails. Build commands:

     cmake .
     cmake --build .
    

    output


    gcc (SUSE Linux) 11.2.1 20220103 [revision d4a1d3c4b377f1d4acb34fe1b55b5088a3f293f6]

    Operating System: openSUSE Tumbleweed 20220210 KDE Plasma Version: 5.24.0 KDE Frameworks Version: 5.90.0 Qt Version: 5.15.2 Kernel Version: 5.16.5-1-default (64-bit) Graphics Platform: X11

GStreamer open-source multimedia framework

GStreamer open-source multimedia framework

Nov 30, 2022
simple mp4 player based on rockchip rv1109 platform

mp4player RV1109平台上实现一个简单的 mp4 播放器,主要是本人使用的开发板QT无法播放mp4,应该是没有编译qst所致,因而想利用rockchip平台自有的 功能实现一个简单的播放器。 base目录包含一些基础框架实现,包含信号,线程,时间等,线程和消息泵的实现非常非常简单,因而不

Jul 17, 2022
Windows graphical interface for yt-dlp, designed as a simple YouTube downloader
Windows graphical interface for yt-dlp, designed as a simple YouTube downloader

ytdlp-interface This is a Windows graphical interface for yt-dlp, that is designed as a simple YouTube downloader. It doesn't download playlists, and

Nov 29, 2022
🎥 mpv is a free (as in freedom) media player for the command line.
🎥 mpv is a free (as in freedom) media player for the command line.

mpv is a free (as in freedom) media player for the command line. It supports a wide variety of media file formats, audio and video codecs, and subtitle types.

Nov 25, 2022
An Open Source PSVita/TV MP4 player with 1080p playback and subtitle support
An Open Source PSVita/TV MP4 player with 1080p playback and subtitle support

Vita-Media-Player An Open Source PSVita/TV MP4 player with 1080p playback and subtitle support 1080i output supported on the PSTV natively and on the

Nov 25, 2022
Video player for 3ds
Video player for 3ds

Video player for 3DS Patch note v1.0.1 Added allow skip frames option v1.0.0 Initial release Summary Video player for 3DS Performance 256x144(144p)@30

Nov 21, 2022
TIP (translate it, please) is a plugin for VLC media player that helps you to study languages by watching videos.

vlc-tip-plugin TIP (translate it, please) is a plugin for VLC media player that helps you to study languages by watching videos. Features The plugin a

Oct 11, 2022
Jellyfin Desktop Client based on Plex Media Player
Jellyfin Desktop Client based on Plex Media Player

Desktop client using jellyfin-web with embedded MPV player. Supports Windows, Mac OS, and Linux. Media plays within the same window using the jellyfin-web interface unlike Jellyfin Desktop. Supports audio passthrough. Based on Plex Media Player.

Nov 30, 2022
GB Studio Extended Nominal Player Adaptation/Interface
GB Studio Extended Nominal Player Adaptation/Interface

gbsenpai gbsenpai - GB Studio Extended Nominal Player Adaptation/Interface - is a project to port the GB Studio player to additional, non-GB/GBC platf

Oct 24, 2022
Yakuza Arcade Machine Player - play Virtua Fighter 5: Final Showdown on PC, using Yakuza 6 files.
Yakuza Arcade Machine Player - play Virtua Fighter 5: Final Showdown on PC, using Yakuza 6 files.

Yakuza Arcade Machines Player Yakuza Arcade Machines Player is a launcher that allows you to run Virtua Fighter 5: Final Showdown, standalone and nati

Nov 26, 2022