从 LAME 和 FLAC 获取输出以显示在 bash 对话框中
我正在对话框(ncurses)中编写 .ogg 和 .flac 到 .mp3 转换器,我想知道是否可以将 flac 和 ogg123 的输出显示在对话框内?现在我有一个很好的界面,但是当转换开始时它只是打印到终端。
这是现在的 flac2mp3 函数:
function ConvertFromFlac {
old_IFS=$IFS
IFS=$'\n'
for line in `cat ./flacsongs`
do
flac -cd "$line" | lame -h - "$line.mp3"
done
IFS=$old_IFS
}
I'm writing a .ogg and .flac to .mp3 converter in dialog (ncurses) and I wonder if it's possible to get the output from flac and ogg123 to be shown inside of dialog? Right now I have a good interface, but when the converting starts it just prints to terminal.
This is the flac2mp3 function right now:
function ConvertFromFlac {
old_IFS=$IFS
IFS=
\n'
for line in `cat ./flacsongs`
do
flac -cd "$line" | lame -h - "$line.mp3"
done
IFS=$old_IFS
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试这种方式
,稍后如果您想要从
$pipe
读取输出。完成后不要忘记rm
。Try it this way
And later if you want the output just read from
$pipe
. Don't forget torm
it when you're done.