Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 1584

Python • Re: python Qt installation recipe for Video playback.

$
0
0
Please will someone tell me that I'm wrong?

However I'm quickly reaching the conclusion that the software support, in the area of Video Playback using PySide6.QtMultimedia and H265 hardware support, hasn't matured enough to work yet!! I am fairly sure this is the current situation for Wayland, at least, it just would be nice if it was explicitly state so that time isn't wasted.

The Definitive Bottleneck: PySide6 Wheel's FFmpeg Dependency
This output, from a fresh virtual environment (.venv0) where you only installed PySide6==6.7.1, unequivocally confirms the following:

The PySide6 wheel version 6.7.1 for arm64 (and Python 3.11) that is available on PyPI has its QtMultimedia FFmpeg backend plugin (libffmpegmediaplugin.so) specifically compiled to depend on libavformat.so.58 (FFmpeg 4.x).
Your Raspberry Pi OS (Debian Bookworm) provides libavformat.so.59 (FFmpeg 5.x) as its current version.
These two are binary incompatible. Your system will not provide the exact libavformat.so.58 that the PySide6 plugin demands, and apt cannot easily downgrade or provide it due to the libsrt dependency conflict.
This is not a bug in your code, nor in your apt usage, nor typically in your GStreamer setup. This is a binary compatibility mismatch at the core C++ library level, specific to the pre-compiled PySide6 wheel and your operating system's FFmpeg library versions.

What This Means for the PySide6.QtMultimedia Path on Your Setup
You cannot solve this by simply installing apt packages for libavformat58. We've tried and apt shows the dependency conflict.
You cannot solve this by upgrading/reinstalling PySide6 via uv/pip because 6.7.1 is the version you are targeting, and it's this specific version's wheel that has the issue.
The libgstreamermediaplugin.so is also failing (silently, after the FFmpeg one fails). It's highly probable that the GStreamer backend plugin also has a dependency on certain FFmpeg libraries, leading to its failure when the older FFmpeg libraries aren't found.
Therefore, attempting to get PySide6.QtMultimedia to play video on your current Raspberry Pi OS (Debian Bookworm) with PySide6 6.7.1 (or even the latest PySide6 6.8.0.2 which exhibited the same symptom) is a dead end via standard package management. The only ways around this would be:

Downgrade your entire Raspberry Pi OS to the previous major release (Debian Bullseye). This is a huge, disruptive OS reinstallation.
Build PySide6 from source on your Raspberry Pi. This is an extremely complex and time-consuming process.
Use a different Python GUI toolkit or media library.

Can anyone suggest an alternative platform to the Pi with more mature software support and better documentation ?

Statistics: Posted by eklektek — Wed Jun 04, 2025 6:04 pm



Viewing all articles
Browse latest Browse all 1584

Trending Articles