How do I silence vlc output from bash script completely?

被刻印的时光 ゝ 提交于 2021-01-27 12:25:24

问题


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").

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 ** ..."

i tried redirecting 'vlc ... > err.log', it dont help...

(edit[forgot to add]: the redirect '>' doesnt work, file is empty)

i searched in vlc -H but its massive and there are >20 "quiet" keyword, non of which seem like they would help

Please help me :'(


回答1:


Normal redirection via ">" will just redirect "standard output". You must use "2>" to redirect the "standard error" stream.

vlc .. > out.log 2> err.log



回答2:


A "great" guide to redirection in bash (both STDOUT and STDERR) can be found here



来源:https://stackoverflow.com/questions/6339981/how-do-i-silence-vlc-output-from-bash-script-completely

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!