From dc4b9fc04734fe28bbcce740d6b457fc32016581 Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Sun, 13 Jul 2025 17:43:05 +0800 Subject: [PATCH] chore(CI): msvc build with ffmpeg --- .github/workflows/windows.yml | 7 ++++++- .gitignore | 2 ++ README.md | 20 +++++++++++++------- mainwindow.cpp | 3 +++ 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index f5dd734..7da140b 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: include: - - qt_ver: '6.9.0' + - qt_ver: '6.9.1' vs: '2022' aqt_arch: 'win64_msvc2022_64' msvc_arch: 'x64' @@ -40,6 +40,11 @@ jobs: cmake .\dependencies_src\extra-cmake-modules -Bbuild_dependencies/extra-cmake-modules -DCMAKE_INSTALL_PREFIX="dependencies_bin" -DBUILD_TESTING=OFF || goto :error cmake --build build_dependencies/extra-cmake-modules --config Release --target=install || goto :error echo ::endgroup:: + echo ::group::===== FFmpeg ===== + curl -fsSL -o ffmpeg-shared.7z https://github.com/GyanD/codexffmpeg/releases/download/7.1.1/ffmpeg-7.1.1-full_build-shared.7z + 7z x ffmpeg-shared.7z -y -o"dependencies_src" + set FFMPEG_ROOT=%PWD%\dependencies_src\ffmpeg-7.1.1-full_build-shared + echo ::endgroup:: echo ::group::===== Gperf (required by KCodecs) ===== choco install gperf echo ::endgroup:: diff --git a/.gitignore b/.gitignore index 783158e..2ad1ce1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,10 @@ # Common build folder [Bb]uild/ +build-*/ # IDE folder .vscode/ +.idea/ # User config file CMakeLists.txt.user* diff --git a/README.md b/README.md index 39c12a8..62fb7a4 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,11 @@ Since **I** just need a simple player which *just works* right now, so I did man We have the following features: - [Sidecar](https://en.wikipedia.org/wiki/Sidecar_file) lyrics file (`.lrc`) support with an optional desktop lyrics bar widget -- Sidecar chapter file support - - [YouTube-style chapter](https://support.google.com/youtube/answer/9884579) saved to a plain text file with `.chp` suffix - - PotPlayer `.pbf` file, `[Bookmark]`s as chapters +- Chapter file support + - Sidecar chapter file support: + - [YouTube-style chapter](https://support.google.com/youtube/answer/9884579) saved to a plain text file with `.chp` suffix + - PotPlayer `.pbf` file, `[Bookmark]`s as chapters + - Built-in chapter support (require build with FFmpeg) - Auto-load all audio files in the same folder of the file that you attempted to play, into a playlist These features are not available, some of them are TBD and others are not planned: @@ -31,10 +33,14 @@ These features are not available, some of them are TBD and others are not planne Current state, we need: - - `cmake` as the build system. - - `qt6` with `qt6-multimedia` since we use it for playback. - - `taglib` to get the audio file properties. - - `kissfft` for FFT support (will be downloaded at configure-time by `cmake`). +- `cmake` as the build system. +- `qt6` with `qt6-multimedia` since we use it for playback. +- `kissfft` for FFT support (will be downloaded at configure-time by `cmake`). +- (optional) `taglib` to get the audio file properties. +- (optional) `kf6codecs` to get the lyrics encoding correct. +- (optional) `ffmpeg` to get the audio chapter properties. + - It's suggested to use the same FFmpeg version that Qt Multimedia uses, so we can reuse the FFmpeg library binaries that Qt uses. + - You can know the version by checking [Qt documentation's FFmpeg attribution page](https://doc.qt.io/qt-6.9/qtmultimedia-attribution-ffmpeg.html) Then we can build it with any proper c++ compiler like g++ or msvc. diff --git a/mainwindow.cpp b/mainwindow.cpp index 33dd9a2..692ddc4 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -687,6 +687,9 @@ void MainWindow::on_actionHelp_triggered() #ifdef HAVE_KCODECS QStringLiteral("- [KCodecs](https://invent.kde.org/frameworks/kcodecs)\n") % #endif // NO_TAGLIB +#ifdef HAVE_FFMPEG + QStringLiteral("- [FFmpeg](https://ffmpeg.org/)\n") % +#endif // HAVE_FFMPEG "\n" "[Source Code](https://github.com/BLumia/pineapple-music)\n" "\n"