mirror of
https://github.com/games-on-whales/wolf.git
synced 2026-10-15 21:12:08 +00:00
[PR #163] [CLOSED] feat: implement support for AMD AMF codecs #379
Labels
No labels
🧠 1 - 🤖 999
AMD
bug
bug
cannot reproduce
documentation
duplicate
easy
enhancement
enhancement
enhancement
fixed?
fixed?
good first issue
hard
help wanted
Intel
invalid
LXC
medium
moonlight-protocol
Multi GPU
nixos
not a bug
nvidia
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/wolf#379
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/games-on-whales/wolf/pull/163
Author: @kode54
Created: 1/16/2025
Status: ❌ Closed
Base:
stable← Head:dev-amf📝 Commits (1)
bf5a815feat: implement support for AMD AMF codecs📊 Changes
13 files changed (+3391 additions, -14 deletions)
View changed files
📝
.dockerignore(+2 -1)📝
docker/gpu-drivers.Dockerfile(+5 -0)📝
docker/gstreamer.Dockerfile(+8 -1)➕
docker/gstreamer/gst-amf-av1-usage.patch(+31 -0)➕
docker/gstreamer/gst-amf-headers.patch(+2299 -0)➕
docker/gstreamer/gst-amf-linux.patch(+765 -0)➕
docker/gstreamer/gst-mr-8269.patch(+162 -0)📝
docs/modules/dev/pages/how-it-works.adoc(+1 -1)📝
docs/modules/dev/pages/manual_build.adoc(+12 -1)📝
src/moonlight-server/state/configTOML.cpp(+29 -2)📝
src/moonlight-server/state/data-structures.hpp(+1 -0)📝
src/moonlight-server/state/default/config.include.toml(+38 -4)📝
src/moonlight-server/state/default/config.v4.toml(+38 -4)📄 Description
This is a draft until things settle.
Some notes:
The gstreamer Dockerfile applies a patch from my Gist repo. I probably should have stuffed that patch into this repo instead. I wasn't thinking clearly enough last night to realize that Docker has access to the local files of this repo.
Edit 4: You need to mount your local distribution's compatible AMF libraries into the image as read-only volumes:
Either for Docker run:
Edit 5: Here, have a Docker Compose preset, assuming you built all these images locally:
Edit 2: The version of AMF that this image set creates requires bleeding edge AMDGPU VCN firmware. I hope it's possible to update your test machines to the latest available linux-firmware package.
Edit 3: Basically, whatever Docker host you run this on requires the
amdgpukernel module to interface with the GPU, and the latest availablelinux-firmwarepackage or equivalent for your distribution. This should at least beUbuntu 24.04or whatever other LTS is available from 2024, or a more bleeding edge distribution if you prefer. After all, the AMF package this bundles is targetingUbuntu 24.04, and is running on anUbuntu 24.10image.Edit: Some editing instructions for your config.toml, based on the current v4 format, in case you don't want to reset your config and paste in your UUID and device pairings:
First, look at your
gstreamer.videodefault_sourcesetting. If there is amax-bytes=0, it should be removed. If there is amax-buffers, it should be changed to5or so.Second, for every
gstreamer.video.defaults.*plugin entry already in existence, this may be worth tweaking, but not applicable to AMF. If the first part of thevideo_paramsisqueue !, it should be changed toqueue leaky=downstream max-size-buffers=5 !. If it already has theleaky=downstreampart, change themax-size-buffersto5or so. This seems to help some codecs. Just so long as theleakyparameter is there, of course.Third, add the default plugin settings for
amfcodec, directly underneath thegstreamer.video.defaults.qsvsection:Finally, add the three codec sections, in the
[[gstreamer.video.*_encoders]]sections, below the respectiveplugin_name = 'qsv'sections, and directly above the respectiveplugin_name = 'vaapi'sections. If they are not ordered before thevaapisections, thevaapisections will take priority, as they are tried in order of the config file:AV1:
H.264:
HEVC:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.