Summary
Video playback across local files (.mp4/H.264) froze after 2–3 seconds when using the Snap package version of VLC on Ubuntu. Manual seeking buffered another few seconds before freezing again. The issue was identified as a failure in the Snap AppArmor sandbox, which restricted VA-API/GPU hardware acceleration buffer allocations and file read handles during stream playback.
Technical Details & Environment
- OS: Ubuntu (Kernel
7.0.0-31-generic) - Affected Package:
vlc(Snap package) - Working Package:
vlc(Native.deb/ APT package) - Impact: System-wide playback failure on Snap media apps; media file corruption ruled out via FFmpeg stream re-encoding and bitstream checks.
Root Cause Analysis
- AppArmor Sandbox Isolation: The Snap container restricted low-level GPU buffer allocation (VA-API/NVDEC interface) required for continuous hardware decoding.
- File Descriptor Throttling: Non-standard folder permissions and sandboxed mount boundaries caused read requests to be blocked after filling the initial playback buffer.
Resolution
Removing the Snap package and installing the native APT package resolved all video playback issues completely.
# 1. Remove sandboxed Snap package
sudo snap remove vlc
# 2. Install native package and restricted codecs
sudo apt update
sudo apt install vlc ubuntu-restricted-extras ffmpeg gstreamer1.0-vaapi -y