简体   繁体   English

MediaInfo output 到标准输出

[英]MediaInfo output to stdout

I have used MediaInfo before to extract information in a shell script in CygWin.我之前使用 MediaInfo 在 CygWin 的 shell 脚本中提取信息。

#;/bin/bash IFS=$'\n'. #;/bin/bash IFS=$'\n'. for file in $(ls *.mp3 / .mp3 );对于 $(ls *.mp3 / .mp3 ) 中的文件; do count= "C:/Program Files/MediaInfo/MediaInfo.exe" $file | grep "Bit rate mode" | grep "Variable" | wc -l做计数= "C:/Program Files/MediaInfo/MediaInfo.exe" $file | grep "Bit rate mode" | grep "Variable" | wc -l "C:/Program Files/MediaInfo/MediaInfo.exe" $file | grep "Bit rate mode" | grep "Variable" | wc -l "C:/Program Files/MediaInfo/MediaInfo.exe" $file | grep "Bit rate mode" | grep "Variable" | wc -l ; "C:/Program Files/MediaInfo/MediaInfo.exe" $file | grep "Bit rate mode" | grep "Variable" | wc -l ; if [ $count -gt 0 ];如果 [ $count -gt 0 ]; then echo $file VBR;然后回显 $file VBR; fi done完成

For some reason, it no longer outputs to stdout.由于某种原因,它不再输出到标准输出。 It displays the data in a window.它在 window 中显示数据。 Is there some command line flag tp force stdout?是否有一些命令行标志 tp force stdout?

You use the Graphical Interface (GUI) version of MediaInfo, you need to use the Command Line Interface (CLI) version of MediaInfo.您使用 MediaInfo 的图形界面 (GUI) 版本,您需要使用 MediaInfo 的命令行界面 (CLI) 版本。

See the different download options in the MediaInfo Windows download page .请参阅MediaInfo Windows 下载页面中的不同下载选项。

That solved my problem.这解决了我的问题。 Now I just to figure out why my bash script that used to work to run mediainfo on all my mp3s no longer works.现在我只是想弄清楚为什么我的 bash 脚本曾经在我的所有 mp3 上运行 mediainfo 不再有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM