* [FFmpeg-devel] avfilter/hwupload: Did `-init_hw_device` become required with ffmpeg 8?
@ 2025-12-21 17:06 Wladislav Artsimovich via ffmpeg-devel
0 siblings, 0 replies; only message in thread
From: Wladislav Artsimovich via ffmpeg-devel @ 2025-12-21 17:06 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: , Wladislav Artsimovich
Dear ffmpeg devs,
With the update of FFMPEG 7 to FFMPEG 8, I stumbled on an issue and wonder whether `hwupload` became more strict, requiring a device to be specified in ffmpeg 8 as opposed with ffmpeg 7, where it worked implicitly:
When enabling VA-API Hardware decode (AMD Graphics Card) on Nextcloud App Memories, playing a video errors out. I traced this to ffmpeg erroring out due to `hwupload` complaining about `A hardware device reference is required to upload frames to.`, which is documented in https://github.com/NixOS/nixpkgs/issues/473008 and https://github.com/pulsejet/memories/issues/1591 as issues.
Nextcloud Memories calls ffmpeg like so: `ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i 'sample.mp4' -vf "format=nv12|vaapi,hwupload,scale_vaapi=w=854:h=854:format=nv12" -vcodec h264_vaapi EncodeTest/output-www-data2.mp4`
This works with FFMPEG 7, but does not work with FFMPEG 8, which errors out with `[hwupload @ 0x55d77ee7d240] A hardware device reference is required to upload frames to.`
Nextcloud's memories does not specify `init_hw_device`, so when my server's system packages updated ffmpeg 7 to ffmpeg 8, it broke video playback for all users. Forcing dependency ffmpeg down to version 7 fixes this.
Reading the docs: https://trac.ffmpeg.org/wiki/Hardware/VAAPI#DeviceSelection and specifying a device fixes the above example in ffmpeg 8 and no more error occurs:
`ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i 'sample.mp4' -init_hw_device vaapi=foo:/dev/dri/renderD128 -filter_hw_device foo -vf "format=nv12|vaapi,hwupload,scale_vaapi=w=854:h=854:format=nv12" -vcodec h264_vaapi EncodeTest/output-www-data2.mp4`
So this makes me wonder, was this changed on purpose going to ffmpeg 8? Is `init_hw_device` a requirement now, whereas in ffmpeg 7 it was done implicitly?
Best regards,
--
Wladislav Artsimovich 🇩🇪 🇷🇺 🇬🇧 🇯🇵
✍ TechBlog: https://blog.frost.kiwi/
▶ YouTube Channel: https://www.youtube.com/@FrostKiwi/
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-12-24 16:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-21 17:06 [FFmpeg-devel] avfilter/hwupload: Did `-init_hw_device` become required with ffmpeg 8? Wladislav Artsimovich via ffmpeg-devel
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git