Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement inclusion of ffmpeg vulkan filters ? #2235

Closed
hydra3333 opened this issue Jul 3, 2022 · 2 comments
Closed

implement inclusion of ffmpeg vulkan filters ? #2235

hydra3333 opened this issue Jul 3, 2022 · 2 comments

Comments

@hydra3333
Copy link
Contributor

hydra3333 commented Jul 3, 2022

Hello.

If I wished to use ffmpeg's vulkan filters, I gather that one would need to build these dependencies (for static ffmpeg x64):
vulkan_loader
spirv-headers
spirv-cross
spirv-tools
shaderc (shaderc and glslang are mutually exclusive in ffmpeg configure but you can build both dependencies)
glslang (shaderc and glslang are mutually exclusive in ffmpeg configure but you can build both dependencies)

And add these to the ffmpeg configure
--enable-vulkan
--enable-libglslang (or, mutually exclusively, --enable-libshaderc which causes ffmpeg to fail at runtime)
--enable-filter=scale_vulkan
--enable-filter=avgblur_vulkan
--enable-filter=chromaber_vulkan
--enable-filter=overlay_vulkan
--enable-filter=blend_vulkan
--enable-filter=flip_vulkan
--enable-filter=gblur_vulkan
--enable-filter=hflip_vulkan
--enable-filter=transpose_vulkan
--enable-filter=vflip_vulkan
--disable-libplacebo (for me, enabling this causes ffmpeg configure to abort after I enable libglslang)

It seems a fair bet that when selecting vulkan to build into ffmpeg, the user would also hope/assume/expect that the ffmpeg vulkan filters get built/embedded too.

Do you think it would be possible to implement inclusion of ffmpeg vulkan filters in MABS ?

... in a separate build system, I have tried to build ffmpeg with shaderc enabled instead of glslang.
So far, shaderc is somehow flagged in the ffmpeg build process as shared (perhaps in shaderc.pc)
and so ffmpeg looks for a dll at runtime and aborts even though ffmpeg is built as notionally static.
If trying to use the static shaderc .a libraries instead, the ffmpeg build process aborts as unable to find shaderc.
Using glslang instead of shaderc does appear to cause static ffmpeg to not crash immediately at runtime (I hope).

Sorry, I don't know how to do a PR.

@1480c1
Copy link
Member

1480c1 commented Jul 10, 2022

@hydra3333 afaik, the vulkan filters are enabled in FFmpeg

libglslang vulkan libdavs2 libxavs2 libuavs3d libplacebo libjxl

last time I checked (around a week or two ago), the filters did work on my machine

@hydra3333
Copy link
Contributor Author

hydra3333 commented Jul 10, 2022

Oh, OK fair enough.

I had to do the --enable stuff in a separate build system including glslang to get these
ffmpeg -filters

 ... avgblur_vulkan    V->V       Apply avgblur mask to input video
 ..C blend_vulkan      VV->V      Blend two video frames in Vulkan
 ... chromaber_vulkan  V->V       Offset chroma of input video (chromatic aberration)
 ... flip_vulkan       V->V       Flip both horizontally and vertically
 ... gblur_vulkan      V->V       Gaussian Blur in Vulkan
 ... hflip_vulkan      V->V       Horizontally flip the input video in Vulkan
 ... overlay_vulkan    VV->V      Overlay a source on top of another
 ... scale_vulkan      V->V       Scale Vulkan frames
 ... transpose_vulkan  V->V       Transpose Vulkan Filter
 ... vflip_vulkan      V->V       Vertically flip the input video in Vulkan

@1480c1 1480c1 closed this as completed Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants