hardware: bind vaapi filter device for FFmpeg 8 - #2374
Open
kugaevsky wants to merge 1 commit into
Open
Conversation
The VAAPI transcode inserts a "hwupload" filter but relied on -hwaccel to provide the device to the filter graph. Since FFmpeg 8 that no longer happens, so hwupload fails with "A hardware device reference is required to upload frames to" whenever the input isn't hardware decoded (e.g. an RTSP restream). Explicitly -init_hw_device / -filter_hw_device, matching what the hardware probe commands already do.
kugaevsky
force-pushed
the
ffmpeg-vaapi-device
branch
from
July 21, 2026 06:53
94a8642 to
0c1d68c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
hardware: bind vaapi filter device for FFmpeg 8
Problem
#hardware=vaapitranscoding is broken on FFmpeg 8. The VAAPI branch ofMakeHardwareinserts aformat=vaapi|nv12,hwuploadfilter but relies on-hwaccel vaapito provide the device to the filter graph. FFmpeg 8 nolonger derives the filter device from
-hwaccelalone, sohwuploadfailswhenever the input isn't hardware-decoded (e.g. an RTSP restream):
Note the hardware probe commands already work, because they explicitly
-init_hw_device vaapi— the transcode path just didn't.Fix
Explicitly initialise and bind a filter device in the VAAPI branch, matching
the probes:
Applied to both VAAPI sub-branches (with and without
drawtext).Testing
Reproduced and A/B-tested on an Intel N150 (iHD driver), FFmpeg 8.0.1, same
input stream (
ffmpeg:virtual?video#video=h264#hardware=vaapi):[hwupload] A hardware device reference is required→ stream failsh264 1920x1080— encodes fineAlso verified end-to-end transcoding a live H265 doorbell stream to H264 for a
browser that can't decode HEVC.
Question
-init_hw_device vaapi=vaapi0auto-selects the DRM node (same as the probecommands). If you'd rather thread through an explicit device path, happy to
adjust.