mpv icon indicating copy to clipboard operation
mpv copied to clipboard

Question: Is there a way to retrieve audio samples in GPU Shader code?

Open proconsule opened this issue 4 years ago • 4 comments

Is there any chance to have audio sample float (in some way) accessible in the user shader code, this will help making cool shaders for audio playback (like old winamp vis plugins).

I know this is hard (buffer, sync and other problems) but will open great scenarios on making players based on mpv

proconsule avatar Nov 17 '21 08:11 proconsule

Shaders run on a GPU, are you perhaps referring to audio filters? You can use that with --af=.

Traneptora avatar Nov 19 '21 16:11 Traneptora

no, he is referring to wanting to access audio sample data in a gpu shader to do visualisations

CounterPillow avatar Nov 19 '21 16:11 CounterPillow

no, he is referring to wanting to access audio sample data in a gpu shader to do visualisations

Yes is what i mean, i know it is hard but can open cool scenarios on audio player using libmpv

proconsule avatar Nov 19 '21 16:11 proconsule

I think it would be not so trivial to support. Patches welcome if someone wants to deep dive into it.

kasper93 avatar Apr 16 '24 17:04 kasper93