FFmpeg VAAPI encoder fails to start when profile contains a stale vaapi_device path
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- Half a day
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- c
- Domain
- audio-video-rtc
Research direction
Start in obs-ffmpeg-vaapi.c at the av_hwdevice_ctx_create call and inspect how a saved vaapi_device path is handled. Reproduce the issue with a profile containing a nonexistent device path, then verify that streaming falls back to local auto-detection and starts successfully.
Written by the indexing model from the issue text.
Description
Operating System Info
NixOS 26.11, Linux 7.1.7, x86_64, AMD Renoir (Radeon Vega) iGPU
Other OS
No response
OBS Studio Version
32.1.2
OBS Studio Version (Other)
No response
OBS Studio Log URL
https://obsproject.com/logs/WG8xbiO8m0utxiBB
OBS Studio Crash Log URL
No response
Expected Behavior
If the saved vaapi_device path does not exist, the encoder should fall back to auto-detection and the stream should still start.
Current Behavior
The FFmpeg VAAPI encoder uses the vaapi_device path saved in the profile without checking it. My two machines share a home directory, so a profile can carry the other machine's device path (for example /dev/dri/by-path/pci-0000:00:02.0-render on the Intel machine). If that path does not exist, streaming fails:
[FFmpeg VAAPI encoder: 'advanced_video_stream'] Failed to create VAAPI device context: Invalid argument
Stream output type 'rtmp_output' failed to start!
Steps to Reproduce
- Configure the FFmpeg VAAPI encoder on one machine (the profile saves the local device path, for example
/dev/dri/by-path/pci-0000:04:00.0-render). - Use the same profile on a second machine with a different GPU.
- Start streaming.
Anything else we should know?
Leaving vaapi_device empty makes ffmpeg auto-detect the local render node, so the fix could be a fallback in obs-ffmpeg-vaapi.c when av_hwdevice_ctx_create fails. I can prepare a patch if that is acceptable.
- Dominant language
- C
- Stars
- 76.4k
- Forks
- 10.2k
- Avg merge
- 4d 23h
- Merged PRs (30d)
- 12
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from obsproject/obs-studio
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
obsproject/obs-studio#13918 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
obsproject/obs-studio#13905 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
obsproject/obs-studio#13896 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
obsproject/obs-studio#13823 · 4 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
obsproject/obs-studio#13809 · 1 comment ·
All issues in obsproject/obs-studio
Similar issues
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·
-
bug Self Built Image SNAPSHOT Supported Device target/ramips
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100