如何完全静音bash脚本的vlc输出? [英] How do I silence vlc output from bash script completely?
问题描述
我有一个为自己编写的脚本,它在结尾处使用vlc,我需要它停止输出所需的任何内容,但保留我自己的输出(因此请不要清除").
I have a script I wrote for myself and it uses vlc somewhere towards to end and I need it to stop outputting anything it wants but keep my own outputs (so no "clear").
我使用了参数:-q"和"--no-sout-x264-quiet",但无济于事,它仍然输出难看的msg,即:警告:调用rand()"和已阻止":..."和"Gtk警告** ..."
i have used the parameters: "-q" and "--no-sout-x264-quiet" but to no avail, it still outputs ugly msgs, ie: "Warning: call to rand()" and "Blocked: ..." and "Gtk-WARNING ** ..."
我尝试重定向'vlc ...> err.log',但无济于事...
i tried redirecting 'vlc ... > err.log', it dont help...
(编辑[忘记添加]:重定向'>'不起作用,文件为空)
(edit[forgot to add]: the redirect '>' doesnt work, file is empty)
我在vlc -H中进行搜索,但是它很大,并且有20个以上的"quiet"关键字,似乎没有一个对他们有帮助的
i searched in vlc -H but its massive and there are >20 "quiet" keyword, non of which seem like they would help
请帮助我:'(
推荐答案
通过>"进行的常规重定向只会重定向标准输出".您必须使用"2>"重定向标准错误"流.
Normal redirection via ">" will just redirect "standard output". You must use "2>" to redirect the "standard error" stream.
vlc .. > out.log 2> err.log
这篇关于如何完全静音bash脚本的vlc输出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!