rdp / ffmpeg-windows-build-helpers

Helper script for cross compiling some media tools for windows, like customizable ffmpeg.exe (with or without non-free components, etc), and some other bonuses like mplayer, mp4box, mxf, etc.
GNU General Public License v3.0
1.08k stars 411 forks source link

Vulkan and OpenCL #653

Open darkjacky opened 1 year ago

darkjacky commented 1 year ago

Would you mind adding support for Vulkan and OpenCL decoders?

Cuda decode benchmark:

video:12265kB audio:199549kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
bench: utime=3.781s stime=2.547s rtime=24.493s
bench: maxrss=139480kB

OpenCL decode benchmark:

video:12265kB audio:199549kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
bench: utime=27.750s stime=1.438s rtime=6.049s
bench: maxrss=128976kB

Vulkan decode benchmark:

video:12265kB audio:199549kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
bench: utime=26.078s stime=1.672s rtime=6.418s
bench: maxrss=208604kB

They are roughly 4x faster than hardware decoders (by using the videocard 3D chip) and they have a fallback in case there is no hardware decoder making them a really good addition as you don't have to check anything. Just -hwaccel opencl and it will figure it out.

rdp commented 1 year ago

I may be able to look at it...

On Fri, Sep 30, 2022 at 7:34 PM darkjacky @.***> wrote:

Would you mind adding support for Vulkan and OpenCL decoders?

Cuda decode benchmark:

video:12265kB audio:199549kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown bench: utime=3.781s stime=2.547s rtime=24.493s bench: maxrss=139480kB

OpenCL decode benchmark:

video:12265kB audio:199549kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown bench: utime=27.750s stime=1.438s rtime=6.049s bench: maxrss=128976kB

Vulkan decode benchmark:

video:12265kB audio:199549kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown bench: utime=26.078s stime=1.672s rtime=6.418s bench: maxrss=208604kB

They are roughly 4x faster than hardware decoders (by using the videocard 3D chip) and they have a fallback in case there is no hardware decoder making them a really good addition as you don't have to check anything. Just -hwaccel opencl and it will figure it out.

— Reply to this email directly, view it on GitHub https://github.com/rdp/ffmpeg-windows-build-helpers/issues/653, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAADBUGMEEF5IQ7OAYRY5Y3WA6IJFANCNFSM6AAAAAAQ2HJOSY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

rdp commented 1 year ago

But I'm not super familiar with the options or libraries required?

On Fri, Sep 30, 2022 at 9:27 PM Roger Pack @.***> wrote:

I may be able to look at it...

On Fri, Sep 30, 2022 at 7:34 PM darkjacky @.***> wrote:

Would you mind adding support for Vulkan and OpenCL decoders?

Cuda decode benchmark:

video:12265kB audio:199549kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown bench: utime=3.781s stime=2.547s rtime=24.493s bench: maxrss=139480kB

OpenCL decode benchmark:

video:12265kB audio:199549kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown bench: utime=27.750s stime=1.438s rtime=6.049s bench: maxrss=128976kB

Vulkan decode benchmark:

video:12265kB audio:199549kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown bench: utime=26.078s stime=1.672s rtime=6.418s bench: maxrss=208604kB

They are roughly 4x faster than hardware decoders (by using the videocard 3D chip) and they have a fallback in case there is no hardware decoder making them a really good addition as you don't have to check anything. Just -hwaccel opencl and it will figure it out.

— Reply to this email directly, view it on GitHub https://github.com/rdp/ffmpeg-windows-build-helpers/issues/653, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAADBUGMEEF5IQ7OAYRY5Y3WA6IJFANCNFSM6AAAAAAQ2HJOSY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

darkjacky commented 1 year ago

Maybe like this? https://github.com/BtbN/FFmpeg-Builds/blob/0c02e8fe66d8def2ff34de52f244789609f78d9a/scripts.d/50-vulkan/45-vulkan.sh https://github.com/BtbN/FFmpeg-Builds/blob/0c02e8fe66d8def2ff34de52f244789609f78d9a/scripts.d/45-opencl.sh