Skip to content

Instantly share code, notes, and snippets.

@ChrisLane
Created July 18, 2025 16:21
Show Gist options
  • Save ChrisLane/8e9e2d0b8f8c0385524586fb566d9e09 to your computer and use it in GitHub Desktop.
Save ChrisLane/8e9e2d0b8f8c0385524586fb566d9e09 to your computer and use it in GitHub Desktop.
# WirePlumber configuration to force webcam to 1080p YUY2 60FPS
# Place this file in ~/.config/wireplumber/wireplumber.conf.d/51-webcam-1080p.conf
monitor.alsa.rules = [
{
matches = [
{
# Match your webcam device
# You may need to adjust these properties to match your specific webcam
# Use 'wpctl status' or 'pw-top' to find your device name
node.name = "~v4l2_input.*"
# Alternative matchers:
# device.name = "~video*"
# media.class = "Video/Source"
}
]
actions = {
update-props = {
# Force specific video format constraints
node.pause-on-idle = false
session.suspend-timeout-seconds = 0
# Set default format
default.video.format = "YUY2"
default.video.size = "1920x1080"
default.video.rate = "60/1"
# Lock the format parameters
api.v4l2.path = "/dev/video0" # Adjust if your webcam is on a different device
api.v4l2.cap.driver = "uvcvideo"
# Enforce format constraints
video.format = {
format = "YUY2"
size = "1920x1080"
framerate = "60/1"
max-framerate = "60/1"
}
}
}
}
]
# Additional stream rules to enforce format
stream.rules = [
{
matches = [
{
# Match video capture streams
media.class = "Stream/Input/Video"
}
]
actions = {
update-props = {
# Force format on streams
video.format = "YUY2"
video.size = "1920x1080"
video.framerate = "60/1"
}
}
}
]
# Device defaults for video capture
device.routes.default-mode = "last-saved"
device.routes = {
v4l2_input = {
routes = [
{
index = 0
direction = "Input"
name = "capture_1"
default = true
priority = 1000
props = {
video.format = "YUY2"
video.size = "1920x1080"
video.framerate = "60/1"
}
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment