LizardByte / LizardByte/Sunshine

vaapi h264 encoding bandwidth limit

Open
#4,470 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
41.3k
Forks
2.1k
Avg merge
23h 47m
Merged PRs (30d)
124

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Is your issue described in the documentation?

- [x] I have read the documentation

### Is your issue present in the latest beta/pre-release?

None

### Describe the Bug

launch desktop/app with h264 is blocky and unusable. overlay "Bandwidth" will not exceed ~400K/s no matter resolution or frame rate

**[workaround]** forcing software encoder fixes issue
no errors in log

using h265/av1 has no issue

### Expected Behavior

Enable VA-API hardware encoder
Moonlight force h264
start stream
video bitrate increase to improve quality

### Additional Context

package from obs://build.opensuse.org/games:tools

I have not tested other versions or OS. This is a new install.

Operating System: openSUSE Tumbleweed 20251126
KDE Plasma Version: 6.5.3
KDE Frameworks Version: 6.20.0
Qt Version: 6.10.1
Kernel Version: 6.17.9-1-default (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5700X 8-Core Processor
Memory: 16 GiB of RAM (15.5 GiB usable)
Graphics Processor: Intel® Arc
Product Name: AB350 Gaming-ITX/ac

### Host Operating System

Linux

### Operating System Version

opensuse tumbleweed

### Architecture

amd64/x86_64

### Sunshine commit or version

Version 2025.1127.34355

### Package

other (not listed)

### GPU Type

Intel

### GPU Model

Arc A770

### GPU Driver/Mesa Version

25.3.4

### Capture Method

KMS (Linux)

### Config

```Shell
encoder = vaapi
```

### Apps

```json

```

### Relevant log output

```shell
[2025-12-04 10:27:34.500]: Info: Found H.264 encoder: h264_vaapi [vaapi]
[2025-12-04 10:27:34.500]: Info: Found HEVC encoder: hevc_vaapi [vaapi]
[2025-12-04 10:27:34.500]: Info: Found AV1 encoder: av1_vaapi [vaapi]
[2025-12-04 10:27:34.500]: Info: Executing [Desktop]
[2025-12-04 10:27:34.560]: Info: New streaming session started [active sessions: 1]
[2025-12-04 10:27:34.589]: Info: CLIENT CONNECTED
[2025-12-04 10:27:34.642]: Info: /dev/dri/card1 -> i915
[2025-12-04 10:27:34.643]: Info: Found display [wayland-0]
[2025-12-04 10:27:34.643]: Info: Found interface: zxdg_output_manager_v1(31) version 3
[2025-12-04 10:27:34.643]: Info: Found interface: zwp_linux_dmabuf_v1(58) version 5
[2025-12-04 10:27:34.643]: Info: Found interface: wl_output(65) version 4
[2025-12-04 10:27:34.643]: Info: Resolution: 2560x1440
[2025-12-04 10:27:34.643]: Info: Offset: 0x0
[2025-12-04 10:27:34.643]: Info: Logical size: 2560x1440
[2025-12-04 10:27:34.643]: Info: Name: DP-2
[2025-12-04 10:27:34.643]: Info: Found monitor: AOC AG273Q1S4R4
[2025-12-04 10:27:34.643]: Info: -------- Start of KMS monitor list --------
[2025-12-04 10:27:34.643]: Info: Monitor 0 is DP-2: AOC AG273Q1S4R4
[2025-12-04 10:27:34.643]: Info: --------- End of KMS monitor list ---------
[2025-12-04 10:27:34.643]: Info: Screencasting with KMS
[2025-12-04 10:27:34.643]: Info: /dev/dri/card1 -> i915
[2025-12-04 10:27:34.643]: Info: Found monitor for DRM screencasting
[2025-12-04 10:27:34.643]: Info: Found connector ID [275]
[2025-12-04 10:27:34.643]: Info: Found cursor plane [83]
[2025-12-04 10:27:34.647]: Info: Creating encoder [h264_vaapi]
[2025-12-04 10:27:34.647]: Info: Color coding: SDR (Rec. 709)
[2025-12-04 10:27:34.647]: Info: Color depth: 8-bit
[2025-12-04 10:27:34.647]: Info: Color range: MPEG
[2025-12-04 10:27:34.656]: Info: vaapi vendor: Intel iHD driver for Intel(R) Gen Graphics - 25.3.4 ()
[2025-12-04 10:27:34.656]: Info: Streaming bitrate is 30988000
[2025-12-04 10:27:34.656]: Info: Using LP encoding mode
[2025-12-04 10:27:34.656]: Info: Using VBR with single frame VBV size
[2025-12-04 10:27:34.668]: Info: Minimum FPS target set to ~30fps (33.3333ms)
[2025-12-04 10:27:35.049]: Info: Found default monitor by name: alsa_output.pci-0000_0f_00.4.iec958-stereo.monitor
[2025-12-04 10:27:35.070]: Info: Opus initialized: 48 kHz, 2 channels, 512 kbps (total), LOWDELAY
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported H.264 VA-API session with the supplied `encoder = vaapi` configuration on Linux, comparing it with software encoding and the working HEVC/AV1 paths. Review the log around `h264_vaapi`, the 30,988,000 streaming bitrate, and VBR/VBV setup. Done means H.264 hardware encoding can raise its video bitrate above roughly 400K/s without the blocky output.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux
Domain
backend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.