CachyOS / CachyOS/distribution

[BUG] Spectacle/kpipewire segfault in avcodec_send_frame after ffmpeg 8.1.1-2.1 upgrade (znver4 packages need rebuild)

Open
#465 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
27
Forks
2
PR merge metrics
No merged PRs in 30d

Description

## Summary
Spectacle crashes with SIGSEGV (segfault) when starting/stopping screen recording via PipeWire — `avcodec_send_frame` crash in `libavcodec.so.62` from `ffmpeg 2:8.1.1-2.1`.

## Problem
Spectacle crashes immediately when starting a screen recording (e.g. via PrtSc) or stopping it (Meta+R). The crash is a segfault in the FFmpeg encoding pipeline, specifically in `avcodec_send_frame`, called from `libKPipeWireRecord.so.6` (kpipewire).

This started after `ffmpeg` was upgraded from `2:8.1.1-1.1` to `2:8.1.1-2.1` on May 13, while `kpipewire` and `spectacle` (znver4-optimized packages from `cachyos-extra-znver4`) were built on May 12 against the previous ffmpeg version.

Still images (screenshots) work fine — only video recording is affected.

## Expected behavior
Spectacle should start/stop screen recording without crashing.

## Actual behavior
Segmentation fault (signal 11) in `avcodec_send_frame` (libavcodec.so.62). No video recording is possible.

## Reproduction steps
1. Install CachyOS with KDE Plasma (znver4 variant).
2. Ensure ffmpeg 2:8.1.1-2.1, kpipewire 6.6.5-1.1, spectacle 1:6.6.5-1.1 are installed.
3. Press PrtSc → select "Record region" (or any video recording option).
4. **Result:** Spectacle disappears/crashes immediately.

## Stack trace (from coredump)
```
Stack trace of thread 26431:
#0 libavcodec.so.62 + 0x729a18
#1 libavcodec.so.62 + 0x3bde7c
#2 avcodec_send_frame (libavcodec.so.62 + 0x3be127)
#3 libKPipeWireRecord.so.6 + 0x12586
#4 Qt6Core + 0x1f081b
#5 PipeWireSourceStream::stateChanged (libKPipeWire.so.6 + 0x19b54)
```

## System info
- **OS:** CachyOS (rolling), znver4
- **Kernel:** 7.0.10-2-cachyos
- **Session:** Wayland
- **Packages:**
- ffmpeg 2:8.1.1-2.1 (installed 2026-05-09, upgraded to -2.1 on 2026-05-13)
- kpipewire 6.6.5-1.1 (built 2026-05-12)
- spectacle 1:6.6.5-1.1 (built 2026-05-12)
- pipewire 1:1.6.6-1.1

## Possible cause
The `kpipewire` and `spectacle` znver4-optimized packages in `cachyos-extra-znver4` were built against `ffmpeg 2:8.1.1-1.1` and likely need to be rebuilt against the current `ffmpeg 2:8.1.1-2.1`. The FFmpeg ABI (`libavcodec.so.62`) minor-version bump may have introduced behavioral changes that break `avcodec_send_frame` with the parameters used by `KPipeWireRecord`.

## Workaround (temporary)
Installing the standard `extra` repo versions (`kpipewire` and `spectacle` from `extra` instead of `cachyos-extra-znver4`) may help.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing screen recording with ffmpeg 2:8.1.1-2.1 and the listed znver4 kpipewire and spectacle packages, then inspect their package build inputs and the coredump stack trace around avcodec_send_frame. Done means the affected znver4 packages are rebuilt against the current ffmpeg and starting or stopping recording no longer crashes.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
build-system, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.