Skip to content

Amogh/Fix Linux audio and video playback dependencies, packaging, and diagn… - #78

Open
Amoghhosamane wants to merge 3 commits into
gjwgit:devfrom
Amoghhosamane:Amogh/audio-video-linux/71
Open

Amoghhosamane wants to merge 3 commits into
gjwgit:devfrom
Amoghhosamane:Amogh/audio-video-linux/71

Conversation

@Amoghhosamane

Copy link
Copy Markdown

Pull Request Details

Description

This PR resolves audio and video playback issues on Linux desktop and packages:

  • Problem:

    1. On Linux, Flutter's video_player requires native libmpv shared libraries. When running standalone or installed via packages (.deb or Snap), missing runtime libraries or security confinement plugs caused player initialization to fail.
    2. In Snap packages, missing audio-playback and pulseaudio plugs prevented audio routing through Linux sound servers (PulseAudio/PipeWire/ALSA), and libmpv2 was not bundled in stage-packages.
    3. In Debian packages (geopod_amd64.deb), libmpv1 | libmpv2 and libsecret-1-0 were missing from the package Depends: field.
    4. When system dependencies were missing on Linux hosts, player initialization displayed raw, uninformative errors without actionable troubleshooting instructions.
    5. Local build requirements for GNU/Linux desktop were undocumented in the README.
  • What was changed:

    • Snapcraft Configuration (snap/snapcraft.yaml):
      • Added audio-playback and pulseaudio to apps.geopod.plugs.
      • Added libmpv2 to parts.geopod.stage-packages.
    • Debian Packaging (.github/workflows/installers.yaml & installers/deb.sh):
      • Added libmpv1 | libmpv2 and libsecret-1-0 to the Debian control file's Depends: field.
    • Player Diagnostics (lib/widgets/media/audio_player_widget.dart & lib/widgets/media/video_player_widget.dart):
      • Enhanced error handling on Linux to display actionable guidance if initialization fails (sudo apt install libmpv-dev mpv).
    • Documentation (README.md & CHANGELOG.md):
      • Added a dedicated GNU/Linux setup section detailing prerequisite libraries (libmpv-dev, mpv, libsecret-1-dev).
      • Added a summary entry to CHANGELOG.md.
  • Why this change is required:
    Ensures that media playback operates reliably across all supported Linux deployment targets (local make linux, .deb installation, and Snap store distribution) with proper diagnostics if host libraries are missing.

Related Issues

Closes #71

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How To Test?

  1. Linux Build and Local Execution:
    • Install prerequisites on an Ubuntu/Debian environment:
      sudo apt-get install -y libmpv-dev mpv libsecret-1-dev
    • Run the app:
      make linux
      # or: flutter run -d linux
    • Select the Darwin example site from the map and tap Example Audio and Example Video; verify that sound plays and video renders smoothly.
  2. Debian & Snap Dependency Verification:
    • Inspect installers/deb.sh and .github/workflows/installers.yaml to confirm libmpv1 | libmpv2 and libsecret-1-0 are included in Depends:.
    • Inspect snap/snapcraft.yaml to confirm audio-playback, pulseaudio, and libmpv2 stage packages are configured.
  3. Static Analysis & Test Suite:
    • Run:
      flutter analyze lib test
      flutter test
    • Verify that 0 lint issues are reported and all 13 tests pass.

Checklist

  • Screenshots included here/in linked issue BUG: Adio and Video not working on Linux #71
  • Changes adhere to the style and coding guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • Any dependent changes have been merged and published in downstream modules
  • The update contains no confidential information
  • The update has no duplicated content
  • No lint check errors are related to these changes (make prep or flutter analyze lib)
  • Integration test dart test output or screenshot included in issue BUG: Adio and Video not working on Linux #71
  • I tested the PR on these devices:
    • Android
    • iOS
    • Linux
    • MacOS
    • Windows
    • Web
  • I have identified reviewers
  • The PR has been approved by reviewers

Finalising

  • Merge dev into this branch
  • Resolve any conflicts
  • Add a one line summary into the CHANGELOG.md
  • Push to the git repository and review
  • Merge the PR into dev

@Amoghhosamane Amoghhosamane changed the title Fix Linux audio and video playback dependencies, packaging, and diagn… Amogh/Fix Linux audio and video playback dependencies, packaging, and diagn… Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Adio and Video not working on Linux

1 participant