j-holub / Node-MPV

A NodeJs Module for MPV Player
https://www.npmjs.com/package/node-mpv
MIT License
117 stars 73 forks source link

Help: glsl-shader option doesnt work #103

Open m0rphtail opened 2 years ago

m0rphtail commented 2 years ago

I am trying to pass the following options, the --glsl-shader option doesnt work while the other options work.

let mpv_options = [
  "--vo=gpu",
  "--profile=gpu-hq",
  "--glsl-shader=pixels.glsl",
  "--scale=ewa_lanczos",
  "--fbo-format=rgba16hf",
];

the shader isnt visible here, looks like the shader did not load image

But the shader works successfully when passed to mpv with mpv --glsl-shader=pixels.glsl video.mp4

So my question is has the glsl-shader been implemented in node-mpv? and if so, how do i use it?

j-holub commented 2 years ago

Hey there,

Node-MPV itself doesn't implement anything but just passes the flags to MPV. Unfortunately I'm not familiar with the --glsl-shader flag at all, so I don't really have a guess what could cause the issue.

Node-MPV starts the MPV player in socket and idle mode and passes commands through a IPC (Inter Process Communication) socket.

If I see it correctly, pixels.glsl is a file, correct? Have you tried passing the absolute file path? I think that's what might be causing the issue, relative path issues.

Cheers