fix(viewer): run PulseAudio so Qt 6 video plays with audio#3001
Merged
Conversation
Debian's Qt 6 Multimedia is compiled with PulseAudio as its only audio backend (libQt6Multimedia.so.6 links libpulse and contains no ALSA code), so without a running PulseAudio server QMediaDevices enumerates zero audio outputs, QAudioOutput keeps a null device, and every video on a Qt 6 board (pi4-64, pi5, x86, arm64) plays silent. The pre-QtMultimedia mpv path talked ALSA directly and needed no sound server, which is why audio regressed with the migration. - ship pulseaudio (+ pulseaudio-utils for field debugging) in the Qt 6 viewer images - start a minimal per-container daemon as the viewer user from start_viewer.sh; the generated config loads one module-alsa-card per /proc/asound/cards entry with name=<alsa card id>, so the pulse sink names embed the ALSA card name and the existing CARD=<name> matching in VideoView::resolveAlsaDevice (HDMI-port auto-detection, hdmi/local audio_output setting) keeps working unchanged on top of pulse - module-udev-detect finds nothing in a container without udevd, which is why the stock default.pa is not used - update the arm64 audio log message: the 'default' device now resolves to the PulseAudio default sink, not ALSA's ~/.asoundrc Validated on a physical Pi 4 (pi4-64 image): vc4hdmi0 PCM reaches RUNNING with 48 kHz IEC958 samples flowing during video playback, and the AnthiasViewer stream attaches to alsa_output.vc4hdmi0.hdmi-stereo. Fixes #3000 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
There was a problem hiding this comment.
Pull request overview
Fixes silent audio on Qt 6 viewer images by ensuring a PulseAudio server is available inside the viewer container (required because Debian’s Qt 6 Multimedia build uses PulseAudio as its only audio backend).
Changes:
- Install
pulseaudio(+pulseaudio-utilsforpactldebugging) in Qt 6 viewer images. - Start a minimal per-container PulseAudio daemon as the
vieweruser with a generated config that loads ALSA cards from/proc/asound/cards. - Update arm64 viewer logging/comments to reflect that the “default” audio device resolves via PulseAudio on Qt 6 boards.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tools/image_builder/utils.py | Adds PulseAudio packages to Qt 6 viewer image dependencies. |
| src/anthias_viewer/media_player.py | Updates arm64 audio-device logging/comments to match PulseAudio-backed behavior. |
| bin/start_viewer.sh | Starts a minimal PulseAudio daemon (generated config, ALSA card modules) before launching the viewer. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Jun 6, 2026
vpetersson
added a commit
that referenced
this pull request
Jun 7, 2026
- CalVer (YYYY.0M.MICRO); still June 2026, micro 1 -> 2 - Ships the Qt 6 video audio fix (#3001) — PulseAudio in the viewer container; videos were silent on pi4-64/pi5/x86/arm64 since the QtMultimedia migration - Adds the arm64/Qt6 pi3-64 board and the Rock Pi 4 fleet (#2985) - Page-load watchdog so a stalled fetch can't freeze the display (#3003), Sentry error tracking for the Django services (#3007) - Redis data persisted to the mounted volume so device identity survives recreation (#2983); unpinner also rolls OS + supervisor updates (#2984) - Streamed backup downloads (#3005), 12-hour AM/PM asset times (#3002), BuildKit frontend via mirror.gcr.io (#3008) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Issues Fixed
Fixes #3000
Description
Debian's Qt 6 Multimedia is compiled with PulseAudio as its only audio backend —
libQt6Multimedia.so.6linkslibpulseand contains no ALSA code. The viewer container runs no sound server, soQMediaDevicesenumerates zero audio outputs,QAudioOutputkeeps a null device, and every video on a Qt 6 board (pi4-64, pi5, x86, arm64) plays silent. The pre-#2905 mpv path talked ALSA directly and needed no sound server, which is why audio regressed with the QtMultimedia migration.pulseaudio(+pulseaudio-utilsfor field debugging viapactl) in the Qt 6 viewer images.start_viewer.shstarts a minimal per-container daemon as thevieweruser. The config is generated (the stockdefault.padetects cards viamodule-udev-detect, which finds nothing in a container without udevd): onemodule-alsa-cardper/proc/asound/cardsentry, loaded withname=<alsa card id>, so pulse sink names embed the ALSA card name (alsa_output.vc4hdmi0.hdmi-stereo). That's exactly theCARD=<name>discriminatorVideoView::resolveAlsaDevicematches against, so the existing HDMI-port auto-detection and the hdmi/localaudio_outputsetting keep working unchanged.GstFbdevMediaPlayerdrivesalsasinkdirectly and their images don't ship pulseaudio.Validated on a physical Pi 4 running the pi4-64 image built from this branch: the stats log
INITline reportsaudio_default=vc4-hdmi-0 Digital Stereo (HDMI)(previously empty), thevc4hdmi0PCM reachesRUNNINGwith 48 kHz IEC958 samples flowing during video playback, the AnthiasViewer stream attaches toalsa_output.vc4hdmi0.hdmi-stereo, andmodule-suspend-on-idlereleases the PCM between clips.Checklist
🤖 Generated with Claude Code