[SOLVED] ffmpeg from apt or flatpak, do I need both? debian 13.0
from arsus5478@lemmy.ml to linux@lemmy.ml on 31 Aug 15:19
https://lemmy.ml/post/35482703

flatpak should be newer than apt, correct if wrong.

I first installed FFmpeg extension with extra codecs from flatpak, executed a ffmpeg command that returned: command not found.

I then thought the flatpak package, as the name states, is an extension that needs the apt version to be installed to work, so I executed sudo apt install ffmpeg and after downloading, the command worked.

Should I get rid of flatpak’s ffmpeg? Am I gaining functions with this package?

ffmpeg -version returns ffmpeg version 7.1.1-1+b1 Copyright © 2000-2025 the FFmpeg developers built with gcc 14 (Debian 14.2.0-19)

#linux

threaded - newest

RheumatoidArthritis@mander.xyz on 31 Aug 15:22 next collapse

Other parts of your system very likely require the apt ffmpeg. Keep it, or at least note the packages that apt wants to uninstall because they depend on ffmpeg

cmgvd3lw@discuss.tchncs.de on 31 Aug 15:51 next collapse

You cannot run flatpak application by simply calling the binary.

Coming to your question, I suggest you to install ffmpeg directly from your Debian repo, this way you can get hardware acceleration or device specific benefits for encoding/decoding/transcoding.

You can keep the flatpak version if it is needed by some other flatpak applications. Normally one won’t interfere with the other.

frongt@lemmy.zip on 31 Aug 16:32 next collapse

Unless you have a reason for the flatpak, just use the deb from the repo.

that_leaflet@lemmy.world on 31 Aug 16:39 collapse

The ffmpeg from Flathub is a “runtime” package, intended to be used by other flatpak apps. It’s not meant for CLI use.

Flatpak apps are not added to your $PATH. They’re run with flatpak run appID. Though again, ffmpeg is not an app so it cannot be run this way. Though technically you could use it for CLI use by doing something like flatpak run --command=sh org.mozilla.firefox. This will open a shell inside the flatpak environment, which can use the ffmpeg flatpak runtime.

Though now that I think about it, it would be fun to create my own flatpak package for ffmpeg for CLI use. Should be pretty simple, it would just be a mostly empty package that relies on the ffmpeg-full flatpak runtime. Edit: and I did

<img alt="Screenshot of my ffmpeg flatpak" src="https://lemmy.world/pictrs/image/6e1b5361-c357-4475-802c-084fe3343698.jpeg">

The manifest is simply

id: my.custom.ffmpeg
runtime: org.freedesktop.Platform
runtime-version: '24.08'
sdk: org.freedesktop.Sdk
add-extensions:
  org.freedesktop.Platform.ffmpeg-full:
    directory: lib/ffmpeg
    version: '24.08'
    add-ld-path: .
command: ffmpeg
modules:
  - name: ffmpeg-wrapper
    buildsystem: simple
    build-commands:
      - mkdir -p /app/lib/ffmpeg
      - install -Dm755 ffmpeg.sh /app/bin/ffmpeg
    sources:
      - type: script
        dest-filename: ffmpeg.sh
        commands:
          - /usr/bin/ffmpeg "$@"
finish-args:
    - --filesystem=host
arsus5478@lemmy.ml on 04 Sep 09:35 collapse

holy crap you’re fast