j-holub / Node-MPV

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

Can't connect to socket. #54

Closed dzinks2009 closed 5 years ago

dzinks2009 commented 5 years ago
Lost connection to socket. Atemping to reconnect
{ Error: connect ENOENT /tmp/node-mpv.sock
    at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1082:14)
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'connect',
  address: '/tmp/node-mpv.sock' }
Lost connection to socket. Atemping to reconnect
{ Error: connect ENOENT /tmp/node-mpv.sock
    at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1082:14)
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'connect',
  address: '/tmp/node-mpv.sock' }
Lost connection to socket. Atemping to reconnect
root@vps7170:/home/notifyBot# mpv --version
mpv 0.14.0 (C) 2000-2015 mpv/MPlayer/mplayer2 projects
 built on UNKNOWN
ffmpeg library versions:
   libavutil       54.31.100
   libavcodec      56.60.100
   libavformat     56.40.101
   libswscale      3.1.101
   libavfilter     5.40.101
   libswresample   1.2.101
ffmpeg version: 2.8.15-0ubuntu0.16.04.1

I only have this in my code:

const mpvAPI = require('node-mpv');
const mpv = new mpvAPI({"debug": true});
AxelTerizaki commented 5 years ago

Your mpv is too old. I'd suggest you checkout the Known Issues section of the readme, as there are differences between mpv <= 0.17 and > 0.17. The module should normally automatically find out whych commands to use to connect, but maybe specifying it by hand might fix your issue.

I'd still suggest installing a newer mpv to avoid problems.

dzinks2009 commented 5 years ago

How would I be able to update node-mpv? Updating with npm update node-mpv@2.0.0 doesn't work.

AxelTerizaki commented 5 years ago

You need to update mpv, not node-mpv.

http://mpv.io

j-holub commented 5 years ago

Sorry for the late response, as @AxelTerizaki already pointed out your MPV Version is pretty old. If you want to or have to use that outdated version of MPV you can pass "ipcCommand": "--input-unix-socket" when you create the Node-MPV instance.

But I highly advise you to update MPV instead.