Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Flatpak Version #1224

Open
crimsonthunder opened this issue Nov 9, 2024 · 7 comments
Open

Request: Flatpak Version #1224

crimsonthunder opened this issue Nov 9, 2024 · 7 comments
Labels
component:Packaging Packaging related issue state:Testing The related code is being tested for release type:Enhancement New feature or request

Comments

@crimsonthunder
Copy link

Hello, and thank you for the fantastic work on Video2x! I truly appreciate the time and effort put into making this app.

Would it be possible to create a Flatpak version of Video2x? A Flatpak version would be incredibly helpful, as it allows for easier installation, and compatibility across different Linux distributions. This could make Video2x more accessible to a broader range of linux users and simplify updates as well.

Thank you very much for considering this request and thank you again for your hard work.

@github-actions github-actions bot added the state:Backlog This issue will be worked on in the future label Nov 9, 2024
@k4yt3x
Copy link
Owner

k4yt3x commented Nov 9, 2024

Interesting suggestion. It may also be easier to recommend flatpak than asking people to use the Docker image. I'll look into it to see how hard it is to make a flatpak package. If it's not too difficult maybe I could release flatpak or AppImage instead of deb files only for Ubuntu.

@k4yt3x k4yt3x added type:Enhancement New feature or request component:Packaging Packaging related issue labels Nov 9, 2024
@k4yt3x
Copy link
Owner

k4yt3x commented Nov 10, 2024

I gave it a try, ran into some issues:

image

app-id: com.github.k4yt3x.video2x
runtime: org.freedesktop.Platform
runtime-version: "23.08"
sdk: org.freedesktop.Sdk
command: video2x
finish-args:
  - --share=network
  - --share=ipc
  - --socket=x11
  - --socket=wayland
  - --device=dri
  - --env=LD_LIBRARY_PATH=/app/lib

modules:
  - name: video2x
    buildsystem: cmake
    builddir: true
    config-opts:
      - -DUSE_SYSTEM_OPENCV=OFF
      - -DUSE_SYSTEM_NCNN=OFF
      - -DUSE_SYSTEM_SPDLOG=OFF
      - -DUSE_SYSTEM_BOOST=OFF
    sources:
      - type: git
        url: https://github.com/k4yt3x/video2x.git
        branch: master
        submodules: true

cleanup:
  - /include
  - /share/man
  - /share/doc
  - /share/gtk-doc

I'll just leave this here for now for anyone experienced with Flatpak to try. I'll probably get back to this after implementing frame interpolation.

@k4yt3x k4yt3x added state:Testing The related code is being tested for release and removed state:Backlog This issue will be worked on in the future labels Dec 19, 2024
@k4yt3x
Copy link
Owner

k4yt3x commented Dec 19, 2024

An update to this feature. I've successfully packed it and it's working on my machine. More tests are needed. Next release should cone with a flatpak package.

image

@crimsonthunder
Copy link
Author

crimsonthunder commented Dec 19, 2024 via email

@crimsonthunder
Copy link
Author

I gave it a try, ran into some issues:

image

app-id: com.github.k4yt3x.video2x
runtime: org.freedesktop.Platform
runtime-version: "23.08"
sdk: org.freedesktop.Sdk
command: video2x
finish-args:
  - --share=network
  - --share=ipc
  - --socket=x11
  - --socket=wayland
  - --device=dri
  - --env=LD_LIBRARY_PATH=/app/lib

modules:
  - name: video2x
    buildsystem: cmake
    builddir: true
    config-opts:
      - -DUSE_SYSTEM_OPENCV=OFF
      - -DUSE_SYSTEM_NCNN=OFF
      - -DUSE_SYSTEM_SPDLOG=OFF
      - -DUSE_SYSTEM_BOOST=OFF
    sources:
      - type: git
        url: https://github.com/k4yt3x/video2x.git
        branch: master
        submodules: true

cleanup:
  - /include
  - /share/man
  - /share/doc
  - /share/gtk-doc

