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

Playback instantly stops #98

Open
depuits opened this issue Sep 8, 2021 · 0 comments
Open

Playback instantly stops #98

depuits opened this issue Sep 8, 2021 · 0 comments
Labels

Comments

@depuits
Copy link

depuits commented Sep 8, 2021

Bug Description

When starting a song I immediately get the stopped event and the player stops playing. This only happens on my debian install but it is working on manjaro. I'm using the same versions and script on both installs and yet it gives a different result. I've added the log of both instances what else can I try?

Log:

[Node-MPV]: Connected to socket '/tmp/node-mpv.sock'
[Node-MPV] sending stimulus
[Node-MPV] stimulus received true
[Node-MPV]: Event: status
[Node-MPV]: Property change: mute - false
[Node-MPV]: Event: status
[Node-MPV]: Property change: pause - false
[Node-MPV]: Event: status
[Node-MPV]: Property change: duration - undefined
[Node-MPV]: Event: status
[Node-MPV]: Property change: volume - 100
[Node-MPV]: Event: status
[Node-MPV]: Property change: filename - 15 Iederen Is Gek [Behalve Jij].mp3
[Node-MPV]: Event: status
[Node-MPV]: Property change: path - /music/Heideroosjes/Schizo/15 Iederen Is Gek [Behalve Jij].mp3
[Node-MPV]: Event: status
[Node-MPV]: Property change: media-title - 15 Iederen Is Gek [Behalve Jij].mp3
[Node-MPV]: Event: status
[Node-MPV]: Property change: playlist-pos - 0
[Node-MPV]: Event: status
[Node-MPV]: Property change: playlist-count - 1
[Node-MPV]: Event: status
[Node-MPV]: Property change: loop - false
[Node-MPV]: Event: status
[Node-MPV]: Property change: duration - 165.17865
[Node-MPV]: Event: status
[Node-MPV]: Property change: media-title - Iederen Is Gek [Behalve Jij]
Event: start
Event: stopped                                                <-- this event is fired immediately so no song actually plays
[Node-MPV]: Event: status
[Node-MPV]: Property change: duration - undefined
[Node-MPV]: Event: status
[Node-MPV]: Property change: filename - undefined
[Node-MPV]: Event: status
[Node-MPV]: Property change: path - undefined
[Node-MPV]: Event: status
[Node-MPV]: Property change: media-title - undefined
[Node-MPV]: Event: status
[Node-MPV]: Property change: playlist-pos - -1

How To Reproduce

'use strict';

var mpv = require('node-mpv');
var config = require('config').get('player');

var options = {
	audio_only: true,
	debug: true,
	verbose: true,
};
var playerArgs = [
	'--audio-display=no',
	'--audio-channels=stereo',
	'--audio-samplerate=48000',
	'--audio-format=s16',
	'--ao=pcm',
	'--ao-pcm-file=/tmp/web-mplayer'
];

var player = new mpv(options, playerArgs);

async function play() {
	await player.start();
	await player.load('/music/Heideroosjes/Schizo/15 Iederen Is Gek [Behalve Jij].mp3');
}

play().catch((err) => {
	console.log(err);
	process.exit();
});

Expected behavior

Log of working instance:

[Node-MPV]: Connected to socket '/tmp/node-mpv.sock'
[Node-MPV] sending stimulus
[Node-MPV] stimulus received true
[Node-MPV]: Event: status
[Node-MPV]: Property change: mute - false
[Node-MPV]: Event: status
[Node-MPV]: Property change: pause - false
[Node-MPV]: Event: status
[Node-MPV]: Property change: duration - undefined
[Node-MPV]: Event: status
[Node-MPV]: Property change: volume - 100
[Node-MPV]: Event: status
[Node-MPV]: Property change: filename - 15 Iederen Is Gek [Behalve Jij].mp3
[Node-MPV]: Event: status
[Node-MPV]: Property change: path - /music/Heideroosjes/Schizo/15 Iederen Is Gek [Behalve Jij].mp3
[Node-MPV]: Event: status
[Node-MPV]: Property change: media-title - 15 Iederen Is Gek [Behalve Jij].mp3
[Node-MPV]: Event: status
[Node-MPV]: Property change: playlist-pos - 0
[Node-MPV]: Event: status
[Node-MPV]: Property change: playlist-count - 1
[Node-MPV]: Event: status
[Node-MPV]: Property change: loop - false
[Node-MPV]: Event: status
[Node-MPV]: Property change: duration - 165.17865
[Node-MPV]: Event: status
[Node-MPV]: Property change: media-title - Iederen Is Gek [Behalve Jij]
Event: start

Actually playing music here
Software Versions
  • Node-Mpv: version 2
  • MPV: 0.33.1
  • OS: debian bullseye
Additional context

I'm using a snapcast pipe to stream the audio. Snapcast version is v0.25.0

@depuits depuits added the bug label Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant