使用VLC的虚拟界面时如何防止显示控制台
我正在尝试从 Node.js 服务器脚本以“虚拟”模式启动 VLC,但是使用 child_process.spawn('vlc',['-I dummy'])
会生成一个新的控制台窗口使用 Windows 时 VLC 的输出。有没有办法防止这种情况发生并强制所有标准输出通过标准输出 ReadableStream,这样就不会出现“弹出窗口”?
编辑:这个问题与node.js无关,这只是我调用它的方式和VLC的行为。解决方案如下。
谢谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我找到了针对特定问题的解决方案:
VLC 有一个命令行选项来抑制此窗口 --*-quiet 其中 * 是界面。
例如 对于虚拟接口,使用
对于 rc 接口,使用
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
For the rc interface, use
我想补充 Adam MW 的答案。
至少在我的系统上, VLC 现在将其消息发送到 stdError,因此这是需要监视的通道。
我的界面是 Qt 、 QtProcess ,这些是对我有用的选项。
使用MergedChannels并读取stdOut。
使用SeparateChannels并读取stdError
I would like to complement Adam M-W answer.
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.
Using SeparateChannels and reading stdError
也许您可以使用
child_process.spawn('start', ['/b', 'vlc', '-I dummy'])
来运行该进程?Maybe you could run the process with
child_process.spawn('start', ['/b', 'vlc', '-I dummy'])
instead?