VLC Media Player Crashes when playing .ts files with MPEG-2 codec

I’m having issues with VLC 3.0.18 playing .ts files with MPEG-2 as the video codec – results in crashes/freezes … no issues in regards if H.264/MPEG-4 is the video codec, just MPEG-2.

Brief specs/setup of my primary machine in which this behavior happens:

  • AMD GPU w/default driver, Kernel 6.1.12-1, KDE Plasma DE

On a Wayland Session, playing those files (.ts with MPEG-2 video codec) results in a total system freeze requiring me to press the physical reset button of my machine; on an X11 Session, playing those files will just result in a desktop session crash taking me back to the login screen.

Similar problems happened to another one of my machines with the following setup:

  • NVIDIA GPU w/Proprietary 525.28.02 Driver, Kernel 5.15.94-1, KDE Plasma DE, X11

On this machine, launching those files don’t totally freeze or crash the desktop session, they just crash VLC. Below is a sample error output from the terminal when I launch VLC and one of those files from there.

[00007f9fccc26440] mpeg4audio packetizer: AAC channels: 2 samplerate: 48000
uint DBusMenuExporterDBus::GetLayout(int, int, const QStringList&, DBusMenuLayoutItem&): Condition failed: menu
uint DBusMenuExporterDBus::GetLayout(int, int, const QStringList&, DBusMenuLayoutItem&): Condition failed: menu
[00007f9fc0007420] gl gl: Initialized libplacebo v5.229.0 (API v229)
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[00007f9fc0007420] glconv_vaapi_x11 gl error: vaInitialize: unknown libva error
zsh: segmentation fault (core dumped)  vlc

I think it’s directly related to VLC since I don’t have problems playing the same files with Dragon Player as an alternative video player app. BTW, the VLC I installed for both machines is from the default Arch repo. If you need me to provide more info, please let me know, thx.

1 Like

usually playing TS files fail due to absence of aribb24 package;

but error you’ve given indicates libva error;

run;

$ vainfo 

and give results

I already have the package aribb24 installed on both machines when the previous stated issues/problems occurred; to clarify, not all .ts files will fail, it’s only the ones that contain MPEG-2 codecs, the ones that contain H.264/MPEG-4 codecs play without issues.

This is the output when I try to run $ vainfo initially:

zsh: correct 'vainfo' to 'aainfo' [nyae]? n
The application vainfo is not installed. It may be found in the following packages:
  community/libva-utils 2.17.1-1        /usr/bin/vainfo

After installing the package libva-utils, running the $ vainfo command again outputted this:

Trying display: wayland
Trying display: x11
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
vaInitialize failed with error code -1 (unknown libva error),exit

I had the same problem. i got the solution from @TheReaperUK: Just remove ibva-vdpau-driver and install libva-nvidia-driver from the AUR.

Thx, that fixed it for my machine with the Nvidia GPU. As for the other machine with the AMD GPU, I found this solution from a different post to work:

Edit: Later found out the change in VLC Preferences listed in solution above can cause flickering black screens on other file containers, codecs; I found this other workaround for my machine with an AMD GPU:
Preferences > Input / Codecs > Next to Hardware-accelerated decoding, select VDPAU video decoder instead of automatic in the dropdown box

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.