How to prevent console from being displayed when using VLC's dummy interface
Asked Answered
J

3

5

I'm trying to launch VLC in "dummy" mode from a Node.js server script, however using child_process.spawn('vlc',['-I dummy']) produces a new console window for VLC's output when using Windows. Is there a way to prevent this happening and force all stdout though the stdout ReadableStream so no "popup windows" occur?

EDIT: This problem had nothing to do with node.js, it was simply the way I was calling it and VLC's behaviour. The solution is below.

Thanks.

Jumbuck answered 14/5, 2011 at 9:49 Comment(2)
I've noticed that -I telnet doesn't pop up the console, so I'll use this instead.Jumbuck
However, the telnet interface is useless - I'd prefer to use the RC interface, but that has the same problem as dummy with a new window - and worse the stdin stdout doesn't seem to workJumbuck
J
5

I found a solution for the specific problem:

VLC has a command line option to surpress this window --*-quiet where * is the interface.

e.g. For the dummy interface, use

child_process.spawn('vlc',['-I dummy','--dummy-quiet'])

For the rc interface, use

child_process.spawn('vlc',['-I rc','--rc-quiet'])
Jumbuck answered 13/6, 2011 at 14:12 Comment(0)
G
1

I would like to complement Adam M-W answer.

VLC has a command line option to suppress this window --*-quiet where * is the interface.

e.g. For the dummy interface, use

child_process.spawn('vlc',['-I dummy','--dummy-quiet']) For the rc interface, use

child_process.spawn('vlc',['-I rc','--rc-quiet'])

answered Jun 13 '11 at 14:12 Adam M-W

at least on my system, VLC now sends its messages to stdError, so this is the channel which needs to be monitored.

My interface is with Qt , QtProcess and these are the options that worked for me.

Using MergedChannels and reading stdOut.

m_proc->setProcessChannelMode(QProcess::MergedChannels);
connect (m_proc,SIGNAL(readyReadStandardOutput()),
           this, SLOT(readyRead()));

void ReDirVLC::readyRead(){
    if (!m_proc) return;
    qDebug()<<m_proc->readAllStandardOutput() << endl;
}

Using SeparateChannels and reading stdError

m_proc->setProcessChannelMode(QProcess::SeparateChannels);
connect (m_proc,SIGNAL(readyReadStandardError()),
           this, SLOT(readyRead()));

void ReDirVLC::readyRead(){
    if (!m_proc) return;
    qDebug()<<m_proc->readAllStandardError() << endl;
}
Golter answered 7/7, 2013 at 10:40 Comment(0)
E
0

Maybe you could run the process with child_process.spawn('start', ['/b', 'vlc', '-I dummy']) instead?

Escarole answered 14/5, 2011 at 10:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.