I'll just leave this here for now for anyone experienced with Flatpak to try. I'll probably get back to this after implementing frame interpolation.

Is the yaml still up to date?

@k4yt3x
Copy link
Owner

k4yt3x commented Dec 28, 2024

Here's the latest I have. I have yet figured out the full process of submitting it to the flatpak repo. Also, since the flatpak FFmpeg is built without libplacebo and non-free encoders, support for libplacebo (Anime4K) and a lot of encoders (e.g., nvenc) are missing.

app-id: io.github.k4yt3x.Video2X
runtime: org.freedesktop.Platform
runtime-version: "24.08"
sdk: org.freedesktop.Sdk
command: video2x
add-extensions:
  org.freedesktop.Platform.ffmpeg-full:
    version: "24.08"
    directory: lib/ffmpeg
    add-ld-path: .
cleanup-commands:
  - mkdir -p ${FLATPAK_DEST}/lib/ffmpeg
finish-args:
  - --device=all
  - --share=ipc
  - --socket=x11
  - --socket=wayland
  - "--env=LC_ALL=C.UTF-8"
  - "--env=LANG=C.UTF-8"
  - --filesystem=home
modules:
  - name: video2x
    buildsystem: cmake
    builddir: true
    config-opts:
      - -DCMAKE_BUILD_TYPE=Release
      - -DCMAKE_INSTALL_PREFIX=/app
      - -DBUILD_SHARED_LIBS=OFF
      - -DUSE_SYSTEM_BOOST=OFF
      - -DUSE_SYSTEM_SPDLOG=OFF
      - -DUSE_SYSTEM_NCNN=OFF
      - -DNCNN_AVX512=OFF
      - -DSPDLOG_NO_EXCEPTIONS=ON
    sources:
      - type: git
        url: https://github.com/k4yt3x/video2x.git
        branch: master

@k4yt3x
Copy link
Owner

k4yt3x commented Jan 12, 2025

I haven't been able to make much progress on Flatpak due to the Flatpak FFmepg being too old. It currently runs, but lacks a lot of codecs and doesn't have libplacebo. On the other hand, I was able to pack it into a pretty usable AppImage. Although I'm more of a fan of how Flatpak acts more like a package manager and helps manage stuff a little more elegantly, the AppImage does seem to work better atm.

You can already get the latest AppImage in the pipeline build artifacts if you want to give it a try:

image

I don't quite want to maintain too many packages at once. If the flatpak version works so poorly, I might just maintain an AppImage instead. If anyone still wants to take a crack at the flatpak version, here's the latest config:

app-id: io.github.k4yt3x.Video2X
runtime: org.freedesktop.Platform
runtime-version: "24.08"
sdk: org.freedesktop.Sdk
command: video2x
add-extensions:
  org.freedesktop.Platform.ffmpeg-full:
    version: "24.08"
    directory: lib/ffmpeg
    add-ld-path: .
cleanup-commands:
  - mkdir -p ${FLATPAK_DEST}/lib/ffmpeg
finish-args:
  - --device=all
  - --share=ipc
  - --socket=x11
  - --socket=wayland
  - --env=LC_ALL=C.UTF-8
  - --env=LANG=C.UTF-8
  - --filesystem=home
modules:
  - name: video2x
    buildsystem: cmake
    builddir: true
    config-opts:
      - -DCMAKE_BUILD_TYPE=Release
      - -DCMAKE_INSTALL_PREFIX=/app
      - -DBUILD_SHARED_LIBS=OFF
      - -DVIDEO2X_USE_EXTERNAL_BOOST=OFF
      - -DVIDEO2X_USE_EXTERNAL_SPDLOG=OFF
      - -DVIDEO2X_USE_EXTERNAL_NCNN=OFF
      - -DNCNN_AVX512=OFF
    sources:
      - type: git
        url: https://github.com/k4yt3x/video2x.git
        branch: master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:Packaging Packaging related issue state:Testing The related code is being tested for release type:Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants