Closed AxelTerizaki closed 6 years ago
Sounds good to me. Adding an argument like an array for additional arguments is the most flexible I think (and easy to implement).
Would be nice of course to have something like load(file, mode, gain)
but then a few month later somebody else will need something else.
But I'm glad I added the command()
and freeCommand()
methods way back, gives people just way more flexibility :D
Indeed, it helped a lot to work around this :)
I did not publish it to npm yet. Tell me if you need that right away and I will
I'm in no hurry since I have the workaround I listed when I opened the issue. I'll keep an eyes on when it's published on npm and modify my code accordingly then :)
copy/paste from #30 :
To avoid big volume differences when going from one song to another in the playlist, we calculated audio gain through a ffmpeg script beforehand.
We need to pass the gain modifier to mpv when loading a video so it adjusts the volume accordingly.
The
load()
command in node-mpv doesn't offer any parameters other than append/replace. However, if you usecommand()
this way...We pass the loadfile mpv command manually to mpv, with the video path as first argument,
replace
, and then another option which isreplaygan-fallback=
, with an adjustment variable in decibels, like -5.04 for example.I think the node-mpv
load()
function should allow to pass on additional parameters (other than append/replace).