REPRODUCIBILITY: 100%
OS VERSION: 5.2.0.22
HARDWARE: Jolla Phone (2026)
UI LANGUAGE: French
REGRESSION: unknown
DESCRIPTION:
The built-in video player (Gallery, jolla-gallery) never shows subtitles, even when the file has a subtitle track flagged default (and even forced). Tested with an MKV: h264 + AC3 + ASS French subtitles (default=1, forced=1).
Root cause: the Gallery plays through Qt Multimedia 5.6 + GStreamer (playbin3). Qt only sets the VIDEO and AUDIO playbin flags, and adds whatever QT_GSTREAMER_PLAYBIN_FLAGS contains. The device config sets it to 0:
/var/lib/environment/nemo/60-multimedia.conf (package droid-config-jp2601)
QT_GSTREAMER_PLAYBIN_FLAGS=0
So the TEXT flag (0x4) is never set and GStreamer drops every subtitle stream. The plugins are all there (subparse, pango, matroska), and the hardware (droid) decoding path renders the overlay fine.
WORKAROUND 1 — subtitles on (one file, no package):
devel-su
echo 'QT_GSTREAMER_PLAYBIN_FLAGS=4' > /var/lib/environment/nemo/61-subtitles.conf
then reboot (or restart the user session). user@.service reads /var/lib/environment/nemo/*.conf in alphabetical order, so 61- overrides 60- without touching the packaged file. The default subtitle track is then rendered. Downside: the Gallery has no way to pick another track or turn them off.
WORKAROUND 2 — a subtitle button in the Gallery:
Qt 5.6 can switch streams in C++, but nothing is exposed to QML, so a QML-only patch can’t do it. I wrote:
- a small QML module (
bigbob.fun.mediastreams, C++, ~300 lines) that hooks onto the GStreamer bus of a QMLMediaPlayer, finds the playbin and lists/switches the text streams during playback; - a Patchmanager patch for
Sailfish/Gallery/GalleryOverlay.qml: a speech-bubble button next to the ±10 s buttons. Each tap goes to the next subtitle track, then “None”, then back to the first one. A label shows the current track for 2.5 s. Playback is never interrupted.
Two traps I hit, in case someone else tries:
- toggling the TEXT flag during playback makes playsink rebuild the video chain: dropped buffers, then a frozen video;
- sending several
select-streamsevents in a row toplaybin3freezes it too.
What works: “None” sets thesilentproperty on the subtitle overlay elements (instant, nothing rebuilt), and a real stream selection is only sent to switch between two subtitle tracks, one at a time (waiting forSTREAMS_SELECTED). Switching between two real subtitle tracks isn’t tested yet (my test file has only one).
Happy to share the module and the patch if anyone is interested.
Jolla, could you:
- include the TEXT flag in
QT_GSTREAMER_PLAYBIN_FLAGS(i.e.4), so the default subtitle track is shown out of the box; - add a subtitle track selector (with “None”) to the Gallery video player?
AI disclosure: prepared interactively with Claude Code (Anthropic’s AI coding assistant). Every action was requested, reviewed and approved by me; nothing was decided or published autonomously.


