[FFmpeg-devel] [PATCH v5] fftools/ffplay: add hwaccel decoding support

Zhao Zhili quinkblack at foxmail.com
Mon Oct 30 19:29:30 EET 2023


On 2023/10/31 00:04, Zhao Zhili wrote:
> From: Zhao Zhili <zhilizhao at tencent.com>
>
> Add vulkan renderer via libplacebo.
>
> Simple usage:
> $ ffplay -hwaccel vulkan foo.mp4
>
> Use cuda to vulkan map:
> $ ffplay -hwaccel cuda foo.mp4
>
> Create vulkan instance by libplacebo, and enable debug:
> $ ffplay -hwaccel vulkan \
> 	-vulkan_params create_by_placebo=1:debug=1 foo.mp4

Some words about the patch.

I work on this in my spare time (weekend and midnight) for fun, like 
most of my

patches in FFmpeg and VLC. I learned a lot in this process from hwcontext_*,

libplacebo, and mpv. I'm not meant to reinvent the wheel and duplicate the

work of mpv or VLC, but enhance a simple test tool.

I do my best to do the test. I have tested on

1. Linux with cuda and vulkan decoder, and the slow path with vdpau

2. Windows with cuda, vulkan, d3d11va (copy to CPU)

3. MacOS with videotoolbox (map to CPU). Depends on another avutil patch

https://patchwork.ffmpeg.org/project/ffmpeg/patch/tencent_E37C7AAC8A39CDC271B63069AE01F9692A0A@qq.com/

Or let libplacebo create the vulkan instance.

I won't be surprised if it doesn't work on some hardware/software 
environment.

Please review and test the patch if you are interested on it.






More information about the ffmpeg-devel mailing list