🛠 Accélération GPU et streaming vidéo (Intel UHD, VAAPI)
Objectives
The Celeron N5105 (Jasper Lake) integrates an Intel UHD GPU (450–800 MHz) with hardware decoding/encoding. On Linux, the VAAPI API exposes this acceleration: transcoding video using the GPU instead of 4 CPU threads, connecting a 4K screen via HDMI 2.0b, or streaming a feed to other devices. This tutorial verifies the graphics stack, transcodes with accelerated ffmpeg, and measures the CPU gain. Useful context: at product launch, CNX Software noted imperfect 4K YouTube playback on early Jasper Lake systems — a platform software maturity issue, not a board defect; since then, the VAAPI stack has matured on recent kernels.
Hardware
- LattePanda 3 Delta running up-to-date Ubuntu 22.04 (recent kernel = better Jasper Lake drivers)
- HDMI display (the board outputs up to 4K via HDMI 2.0b, and even triple display HDMI + DisplayPort via USB-C + eDP)
- A test video file (for example, a 1080p capture)
Complete code
# 1. Installer la pile de décodage matériel
sudo apt update
sudo apt install -y vainfo intel-gpu-tools ffmpeg mesa-va-drivers
# 2. Vérifier les codecs accélérés disponibles (attendu : H.264, VP8, VP9, JPEG...)
vainfo
# 3. Transcoder UNE vidéo en utilisant le GPU (comparez 'top' pendant le run)
ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi \
-vaapi_device /dev/dri/renderD128 \
-i entree.mp4 \
-vf 'format=nv12|vaapi,hwupload,scale_vaapi=w=1280:h=720' \
-c:v h264_vaapi -b:v 2M sortie_720p.mp4
# 4. Diffuser en direct sur le réseau (HLS), lu par n'importe quel navigateur
mkdir -p /tmp/hls
ffmpeg -re -i entree.mp4 \
-c:v h264_vaapi -b:v 2M -g 50 \
-f hls -hls_time 4 -hls_list_size 6 -hls_flags delete_segments \
/tmp/hls/direct.m3u8 &
cd /tmp/hls && python3 -m http.server 8000
# Sur un autre poste : http://IP-de-la-carte:8000/direct.m3u8
# 5. Contrôler l'occupation GPU/CPU pendant la diffusion
sudo apt install -y intel-gpu-tools
grep -r . /sys/class/drm/card0/gt_act_freq_mhz 2>/dev/null || true
top -o %CPU
Expected verification
vainfo lists VA-API entries (VAProfileH264…) without errors; during transcoding, top shows ffmpeg well below 100% total CPU usage (the GPU does the work) whereas software transcoding (-c:v libx264) saturates the 4 threads. The HLS stream plays in a browser from another device. The HDMI output displays the interface smoothly.
Common errors
/dev/dri/renderD128missing: missing graphics/mesa drivers or remote session without DRI;sudo apt install mesa-va-driversand checkls /dev/dri/.vainfo: cannot open display: run from a graphical session or withLIBVA_DRIVER_NAME=i965 vainfoover SSH.- NPU/GPU confusion: the 3 Delta has no NPU (no dedicated AI acceleration); the acceleration here is multimedia (VAAPI), not inference.
- Demanding 4K: aim for 1080p for real-time encoding; 4K60 in software exceeds the 10 W budget — this was the point raised by the press at the platform launch.
- Seat heater: the fan only spins at the BIOS threshold; sustained GPU load will trigger it, this is not a failure.
- Triple screen: if a USB-C screen does not light up, remember that the DisplayPort output goes through the USB-C port's Alt Mode (which also serves for PD power delivery).
Other tutorials for this board
Code examples for this board
clignotante.pyPythonbouton.pyPythonservo.pyPythonanalogique.pyPythonrespiration.pyPythonneopixel.pyPython