我需要这样的东西:
当我将FIFO的命令重定向到mplayer echo "get_property volume" > /tmp/fifo时,我希望在output.txt中输出这个命令,例如ANS_volume=100。
我试过这样的方法
mplayer -slave -quiet -idle -input file=/tmp/fifo file.mp3 > /tmp/output.txt,但这不起作用-文件是空的。
我看到一些人这样做,但在我的情况下,这是行不通的。
有人知道吗?
发布于 2017-01-09 21:20:57
问:你需要把你的命令用双引号而不是单引号吗?从mplayer的手册页:
file=<filename>
Read commands from the given file. Mostly useful with a
FIFO.
NOTE: When the given file is a FIFO MPlayer opens both
ends so you can do several 'echo "seek 10" > mp_pipe'
and the pipe will stay valid.https://unix.stackexchange.com/questions/336091
复制相似问题