flathub / io.mpv.Mpv

Home Page:https://flathub.org/apps/details/io.mpv.Mpv

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Request] Include libmysofa in the ffmpeg submodule.

kevinlekiller opened this issue · comments

Would it possible to add --enable-libmysofa to the ffmpeg build options, to enable SOFA based HRTF?

This allows using sofalizer with mpv to translate multi channel (7.1 for example) audio to stereo headphones.

Edit: Text under this is for testing purposes, not recommendations for this flathub package.

Usage example (using mpv / ffmpeg built with libmysofa):

Download a SOFA HRTF file, for example ClubFritz4.sofa.

Place the SOFA file in a suitable location, example : /home/kevin/.config/mpv/sofa/ClubFritz4.sofa

Download a multichannel test file, for example this Dolby TrueHD 7.1 channel check file.

Play the file using mpv using the following command (adjust paths accordingly) while wearing headphones:

mpv --no-config --af-add=sofalizer=sofa=/home/kevin/.config/mpv/sofa/ClubFritz4.sofa:gain=15 ~/Downloads/dolby-truehd-channel-check-lossless-\(www.demolandia.net\).mkv

(This can also be added to mpv.conf as a auto-profile:

[hrtf]
profile-desc=Add sofalizer on > 2 audio channels
# https://github.com/mpv-player/mpv/issues/8672
profile-cond=not get("core-idle", default_value) and get("audio-params/channel-count", default_value) > 2
profile-restore=copy
af-add=sofalizer=sofa=/home/kevin/.config/mpv/sofa/ClubFritz4.sofa:gain=15

Thanks.

We can inlclude module, but can't include mpv.conf which is different from mpv's official version.

Well, I tried compiling libmysofa, but it is not able to find CUnit.h header files in flatpak build environment. But in my debian system, libmysofa builds with cunit (/usr/local/) install

Here's the error:

Cache hit for x265, skipping build
Cache hit for CUnit, skipping build
Cache miss, checking out last cache hit
========================================================================
Building module libmysofa in /home/rizvan/.build/io.mpv.Mpv/.flatpak-builder/build/libmysofa-11
========================================================================
Running: cd build && cmake .. && make install
-- The C compiler identification is GNU 12.1.0
-- The CXX compiler identification is GNU 12.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test C_HAS_WALL
-- Performing Test C_HAS_WALL - Success
-- Could NOT find CUnit (missing: CUNIT_INCLUDE_DIR) 
CMake Error at /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find CUnit (missing: CUNIT_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindCUnit.cmake:31 (find_package_handle_standard_args)
  CMakeLists.txt:52 (find_package)

So,
here's the manifest:

app-id: io.mpv.Mpv
runtime: org.freedesktop.Platform
runtime-version: '22.08'
sdk: org.freedesktop.Sdk
command: mpv
rename-desktop-file: mpv.desktop
rename-icon: mpv

finish-args:
  - --share=ipc
  - --socket=x11
  - --socket=wayland
  - --device=all
  - --share=network
  - --socket=pulseaudio
  - --filesystem=/tmp:rw
  - --filesystem=xdg-pictures:rw
  - --filesystem=xdg-videos:rw
  - --filesystem=home/.var/app/io.mpv.Mpv/config/mpv/scripts:create
  - --filesystem=host:ro
  - --env=LC_NUMERIC=C
  - --filesystem=xdg-run/pipewire-0:ro

#  mpris support via dbus
  - --own-name=org.mpris.MediaPlayer2.mpv.*
  - --talk-name=org.gnome.SessionManager

cleanup:
  - '*.la'
  - '*.a'

modules:

  - name: libXmu
    buildsystem: autotools
    sources:
      - type: archive
        url: https://github.com/freedesktop/libXmu/archive/libXmu-1.1.2.tar.gz
        sha256: fb1485a0ffcc360c0cc8fe18f54a2f49af6fc384da743c0b136ab99cc6c6e54c

  - name: xclip
    buildsystem: autotools
    sources:
      - type: archive
        url: https://github.com/astrand/xclip/archive/0.13.tar.gz
        sha256: ca5b8804e3c910a66423a882d79bf3c9450b875ac8528791fb60ec9de667f758

  - name: libXpresent
    buildsystem: autotools
    sources:
      - type: archive
        url: https://xorg.freedesktop.org/archive/individual/lib/libXpresent-1.0.1.tar.xz
        sha256: b964df9e5a066daa5e08d2dc82692c57ca27d00b8cc257e8e960c9f1cf26231b

  - name: luajit
    no-autogen: true
    cleanup:
      - /bin
      - /include
      - /lib/pkgconfig
      - /share/man
    sources:
      - type: git
        url: https://github.com/LuaJIT/LuaJIT.git
        commit: 6c4826f12c4d33b8b978004bc681eb1eef2be977
        disable-shallow-clone: true
      - type: shell
        commands:
          - sed -i 's|/usr/local|/app|' ./Makefile

  - name: yt-dlp
    no-autogen: true
    no-make-install: true
    make-args:
      - yt-dlp
      - PYTHON=/usr/bin/python3
    post-install:
      - install yt-dlp /app/bin
    sources:
      - type: archive
        url: https://github.com/yt-dlp/yt-dlp/releases/download/2022.11.11/yt-dlp.tar.gz
        sha256: 51fa055912c7fc742a882ff58236bd25b39055b98168a3563ed17cc575c3c3ae
        x-checker-data:
          type: json
          url: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
          version-query: .tag_name
          url-query: .assets[] | select(.name=="yt-dlp.tar.gz") | .browser_download_url

  - name: uchardet
    buildsystem: cmake-ninja
    config-opts:
      - -DCMAKE_BUILD_TYPE=Release
      - -DBUILD_STATIC=0
    cleanup:
      - /bin
      - /include
      - /lib/pkgconfig
      - /share/man
    sources:
      - type: archive
        url: https://www.freedesktop.org/software/uchardet/releases/uchardet-0.0.6.tar.xz
        sha256: 8351328cdfbcb2432e63938721dd781eb8c11ebc56e3a89d0f84576b96002c61

  - name: libass
    cleanup:
      - /include
      - /lib/pkgconfig
    config-opts:
      - --disable-static
    sources:
      - type: archive
        url: https://github.com/libass/libass/releases/download/0.15.0/libass-0.15.0.tar.gz
        sha256: 9cbddee5e8c87e43a5fe627a19cd2aa4c36552156eb4edcf6c5a30bd4934fe58

  - name: libv4l2
    cleanup:
      - /include
      - /lib/pkgconfig
      - /share/man
    config-opts:
      - --disable-static
      - --disable-bpf
      - --with-udevdir=/app/lib/udev
    sources:
      - type: archive
        url: https://linuxtv.org/downloads/v4l-utils/v4l-utils-1.22.1.tar.bz2
        sha256: 65c6fbe830a44ca105c443b027182c1b2c9053a91d1e72ad849dfab388b94e31

  - name: libcdio
    config-opts:
      - --disable-static
      - --disable-example-progs
    cleanup:
      - /include
      - /lib/pkgconfig
    sources:
      - type: archive
        url: https://ftp.gnu.org/gnu/libcdio/libcdio-2.1.0.tar.bz2
        sha256: 8550e9589dbd594bfac93b81ecf129b1dc9d0d51e90f9696f1b2f9b2af32712b
        x-checker-data:
          type: html
          url: https://ftp.gnu.org/gnu/libcdio/
          version-pattern: libcdio-(\d\.\d+\.?\d*).tar.bz2
          url-template: https://ftp.gnu.org/gnu/libcdio/libcdio-$version.tar.bz2

  - name: libcdio-paranoia
    config-opts:
      - --disable-static
      - --disable-example-progs
    cleanup:
      - /include
      - /lib/pkgconfig
    sources:
      - type: archive
        url: https://ftp.gnu.org/gnu/libcdio/libcdio-paranoia-10.2+2.0.1.tar.bz2
        sha256: 33b1cf305ccfbfd03b43936975615000ce538b119989c4bec469577570b60e8a
        x-checker-data:
          type: html
          url: https://ftp.gnu.org/gnu/libcdio/
          version-pattern: libcdio-paranoia-([\d\.\+-]+).tar.bz2
          url-template: https://ftp.gnu.org/gnu/libcdio/libcdio-paranoia-$version.tar.bz2

  - name: libdvdread
    config-opts:
      - --disable-static
    cleanup:
      - /include
      - /lib/pkgconfig
    sources:
      - type: archive
        url: https://download.videolan.org/pub/videolan/libdvdread/6.1.3/libdvdread-6.1.3.tar.bz2
        sha256: ce35454997a208cbe50e91232f0e73fb1ac3471965813a13b8730a8f18a15369
        x-checker-data:
          type: html
          url: https://www.videolan.org/developers/libdvdnav.html
          version-pattern: The latest version of <code>libdvdread</code> is <b>([\d\-\.]+)<
          url-template: https://download.videolan.org/pub/videolan/libdvdread/$version/libdvdread-$version.tar.bz2

  - name: libdvdnav
    config-opts:
      - --disable-static
    cleanup:
      - /include
      - /lib/pkgconfig
    sources:
      - type: archive
        url: https://download.videolan.org/pub/videolan/libdvdnav/6.1.1/libdvdnav-6.1.1.tar.bz2
        sha256: c191a7475947d323ff7680cf92c0fb1be8237701885f37656c64d04e98d18d48
        x-checker-data:
          type: html
          url: https://www.videolan.org/developers/libdvdnav.html
          version-pattern: The latest version of <code>libdvdnav</code> is <b>([\d\-\.]+)</b>\.
          url-template: https://download.videolan.org/pub/videolan/libdvdnav/$version/libdvdnav-$version.tar.bz2

  - name: libbluray
    config-opts:
      - --disable-static
      - --disable-bdjava-jar
    cleanup:
      - /include
      - /lib/pkgconfig
    sources:
      - sha256: 478ffd68a0f5dde8ef6ca989b7f035b5a0a22c599142e5cd3ff7b03bbebe5f2b
        type: archive
        url: https://download.videolan.org/pub/videolan/libbluray/1.3.4/libbluray-1.3.4.tar.bz2
        x-checker-data:
          type: html
          url: https://www.videolan.org/developers/libbluray.html
          version-pattern: Latest release is <b>libbluray (\d\.\d+\.?\d*)</b>\.
          url-template: https://download.videolan.org/pub/videolan/libbluray/$version/libbluray-$version.tar.bz2

  - name: zimg
    config-opts:
      - --disable-static
    cleanup:
      - /include
      - /lib/pkgconfig
      - /share/doc
    sources:
      - type: archive
        archive-type: tar
        url: https://api.github.com/repos/sekrit-twc/zimg/tarball/release-3.0.4
        sha256: c86b5a169b22c562172a11d83ce76a82dbdafc82149edcb8a06d0beeb94b193e
        x-checker-data:
          type: json
          url: https://api.github.com/repos/sekrit-twc/zimg/releases/latest
          url-query: .tarball_url
          version-query: .tag_name | sub("^release-"; "")
          timestamp-query: .published_at

  - name: rubberband
    buildsystem: meson
    cleanup:
      - /include
      - /lib/pkgconfig
    sources:
      - type: archive
        url: https://breakfastquay.com/files/releases/rubberband-3.1.2.tar.bz2
        sha256: dda7e257b14c59a1f59c5ccc4d6f19412039f77834275955aa0ff511779b98d2
        x-checker-data:
          type: html
          url: https://www.breakfastquay.com/rubberband/
          version-pattern: Rubber Band Library v(\d\.\d+\.?\d*) source
          url-template: https://breakfastquay.com/files/releases/rubberband-$version.tar.bz2

  - name: mujs
    no-autogen: true
    make-args:
      - release
      - shared
    make-install-args:
      - prefix=/app
      - install-shared
    cleanup:
      - /bin
      - /include
      - /lib/pkgconfig
    sources:
      - type: git
        url: https://github.com/ccxvii/mujs.git
        tag: 1.3.2
        commit: 0e611cdc0c81a90dabfcb2ab96992acca95b886d
        x-checker-data:
          type: git
          url: https://api.github.com/repos/ccxvii/mujs/tags
          tag-pattern: ^([\d.]+)$

  - name: nv-codec-headers
    cleanup:
      - '*'
    no-autogen: true
    make-install-args:
      - PREFIX=/app
    sources:
      - type: git
        url: https://git.videolan.org/git/ffmpeg/nv-codec-headers.git
        tag: n11.1.5.2
        commit: f8ae7a49bfef2f99d2c931a791dc3863fda67bf3
        x-checker-data:
          type: git
          tag-pattern: ^n([\d.]+)$

  - name: x264
    cleanup:
      - /include
      - /lib/pkgconfig
      - /share/man
    config-opts:
      - --disable-cli
      - --enable-shared

    sources:
      - type: git
        url: https://code.videolan.org/videolan/x264.git
        commit: 66a5bc1bd1563d8227d5d18440b525a09bcf17ca

  - name: x265
    buildsystem: cmake
    subdir: source
    config-opts:
      - -DCMAKE_BUILD_TYPE=Release
      - -DBUILD_STATIC=0
    cleanup:
      - /include
      - /lib/pkgconfig
      - /share/man
    sources:
      - type: archive
        url: https://bitbucket.org/multicoreware/x265_git/downloads/x265_3.5.tar.gz
        md5: deb5df5cb2ec17bdbae6ac6bbc3b1eef
   
  - name: CUnit
 #   buildsystem: simple
 #   build-commands:
 #     - ./bootstrap && ./configure --prefix=/app && make && make install
    sources:
      - type: archive
        archive-type: tar
        url: https://sourceforge.net/projects/cunit/files/CUnit/2.1-3/CUnit-2.1-3.tar.bz2
        sha256: f5b29137f845bb08b77ec60584fdb728b4e58f1023e6f249a464efa49a40f214
        
  - name: libmysofa
    buildsystem: simple
    build-commands:
      - cd build && cmake .. && make install
    sources:
      - type: archive
        archive-type: tar
        url: https://github.com/hoene/libmysofa/archive/refs/tags/v1.3.1.tar.gz
        sha256: a8a8cbf7b0b2508a6932278799b9bf5c63d833d9e7d651aea4622f3bc6b992aa
        
  - name: ffmpeg
    cleanup:
      - /include
      - /lib/pkgconfig
      - /share/ffmpeg/examples
    config-opts:
      - --disable-static
      - --disable-debug
      - --disable-doc
      - --disable-programs
      - --enable-gnutls
      - --enable-shared
      - --enable-encoder=png
      - --enable-libv4l2
      - --enable-gpl
      - --enable-version3
      - --enable-libass
      - --enable-libfreetype
      - --enable-libmp3lame
      - --enable-libopus
      - --enable-libtheora
      - --enable-libvorbis
      - --enable-libvpx
      - --enable-libaom
      - --enable-libdav1d
      - --enable-libx264
      - --enable-libx265
      - --enable-libmysofa
      
    sources:
      - type: archive
        url: https://ffmpeg.org/releases/ffmpeg-5.1.2.tar.xz
        sha256: 619e706d662c8420859832ddc259cd4d4096a48a2ce1eefd052db9e440eef3dc

  - name: libsixel
    buildsystem: meson
    cleanup:
      - /include
      - /lib/pkgconfig
    sources:
      - type: archive
        archive-type: tar
        url: https://api.github.com/repos/libsixel/libsixel/tarball/refs/tags/v1.10.3
        sha256: 7be774befba882d53701e131b6657836118f6cdb15a7515f92345c7bb6e2bb5c
        x-checker-data:
          type: json
          url: https://api.github.com/repos/libsixel/libsixel/tags
          url-query: .[0].tarball_url
          version-query: .[0].name

  - name: vapoursynth
    config-opts:
      - --disable-static
      - --with-python_prefix=/app
    sources:
      - type: git
        url: https://github.com/vapoursynth/vapoursynth.git
        tag: R61
        commit: 35fe1e3b8b45553c6086c014645a9266388b43c6
        x-checker-data:
          type: git
          tag-pattern: ^R([\d.]+)$

  - name: libplacebo
    buildsystem: meson
    config-opts:
      - -Dvulkan=enabled
      - -Dshaderc=enabled
    cleanup:
      - /include
      - /lib/pkgconfig
    sources:
      - type: git
        url: https://code.videolan.org/videolan/libplacebo.git
        tag: v5.229.1
        x-checker-data:
          type: git
          tag-pattern: ^v([\d.]+)$
        commit: 34314e37306e3d12fe5a0416c9b79eaf268b0cb2
    modules:
      - name: shaderc
        buildsystem: cmake-ninja
        builddir: true
        config-opts:
          - -DSHADERC_SKIP_COPYRIGHT_CHECK=ON
          - -DSHADERC_SKIP_EXAMPLES=ON
          - -DSHADERC_SKIP_TESTS=ON
        cleanup:
          - /bin
          - /include
          - /lib/cmake
          - /lib/pkgconfig
        post-install:
          # copy libSPIRV, as it's only available in Sdk
          - install -D /lib/$(gcc --print-multiarch)/libSPIRV*.so /app/lib
        sources:
          - type: archive
            archive-type: tar
            url: https://api.github.com/repos/google/shaderc/tarball/refs/tags/v2021.3
            sha256: b7e54b23a83343d5e2da836d8833ae0db11926141955edf845e35d4dc1eb88d1
          - type: shell
            commands:
              - sed -i 's|SPIRV/GlslangToSpv.h|glslang/SPIRV/GlslangToSpv.h|' libshaderc_util/src/compiler.cc
              - sed -i 's|add_subdirectory(third_party)||' CMakeLists.txt
              - sed -i 's|add_custom_target(build-version|set(NOT_USE|' CMakeLists.txt
              - |
                LIB=/lib/$(gcc --print-multiarch)
                VER_MATCH="[0-9]+\.[^\. ]+"
                SHADERC=$(grep -m1 -oP "^v$VER_MATCH" CHANGES)
                SPIRV=v$(grep -oP "(?<=Version:.)$VER_MATCH" $LIB/pkgconfig/SPIRV-Tools-shared.pc)
                GLSLANG=v$(realpath $LIB/libglslang.so | grep -oP "(?<=so.)$VER_MATCH")
                cat <<- EOF > glslc/src/build-version.inc
                  "shaderc $SHADERC"
                  "spirv-tools $SPIRV"
                  "glslang $GLSLANG"
                EOF
              - cat glslc/src/build-version.inc
              

  - name: mpv
    buildsystem: simple
    cleanup:
      - /include
      - /lib/pkgconfig
    build-commands:
      - python3 waf configure --prefix=/app --enable-libmpv-shared --disable-build-date
        --disable-manpage-build --disable-alsa --enable-sdl2 --enable-libarchive --enable-dvbin
        --enable-cdda --enable-dvdnav --enable-shaderc --enable-vulkan
      - python3 waf build
      - python3 waf install
    post-install:
      - install -D -m644 io.mpv.Mpv.appdata.xml /app/share/appdata/io.mpv.Mpv.appdata.xml
      # save screenshots at ~/Pictures/mpv
      - echo "screenshot-directory=~/Pictures/mpv" > /app/etc/mpv/mpv.conf
    sources:
      - type: archive
        url: https://github.com/mpv-player/mpv/archive/v0.35.0.tar.gz
        sha256: dc411c899a64548250c142bf1fa1aa7528f1b4398a24c86b816093999049ec00
      - type: file
        url: https://waf.io/waf-2.0.22
        sha256: 0a09ad26a2cfc69fa26ab871cb558165b60374b5a653ff556a0c6aca63a00df1
        dest-filename: waf
      - type: file
        path: io.mpv.Mpv.appdata.xml

# Scripts for mpv
  - name: mpv-mpris
    no-autogen: true
    make-install-args:
      - SCRIPTS_DIR=/app/etc/mpv/scripts
    sources:
      - type: archive
        archive-type: tar
        url: https://api.github.com/repos/hoyon/mpv-mpris/tarball/0.9
        sha256: 7729c2de9c58adb7f4b52624ced841b7d52107c50f6b2540f71a22eb94a6d857
        x-checker-data:
          type: json
          url: https://api.github.com/repos/hoyon/mpv-mpris/releases/latest
          version-query: .name
          url-query: .tarball_url

  - name: bc
    build-options:
      no-debuginfo: true
    buildsystem: autotools
    sources:
      - type: archive
        url: https://ftp.gnu.org/gnu/bc/bc-1.07.1.tar.gz
        sha256: 62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664cb02a

# Python dependencies for subliminal

  - name: python_dateutil
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app python_dateutil*.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/36/7a/87837f39d0296e723bb9b62bbb257d0355c7f6128853c78955f57342a56d/python_dateutil-2.8.2-py2.py3-none-any.whl
        sha256: 961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9

  - name: urllib3
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app urllib3*.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/ec/03/062e6444ce4baf1eac17a6a0ebfe36bb1ad05e1df0e20b110de59c278498/urllib3-1.26.9-py2.py3-none-any.whl
        sha256: 44ece4d53fb1706f667c9bd1c648f5469a2ec925fcf3a776667042d645472c14

  - name: soupsieve
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app soupsieve*.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/16/e3/4ad79882b92617e3a4a0df1960d6bce08edfb637737ac5c3f3ba29022e25/soupsieve-2.3.2.post1-py3-none-any.whl
        sha256: 3b2503d3c7084a42b1ebd08116e5f81aadfaea95863628c80a3b774a11b7c759

  - name: rebulk
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app rebulk-*.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/24/c5/a697c97d6e12e6981da7b050ab84b88ab394dab2c8c08c036eab63d826b4/rebulk-3.1.0-py3-none-any.whl
        sha256: e56550ae25a822111bff8c8f5eeea14cb44f406e9a9ce67ad4e350253b2fff6c

  - name: pbr
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app pbr-*.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/1b/ef/0621aa0e422dda72dc89b61972e5a28d5a947c22fdff83a5d69fdbc1949a/pbr-5.9.0-py2.py3-none-any.whl
        sha256: e547125940bcc052856ded43be8e101f63828c2d94239ffbe2b327ba3d5ccf0a

  - name: idna
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app idna-*.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/04/a2/d918dcd22354d8958fe113e1a3630137e0fc8b44859ade3063982eacd2a4/idna-3.3-py3-none-any.whl
        sha256: 84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff

  - name: decorator
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app decorator-*.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/d5/50/83c593b07763e1161326b3b8c6686f0f4b0f24d5526546bee538c89837d6/decorator-5.1.1-py3-none-any.whl
        sha256: b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186

  - name: charset_normalizer
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app charset_normalizer-*.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/06/b3/24afc8868eba069a7f03650ac750a778862dc34941a4bebeb58706715726/charset_normalizer-2.0.12-py3-none-any.whl
        sha256: 6881edbebdb17b39b4eaaa821b438bf6eddffb4468cf344f09f89def34a8b1df

  - name: certifi
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app certifi-*.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/37/45/946c02767aabb873146011e665728b680884cd8fe70dde973c640e45b775/certifi-2021.10.8-py2.py3-none-any.whl
        sha256: d62a0163eb4c2344ac042ab2bdf75399a71a2d8c7d47eac2e2ee91b9d6339569

  - name: stevedore
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app stevedore-*.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/7a/bc/fcce9e50da73ea23af6d236e05e15db8a02da1099a5e0a479451bcea3833/stevedore-3.5.0-py3-none-any.whl
        sha256: a547de73308fd7e90075bb4d301405bebf705292fa90a90fc3bcf9133f58616c

  - name: requests
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app requests-*.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/2d/61/08076519c80041bc0ffa1a8af0cbd3bf3e2b62af10435d269a9d0f40564d/requests-2.27.1-py2.py3-none-any.whl
        sha256: f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d

  - name: rarfile
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app rarfile-*.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/95/f4/c92fab227c7457e3b76a4096ccb655ded9deac869849cb03afbe55dfdc1e/rarfile-4.0-py3-none-any.whl
        sha256: 1094869119012f95c31a6f22cc3a9edbdca61861b805241116adbe2d737b68f8

  - name: pytz
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app pytz-*.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/60/2e/dec1cc18c51b8df33c7c4d0a321b084cf38e1733b98f9d15018880fb4970/pytz-2022.1-py2.py3-none-any.whl
        sha256: e68985985296d9a66a881eb3193b0906246245294a881e7c8afe623866ac6a5c

  - name: pysrt
    buildsystem: simple
    build-commands:
      - python3 setup.py install --prefix=/app --root=/
    sources:
      - type: archive
        url: https://files.pythonhosted.org/packages/31/1a/0d858da1c6622dcf16011235a2639b0a01a49cecf812f8ab03308ab4de37/pysrt-1.1.2.tar.gz
        sha256: b4f844ba33e4e7743e9db746492f3a193dc0bc112b153914698e7c1cdeb9b0b9

  - name: babelfish
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app babelfish-*.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/ce/2c/f7951f771261da6740af14fd9698064616aa040780cd8a03243fc43165c7/babelfish-0.6.0-py3-none-any.whl
        sha256: 268f1c6279f2a04a66837972e8a9f3dcc68e16f1201eec57d2a4b828a8b41b11

  - name: guessit
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app guessit-*.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/09/01/523ec092ed900893100bec16c24674aff0d0b0af5a7f85654069f5cedb7e/guessit-3.4.3-py3-none-any.whl
        sha256: f7f790c9e55a7bcc8ff887d3146e089c65a23eff72edfb6684ac5fedb47488a5

  - name: enzyme
    buildsystem: simple
    build-commands:
      - python3 setup.py install --prefix=/app --root=/
    sources:
      - type: archive
        url: https://files.pythonhosted.org/packages/dd/99/e4eee822d9390ebf1f63a7a67e8351c09fb7cd75262e5bb1a5256898def9/enzyme-0.4.1.tar.gz
        sha256: f2167fa97c24d1103a94d4bf4eb20f00ca76c38a37499821049253b2059c62bb

  - name: dogpile
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app dogpile*.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/4e/52/20f751a3b46add7691d442654aa84fc088f14270269dcb6dfc50c7c83e55/dogpile.cache-1.1.5-py3-none-any.whl
        sha256: 5f9dcf99087240c7733fad5539b0806b52555917dccad1ef43499eaca8b459d9

  - name: click
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app click-*.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/c2/f1/df59e28c642d583f7dacffb1e0965d0e00b218e0186d7858ac5233dce840/click-8.1.3-py3-none-any.whl
        sha256: bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48

  - name: chardet
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app chardet-*.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/19/c7/fa589626997dd07bd87d9269342ccb74b1720384a4d739a1872bd84fbe68/chardet-4.0.0-py2.py3-none-any.whl
        sha256: f864054d66fd9118f2e67044ac8981a54775ec5b67aed0441892edb553d21da5

  - name: beautifulsoup4
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app beautifulsoup4-*.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/9c/d8/909c4089dbe4ade9f9705f143c9f13f065049a9d5e7d34c828aefdd0a97c/beautifulsoup4-4.11.1-py3-none-any.whl
        sha256: 58d5c3d29f5a36ffeb94f02f0d786cd53014cf9b3b3951d42e0080d8a9498d30

  - name: appdirs
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app appdirs-*.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/3b/00/2344469e2084fb287c2e0b57b72910309874c3245463acd6cf5e3db69324/appdirs-1.4.4-py2.py3-none-any.whl
        sha256: a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128

  - name: subliminal
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app subliminal-*.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/d6/f6/d523ddbb9304fa3597101903c0004bdba50c495a1e0d355cdd763df6f2d8/subliminal-2.1.0-py3-none-any.whl
        sha256: c7751e7af83e8e80c924c2c596318d9e2535f249784a41840eaee5f4a4f49d79

  # This mpv plugin prevents screen blanking in GNOME (wayland) while playing media.
  - name: mpv_inhibit_gnome
    buildsystem: simple
    build-commands:
      - make
      - install -D lib/mpv_inhibit_gnome.so /app/etc/mpv/scripts
    sources:
      - type: archive
        url: https://github.com/Guldoman/mpv_inhibit_gnome/archive/refs/tags/v0.1.3.tar.gz
        sha256: 185668823892c6c124ce60068209a1d15da1eefcbef775dcbc90d91c53403f94

but can't include mpv.conf which is different from mpv's official version.

Oh, sorry, I meant as an example if anyone wanted to test, will edit the post.

Well, I tried compiling libmysofa, but it is not able to find CUnit.h header files in flatpak build environment. But in my debian system, libmysofa builds with cunit (/usr/local/) install

Gotcha, can't help with that issue, not very experienced with flatpak build environment unfortunately.

Thanks for your time.

Edit: Installed flatpak-builder and following https://docs.flatpak.org/en/latest/first-build.html ; will test your manifest.

This seems to work:

  - name: libmysofa
    buildsystem: cmake
    sources:
      - type: archive
        archive-type: tar
        url: https://github.com/hoene/libmysofa/archive/refs/tags/v1.3.1.tar.gz
        sha256: a8a8cbf7b0b2508a6932278799b9bf5c63d833d9e7d651aea4622f3bc6b992aa

(Currently building ffmpeg.)

Finished building, worked:

flatpak run io.mpv.Mpv --af=help | grep sofa
  sofalizer        SOFAlizer (Spatially Oriented Format for Acoustics).

CUnit is only required to build the test programs.

Here's a manifest without CUnit:
https://gist.github.com/kevinlekiller/eb82ef329f0f4ccddb781239da277cfc#file-io-mpv-mpv-yml-L312

Thanks, including sofalizer ffmpeg support.

Thanks!