3

I need something like this:
When I'll redirect command by FIFO to mplayer echo "get_property volume" > /tmp/fifo I want to have this command output in output.txt, e.g ANS_volume=100.

I have tried something like this
mplayer -slave -quiet -idle -input file=/tmp/fifo file.mp3 > /tmp/output.txt But this doesn't work - file is empty.
I saw a few people did this in this way but in my case this isn't working.

Anyone knows?

  • Why don't use echo "get_property volume" | tee -a output.txt > /tmp/fifo – Ipor Sircer Jan 9 '17 at 22:25
  • Because then I get only get_property volume in file – trapczyk Jan 9 '17 at 22:40
-1

Question: do you need to put your command in double quotes not single? From the man page of 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.
  • Yeah, I'm using double quotes. I did a mistake in a post. Sorry. – trapczyk Jan 9 '17 at 21:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.