{
 "app_id": "io.github.xfuentes.smart-video-processor",
 "source_url": "https://raw.githubusercontent.com/flathub/io.github.xfuentes.smart-video-processor/master/io.github.xfuentes.smart-video-processor.yml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "25.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=ipc",
  "--share=network",
  "--socket=fallback-x11",
  "--socket=pulseaudio",
  "--socket=wayland",
  "--device=dri",
  "--own-name=org.mpris.MediaPlayer2.*"
 ],
 "module_count": 3,
 "fetched_at": "2026-09-17T16:12:35.930756+00:00",
 "manifest": {
  "app-id": "io.github.xfuentes.smart-video-processor",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.node22"
  ],
  "add-extensions": {
   "org.freedesktop.Platform.ffmpeg-full": {
    "version": "25.08",
    "directory": "lib/ffmpeg",
    "add-ld-path": "lib"
   }
  },
  "base": "org.electronjs.Electron2.BaseApp",
  "base-version": "25.08",
  "separate-locales": false,
  "command": "io.github.xfuentes.smart-video-processor",
  "finish-args": [
   "--share=ipc",
   "--socket=fallback-x11",
   "--socket=pulseaudio",
   "--own-name=org.mpris.MediaPlayer2.*",
   "--device=dri",
   "--share=network",
   "--socket=wayland",
   "--env=ELECTRON_TRASH=gio",
   "--env=XCURSOR_PATH=/run/host/user-share/icons:/run/host/share/icons"
  ],
  "modules": [
   {
    "name": "mkvmerge-x86_64",
    "only-arches": [
     "x86_64"
    ],
    "buildsystem": "simple",
    "build-commands": [
     "set -e\nmkdir -p deb\nfor deb in *.deb; do\n  b=$(basename \"$deb\" .deb)\n  mkdir -p \"deb/$b\"\n  (cd \"deb/$b\" && ar x \"../../$deb\" && tar -xf data.tar.*)\ndone\nmkdir -p /app/bin /app/lib\nMKVMERGE=$(find \"$PWD/deb\" -type f -name mkvmerge | head -1)\ninstall -Dm755 \"$MKVMERGE\" /app/bin/mkvmerge\n# Collect all libraries required by the prebuilt binary and copy only\n# those to /app/lib, ignoring base runtime libraries.\nDEB_LIB_DIR=$(find \"$PWD/deb\" -type d -name 'x86_64-linux-gnu' | tr '\\n' ':')\nSKIP_RE=\"linux-vdso|ld-linux|libc\\.so|libm\\.so|libpthread\\.so|libdl\\.so|librt\\.so|libgcc_s\\.so|libstdc\\+\\+\\.so|libmvec\\.so|libglib-2\\.0|libgobject-2\\.0|libgio-2\\.0|libgmodule-2\\.0|libgthread-2\\.0|libpcre2-.*\\.so\"\nexport LD_LIBRARY_PATH=\"$DEB_LIB_DIR\"\nldd /app/bin/mkvmerge 2>/dev/null | grep -oE '/[^ ]+\\.so\\.[^ ]+' > /tmp/mkvmerge.0\nfor i in 1 2 3 4 5; do\n  while IFS= read -r lib; do\n    ldd \"$lib\" 2>/dev/null | grep -oE '/[^ ]+\\.so\\.[^ ]+'\n  done < /tmp/mkvmerge.$((i-1)) | sort -u > /tmp/mkvmerge.$i\ndone\nsort -u /tmp/mkvmerge.* | while IFS= read -r lib; do\n  [ -z \"$lib\" ] && continue\n  base=$(basename \"$lib\")\n  echo \"$base\" | grep -Eq \"$SKIP_RE\" && continue\n  [ -f \"/app/lib/$base\" ] && continue\n  [ -f \"$lib\" ] && cp -L \"$lib\" \"/app/lib/$base\"\ndone\n"
    ],
    "sources": [
     {
      "type": "file",
      "url": "https://mkvtoolnix.download/debian/pool/bookworm/main/m/mkvtoolnix/mkvtoolnix_101.0-0~debian12bunkus01_amd64.deb",
      "dest-filename": "mkvtoolnix_101.0-0~debian12bunkus01_amd64.deb",
      "sha256": "ecffa3205c09e6a005228f9994dce121c01c17a953f8b358f1ee71eb3e94b43d"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/b/boost1.74/libboost-filesystem1.74.0_1.74.0%2bds1-21_amd64.deb",
      "dest-filename": "libboost-filesystem1.74.0_1.74.0+ds1-21_amd64.deb",
      "sha256": "3e80caec26a4ee663dc2e4fdaf10b0f03308284f7e44248290b8dd18de4ca237"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/f/flac/libflac12_1.4.2%2bds-2_amd64.deb",
      "dest-filename": "libflac12_1.4.2+ds-2_amd64.deb",
      "sha256": "4d8431c274eef13ec9ee2c0bf988c34b4342367dec053b7f69a432525be5b1fe"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/f/fmtlib/libfmt9_9.1.0%2bds1-2_amd64.deb",
      "dest-filename": "libfmt9_9.1.0+ds1-2_amd64.deb",
      "sha256": "c3d405b6eabb1a521b60a57509826707f0e6f92b41cdfaae06bf1d7c37da2166"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/g/gmp/libgmp10_6.2.1%2bdfsg1-1.1_amd64.deb",
      "dest-filename": "libgmp10_2%3a6.2.1+dfsg1-1.1_amd64.deb",
      "sha256": "187aedef2ed763f425c1e523753b9719677633c7eede660401739e9c893482bd"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/i/icu/libicu72_72.1-3%2bdeb12u1_amd64.deb",
      "dest-filename": "libicu72_72.1-3+deb12u1_amd64.deb",
      "sha256": "f7f6f99c6d7b025914df2447fc93e11d22c44c0c8bdd8b6f36691c9e7ddcef88"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/libb/libb2/libb2-1_0.98.1-1.1_amd64.deb",
      "dest-filename": "libb2-1_0.98.1-1.1_amd64.deb",
      "sha256": "322be801ee9051f34cc4f09512222bac1f0918e32da3a2bd12eddc51cd2df653"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/libd/libdvdread/libdvdread8_6.1.3-1_amd64.deb",
      "dest-filename": "libdvdread8_6.1.3-1_amd64.deb",
      "sha256": "7d06effc2a930cc8d737adcb56486cc8315ac216f917f5550360bcb2396aa738"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/libv/libvorbis/libvorbis0a_1.3.7-1_amd64.deb",
      "dest-filename": "libvorbis0a_1.3.7-1_amd64.deb",
      "sha256": "01c14f9d1109650077a4c5c337c285476a6932d4d448f5a190c2b845724dbf21"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/libo/libogg/libogg0_1.3.5-3_amd64.deb",
      "dest-filename": "libogg0_1.3.5-3_amd64.deb",
      "sha256": "f67acb0477aed0354f411172e37af338f3ac6bd4f3766134a2cf5539884b5a28"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/q/qt6-base/libqt6core6_6.4.2%2bdfsg-10_amd64.deb",
      "dest-filename": "libqt6core6_6.4.2+dfsg-10_amd64.deb",
      "sha256": "2849e8e686c3f7a1b60ad30373b64d6be33003f4b80953eacf331901c20beeb7"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/d/double-conversion/libdouble-conversion3_3.2.1-1_amd64.deb",
      "dest-filename": "libdouble-conversion3_3.2.1-1_amd64.deb",
      "sha256": "802b880ed900e4a8d54bab77b7551a7f3408b04891c3e5650fdc2368cc1fbc0a"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/g/glib2.0/libglib2.0-0_2.74.6-2%2bdeb12u9_amd64.deb",
      "dest-filename": "libglib2.0-0_2.74.6-2+deb12u9_amd64.deb",
      "sha256": "7ff85197685d89e150e342b29a59aab1beee400050ba7da73de81cd999ffee5a"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/p/pcre2/libpcre2-16-0_10.42-1_amd64.deb",
      "dest-filename": "libpcre2-16-0_10.42-1_amd64.deb",
      "sha256": "53892097cf102ecd8f133ccd3f1f6be6f288c6ffeeeacf6ce081dfee15292675"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/p/pcre2/libpcre2-8-0_10.42-1_amd64.deb",
      "dest-filename": "libpcre2-8-0_10.42-1_amd64.deb",
      "sha256": "030db54f4d76cdfe2bf0e8eb5f9efea0233ab3c7aa942d672c7b63b52dbaf935"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/libz/libzstd/libzstd1_1.5.4%2bdfsg2-5_amd64.deb",
      "dest-filename": "libzstd1_1.5.4+dfsg2-5_amd64.deb",
      "sha256": "6315b5ac38b724a710fb96bf1042019398cb656718b1522279a5185ed39318fa"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/g/gcc-12/libgomp1_12.2.0-14%2bdeb12u1_amd64.deb",
      "dest-filename": "libgomp1_12.2.0-14+deb12u1_amd64.deb",
      "sha256": "48fec46bda7f5b1638b9e959889bfbc20491247d402d120bb152687eb48143d7"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/z/zlib/zlib1g_1.2.13.dfsg-1_amd64.deb",
      "dest-filename": "zlib1g_1%3a1.2.13.dfsg-1_amd64.deb",
      "sha256": "d7dd1d1411fedf27f5e27650a6eff20ef294077b568f4c8c5e51466dc7c08ce4"
     }
    ]
   },
   {
    "name": "mkvmerge-aarch64",
    "only-arches": [
     "aarch64"
    ],
    "buildsystem": "simple",
    "build-commands": [
     "set -e\nmkdir -p deb\nfor deb in *.deb; do\n  b=$(basename \"$deb\" .deb)\n  mkdir -p \"deb/$b\"\n  (cd \"deb/$b\" && ar x \"../../$deb\" && tar -xf data.tar.*)\ndone\nmkdir -p /app/bin /app/lib\nMKVMERGE=$(find \"$PWD/deb\" -type f -name mkvmerge | head -1)\ninstall -Dm755 \"$MKVMERGE\" /app/bin/mkvmerge\n# Collect all libraries required by the prebuilt binary and copy only\n# those to /app/lib, ignoring base runtime libraries.\nDEB_LIB_DIR=$(find \"$PWD/deb\" -type d -name 'aarch64-linux-gnu' | tr '\\n' ':')\nSKIP_RE=\"linux-vdso|ld-linux|libc\\.so|libm\\.so|libpthread\\.so|libdl\\.so|librt\\.so|libgcc_s\\.so|libstdc\\+\\+\\.so|libmvec\\.so|libglib-2\\.0|libgobject-2\\.0|libgio-2\\.0|libgmodule-2\\.0|libgthread-2\\.0|libpcre2-.*\\.so\"\nexport LD_LIBRARY_PATH=\"$DEB_LIB_DIR\"\nldd /app/bin/mkvmerge 2>/dev/null | grep -oE '/[^ ]+\\.so\\.[^ ]+' > /tmp/mkvmerge.0\nfor i in 1 2 3 4 5; do\n  while IFS= read -r lib; do\n    ldd \"$lib\" 2>/dev/null | grep -oE '/[^ ]+\\.so\\.[^ ]+'\n  done < /tmp/mkvmerge.$((i-1)) | sort -u > /tmp/mkvmerge.$i\ndone\nsort -u /tmp/mkvmerge.* | while IFS= read -r lib; do\n  [ -z \"$lib\" ] && continue\n  base=$(basename \"$lib\")\n  echo \"$base\" | grep -Eq \"$SKIP_RE\" && continue\n  [ -f \"/app/lib/$base\" ] && continue\n  [ -f \"$lib\" ] && cp -L \"$lib\" \"/app/lib/$base\"\ndone\n"
    ],
    "sources": [
     {
      "type": "file",
      "url": "https://mkvtoolnix.download/debian/pool/bookworm/main/m/mkvtoolnix/mkvtoolnix_101.0-0~debian12bunkus01_arm64.deb",
      "dest-filename": "mkvtoolnix_101.0-0~debian12bunkus01_arm64.deb",
      "sha256": "a39376b19794d0f9d1474d481115f934caeca8714f09617fa72beac666fac84c"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/b/boost1.74/libboost-filesystem1.74.0_1.74.0%2bds1-21_arm64.deb",
      "dest-filename": "libboost-filesystem1.74.0_1.74.0+ds1-21_arm64.deb",
      "sha256": "486dd6442b5562ac197efd05d1f067d175e4c361212d1df757755f50a9c93fe0"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/f/flac/libflac12_1.4.2%2bds-2_arm64.deb",
      "dest-filename": "libflac12_1.4.2+ds-2_arm64.deb",
      "sha256": "338f78e2a140ed4ffca36d4240a7fc6f7867999bea000762a0c1b3924245a868"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/f/fmtlib/libfmt9_9.1.0%2bds1-2_arm64.deb",
      "dest-filename": "libfmt9_9.1.0+ds1-2_arm64.deb",
      "sha256": "7d4f191b968e33c491b252bae91b5f67737c01b8946bda98d1a13d4bac65a0f2"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/g/gmp/libgmp10_6.2.1%2bdfsg1-1.1_arm64.deb",
      "dest-filename": "libgmp10_2%3a6.2.1+dfsg1-1.1_arm64.deb",
      "sha256": "9906387c1dd806518c915bd8616d072c741061d7fa26b222e52763456060b31a"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/i/icu/libicu72_72.1-3%2bdeb12u1_arm64.deb",
      "dest-filename": "libicu72_72.1-3+deb12u1_arm64.deb",
      "sha256": "4f5d892fd81110435e45ed0a5f1b12899d7ff989d51db283cbc043f5631646d8"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/libb/libb2/libb2-1_0.98.1-1.1_arm64.deb",
      "dest-filename": "libb2-1_0.98.1-1.1_arm64.deb",
      "sha256": "7e81c630e6e5835ac36ec915a46c2c60407be3ad12378ea1c466fff7b8ca1bb6"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/libd/libdvdread/libdvdread8_6.1.3-1_arm64.deb",
      "dest-filename": "libdvdread8_6.1.3-1_arm64.deb",
      "sha256": "f863417b3cf98127e0ab210fb0173c46de0aba56e6df20f8fe9851bda784db9f"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/libv/libvorbis/libvorbis0a_1.3.7-1_arm64.deb",
      "dest-filename": "libvorbis0a_1.3.7-1_arm64.deb",
      "sha256": "2f902ae456bcada7b0d494d7bd7c994feb81c4158209d8a12c0b2d9e255edda7"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/libo/libogg/libogg0_1.3.5-3_arm64.deb",
      "dest-filename": "libogg0_1.3.5-3_arm64.deb",
      "sha256": "1a3e6c2a934a4099dcd982785d1563212fc6ad20f021a6f06aa0d6e6582416d3"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/q/qt6-base/libqt6core6_6.4.2%2bdfsg-10_arm64.deb",
      "dest-filename": "libqt6core6_6.4.2+dfsg-10_arm64.deb",
      "sha256": "3447d2ba935f8b4b826f338baf6349d9ec6aeba2b98c8507d59e8c15b809588c"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/d/double-conversion/libdouble-conversion3_3.2.1-1_arm64.deb",
      "dest-filename": "libdouble-conversion3_3.2.1-1_arm64.deb",
      "sha256": "84ce970692c83dcad802d5250dec44056b92d4f0ad5a8d40c5e41906f61100af"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/g/glib2.0/libglib2.0-0_2.74.6-2%2bdeb12u9_arm64.deb",
      "dest-filename": "libglib2.0-0_2.74.6-2+deb12u9_arm64.deb",
      "sha256": "61d92fffada7e27fc0ed9d23e047b45bca3b2e3bfe1a918f4ec16559282859f4"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/p/pcre2/libpcre2-16-0_10.42-1_arm64.deb",
      "dest-filename": "libpcre2-16-0_10.42-1_arm64.deb",
      "sha256": "f4f08df15ba9faa2e74028212a0a7f5c6dc723d3ef3a71a923917a70aae0f3fe"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/p/pcre2/libpcre2-8-0_10.42-1_arm64.deb",
      "dest-filename": "libpcre2-8-0_10.42-1_arm64.deb",
      "sha256": "b2448d0a8a3db7fbeac231e7ef93811346c1fb5f96ccf6f631701d8a4eb39206"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/libz/libzstd/libzstd1_1.5.4%2bdfsg2-5_arm64.deb",
      "dest-filename": "libzstd1_1.5.4+dfsg2-5_arm64.deb",
      "sha256": "95e173c9538f96ede4fc275ec7863f395a97dd0ea62454be9bc914efa1b9be93"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/g/gcc-12/libgomp1_12.2.0-14%2bdeb12u1_arm64.deb",
      "dest-filename": "libgomp1_12.2.0-14+deb12u1_arm64.deb",
      "sha256": "a48b70dd1a95585466b40bd94564bce56ebcb2566e49ccdb6441e996aaab2098"
     },
     {
      "type": "file",
      "url": "http://deb.debian.org/debian/pool/main/z/zlib/zlib1g_1.2.13.dfsg-1_arm64.deb",
      "dest-filename": "zlib1g_1%3a1.2.13.dfsg-1_arm64.deb",
      "sha256": "52b8b8a145bbe1956bba82034f77022cbef0c3d0885c9e32d9817a7932fe1913"
     }
    ]
   },
   {
    "name": "smart-video-processor",
    "buildsystem": "simple",
    "build-options": {
     "append-path": "/usr/lib/sdk/node22/bin",
     "env": {
      "XDG_CACHE_HOME": "/run/build/smart-video-processor/flatpak-node/cache",
      "npm_config_cache": "/run/build/smart-video-processor/flatpak-node/npm-cache",
      "npm_config_offline": "true",
      "npm_config_nodedir": "/usr/lib/sdk/node22",
      "ELECTRON_CACHE": "/run/build/smart-video-processor/flatpak-node/cache/electron"
     }
    },
    "build-commands": [
     "mkdir -p native/uwp-activation/build/Release",
     "sed -i \"s/'dir', 'AppImage', 'tar.gz'/'dir'/g\" electron-builder.ts",
     "npm ci --offline --no-audit --no-fund",
     "npm run build",
     ". flatpak-node/electron-builder-arch-args.sh",
     "npx electron-builder --linux $ELECTRON_BUILDER_ARCH_ARGS --dir --publish never",
     "rm -f dist/linux*unpacked/resources/bin/ffmpeg",
     "rm -f dist/linux*unpacked/resources/bin/ffprobe",
     "rm -f dist/linux*unpacked/resources/bin/mkvmerge",
     "install -d /app/lib/smart-video-processor",
     "cp -r dist/linux*unpacked/* /app/lib/smart-video-processor/",
     "node tools/configure.js ./flatpak",
     "install -Dm644 flatpak/io.github.xfuentes.smart-video-processor.desktop /app/share/applications/io.github.xfuentes.smart-video-processor.desktop",
     "install -Dm644 flatpak/io.github.xfuentes.smart-video-processor.metainfo.xml /app/share/metainfo/io.github.xfuentes.smart-video-processor.metainfo.xml",
     "install -Dm644 resources/icon.svg /app/share/icons/hicolor/scalable/apps/io.github.xfuentes.smart-video-processor.svg",
     "install -Dm755 run.sh /app/bin/io.github.xfuentes.smart-video-processor"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/xfuentes/smart-video-processor.git",
      "tag": "v2.0.0",
      "commit": "bb0b000fe9bb0988cd4e610fe6098363465f669f",
      "disable-lfs": true,
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^v(\\d+\\.\\d+\\.\\d+)$"
      }
     },
     "generated-sources.json",
     {
      "type": "script",
      "dest-filename": "run.sh",
      "commands": [
       "export PATH=\"/app/lib/ffmpeg/bin:$PATH\"",
       "export FLATHUB=true",
       "exec zypak-wrapper /app/lib/smart-video-processor/smart-video-processor \"$@\""
      ]
     }
    ]
   }
  ]
 }
}