26.04 fresh install: is Gstreamer broken for .mkv video?
https://askubuntu.com/questions/1566358/26-04-fresh-install-is-gstreamer-broken-for-mkv-video
Happy Sunday everyone!
A fresh install of 26.04 is working brilliantly, and the CPU and GPU-related improvements are proving to be a welcome speed/quality upgrade to my system. However...
I use the default [Rygel] media sharing to watch videos on my TV simply by dropping them into my Videos folder on Ubuntu, and it was working fine in 24.04. However, I noticed that since my fresh install of 26.04 my .mkv videos are no longer served and do not appear in VLC local network discovery on both my TV and mobile.
The root cause is Gstreamer, which Rygel uses, unable to decipher .mkv files anymore; all other formats, e.g. MP4, are fine and I can see and play them. The error comes up as either 'unsupported pixel format' or 'failed to configure the buffer pool' depending which .mkv file I try. In case this problem was Rygel-specific, I installed the [now default] Showtime app, which is also Gstreamer-based, and sure enough, that comes back with 'unable to play video' on .mkv files with the detailed error being Gstreamer with the same two errors as above.
Please could someone confirm this bug for me? The easiest way is just to try to play any .mkv video using Showtime. I have restricted extras installed and all other codec/video libraries including good, bad and ugly. It would be interesting to hear from someone who does not have my ARM-based (Raspberry Pi 5) system to make sure it is not specific to the RPi5-specific build of 26.04.
Many thanks in advance
Nick
As requested by https://askubuntu.com/users/1004020/daniel-t (thank you):
$ dpkg --get-selections | grep gstreamer
gir1.2-gstreamer-1.0:arm64 install
gstreamer1.0-alsa:arm64 install
gstreamer1.0-gl:arm64 install
gstreamer1.0-gtk3:arm64 install
gstreamer1.0-gtk4:arm64 install
gstreamer1.0-libav:arm64 install
gstreamer1.0-packagekit install
gstreamer1.0-pipewire:arm64 install
gstreamer1.0-plugins-bad:arm64 install
gstreamer1.0-plugins-base:arm64 install
gstreamer1.0-plugins-base-apps install
gstreamer1.0-plugins-extra:arm64 install
gstreamer1.0-plugins-good:arm64 install
gstreamer1.0-plugins-ugly:arm64 install
gstreamer1.0-tools install
gstreamer1.0-x:arm64 install
libgstreamer-gl1.0-0:arm64 install
libgstreamer-plugins-bad1.0-0:arm64 install
libgstreamer-plugins-base1.0-0:arm64 install
libgstreamer-plugins-extra1.0-0:arm64 install
libgstreamer1.0-0:arm64 install
In case it helps, these are the errors from opening two different .mkv files in Showtime video player (Gstreamer-based):
Error from element /GstPlayBin3:playbin3/GstURIDecodeBin3:uridecodebin3/GstDecodebin3:decodebin3-0/v4l2slh265dec:v4l2slh265dec0: GStreamer error: negotiation problem.
Unsupported pixel format
../sys/v4l2codecs/gstv4l2codech265dec.c(460): gst_v4l2_codec_h265_dec_negotiate (): /GstPlayBin3:playbin3/GstURIDecodeBin3:uridecodebin3/GstDecodebin3:decodebin3-0/v4l2slh265dec:v4l2slh265dec0:
No support for 3840x2160 format UNKNOWN
Error from element /GstPlayBin3:playbin3/GstURIDecodeBin3:uridecodebin3/GstDecodebin3:decodebin3-0/v4l2slh265dec:v4l2slh265dec0: Could not get/set settings from/on resource.
Failed to configure the buffer pool
../gst-libs/gst/video/gstvideodecoder.c(4373): gst_video_decoder_decide_allocation_default (): /GstPlayBin3:playbin3/GstURIDecodeBin3:uridecodebin3/GstDecodebin3:decodebin3-0/v4l2slh265dec:v4l2slh265dec0:
Configuration is most likely invalid, please report this issue.
Output of ffmpeg:
Input #0, matroska,webm, from 'test video 1080p.mkv':
Metadata:
creation_time : 2026-04-27T14:41:20.000000Z
ENCODER : Lavf62.3.100
Duration: 01:41:46.75, start: -0.021000, bitrate: 2017 kb/s
Stream #0:0: Video: hevc (Main), 1 reference frame, yuv420p(tv, bt709, left), 1918x1040 [SAR 1:1 DAR 959:520], 23.98 fps, 23.98 tbr, 1k tbn (default)
Metadata:
DURATION : 01:41:39.719000000
Stream #0:1(eng): Audio: aac (LC), 48000 Hz, 5.1, fltp, delay 1024, start -0.021000 (default)
Metadata:
title : AAC 5.1 320kbs
DURATION : 01:41:46.752000000
Stream #0:2(eng): Subtitle: subrip (srt), start -0.021000
Metadata:
title : English
DURATION : 01:34:33.417000000
[out#0/null @ 0xaaaad3d17ba0] No explicit maps, mapping streams automatically...
[vost#0:0/wrapped_avframe @ 0xaaaad3df5840] Created video stream from input stream 0:0
Device creation failed: -14.
[vist#0:0/hevc @ 0xaaaad3df53e0] [dec:hevc @ 0xaaaad3dfe320] No device available for decoder: device type drm needed for codec hevc.
[vist#0:0/hevc @ 0xaaaad3df53e0] [dec:hevc @ 0xaaaad3dfe320] Hardware device setup failed for decoder: Bad address
Error opening output file -.
Error opening output files: Bad address
[AVIOContext @ 0xaaaad3d18f50] Statistics: 32768 bytes read, 0 seeks
Exiting with exit code -14
Output from dmesg:
$ sudo dmesg | grep hevc ; for codec in H264 H265 MPG2 WVC1 MPG4 MJPG WMV9 ; do echo -e "$codec:\t$(vcgencmd codec_enabled $codec)" ; done ; vcgencmd get_mem arm ; vcgencmd get_mem gpu ; vcgencmd get_config int
[ 5.409842] rpi-hevc-dec 1000800000.codec: Device registered as /dev/video19
H264: Can't open device file: /dev/vcio
Try creating a device file with: sudo mknod /dev/vcio c 100 0
H265: Can't open device file: /dev/vcio
Try creating a device file with: sudo mknod /dev/vcio c 100 0
MPG2: Can't open device file: /dev/vcio
Try creating a device file with: sudo mknod /dev/vcio c 100 0
WVC1: Can't open device file: /dev/vcio
Try creating a device file with: sudo mknod /dev/vcio c 100 0
MPG4: Can't open device file: /dev/vcio
Try creating a device file with: sudo mknod /dev/vcio c 100 0
MJPG: Can't open device file: /dev/vcio
Try creating a device file with: sudo mknod /dev/vcio c 100 0
WMV9: Can't open device file: /dev/vcio
Try creating a device file with: sudo mknod /dev/vcio c 100 0
Can't open device file: /dev/vcio
Try creating a device file with: sudo mknod /dev/vcio c 100 0
Can't open device file: /dev/vcio
Try creating a device file with: sudo mknod /dev/vcio c 100 0
Can't open device file: /dev/vcio
Try creating a device file with: sudo mknod /dev/vcio c 100 0
Latest results using H265 mkv:
Input #0, matroska,webm, from 'video-h265.mkv':
Metadata:
ENCODER : Lavf55.12.0
Duration: 00:00:16.16, start: 0.099000, bitrate: 2619 kb/s
Stream #0:0: Video: hevc (Main), 1 reference frame, yuv420p(tv, bt709, left), 1920x960 [SAR 1:1 DAR 2:1], 25 fps, 25 tbr, 1k tbn, start 0.120000 (default)
Stream #0:1(eng): Audio: aac (LC), 48000 Hz, stereo, fltp, start 0.099000 (default)
Metadata:
title : Stereo
LANGUAGE : eng
[out#0/null @ 0xaaaaf4dceb20] No explicit maps, mapping streams automatically...
[vost#0:0/wrapped_avframe @ 0xaaaaf4e01790] Created video stream from input stream 0:0
Device creation failed: -14.
[vist#0:0/hevc @ 0xaaaaf4dfd030] [dec:hevc @ 0xaaaaf4e02570] No device available for decoder: device type drm needed for codec hevc.
[vist#0:0/hevc @ 0xaaaaf4dfd030] [dec:hevc @ 0xaaaaf4e02570] Hardware device setup failed for decoder: Bad address
Error opening output file -.
Error opening output files: Bad address
[AVIOContext @ 0xaaaaf4dd2ed0] Statistics: 182748 bytes read, 0 seeks
Exiting with exit code -14
nicholas@nostromo:~/Downloads$ sudo vcgencmd get_mem gpu
gpu=8M
nicholas@nostromo:~/Downloads$ sudo vcgencmd get_config int
arm_64bit=1
arm_freq=2400
arm_freq_min=1500
arm_peri_high=1
audio_pwm_mode=2
avs_temp=19144
camera_auto_detect=1
core_freq=910
core_freq_min=500
disable_commandline_tags=2
disable_fw_kms_setup=1
disable_l2cache=1
disable_overscan=1
display_auto_detect=1
display_default_lcd=-1
display_hdmi_rotate=-1
display_lcd_rotate=-1
dvfs=4
enable_gic=1
force_eeprom_read=1
force_ethernet_phy_address=-1
force_pwm_open=1
framebuffer_depth=16
framebuffer_ignore_alpha=1
framebuffer_swap=1
gpu_freq_min=500
hdmi_enable_4kp60=1
hevc_freq=910
hevc_freq_min=500
ignore_lcd=-1
init_uart_clock=0x2dc6c00
initial_turbo=60
isp_freq=910
isp_freq_min=500
mask_gpu_interrupt1=16418
max_framebuffers=1
over_voltage_avs=0x1b8a0
pause_burst_frames=1
pciex4_reset=1
pmic_turbo_threshold=1500
power_force_3v3_pwm=1
program_serial_random=1
ramfsaddr=-1
total_mem=16384
usb_max_current_enable=1
v3d_freq=960
v3d_freq_min=500
vpred=8728
vpred_max=8728
hdmi_force_cec_address:0=65535
hdmi_force_cec_address:1=65535