Discussion:
[MPlayer-users] read answer from slave
Peter Irbizon
2016-06-02 18:00:23 UTC
Permalink
Hello, one more question. I am using command
echo "pausing_keep_force get_property pause" > /home/user/mplayer-control
and it outputs ANS_pause in terminal window, where mplayer was launched.

But how could I get it into my second terminal, when I initiated echo
"pausing_keep_force get_property pause" > /home/user/mplayer-control
command?

Many thanks
Peter White
2016-06-02 22:24:56 UTC
Permalink
Post by Peter Irbizon
Hello, one more question. I am using command
echo "pausing_keep_force get_property pause" > /home/user/mplayer-control
and it outputs ANS_pause in terminal window, where mplayer was launched.
But how could I get it into my second terminal, when I initiated echo
"pausing_keep_force get_property pause" > /home/user/mplayer-control
command?
I don't think it is supposed to work that way. Maybe a second FIFO can
do the trick, like:
$ mkfifo input.pipe output.pipe
$ mplayer -slave -input file=input.pipe video.mkv >output.pipe

Then in the second terminal:
$ cat output.pipe &
$ echo "pausing_keep_force get_property pause" > input.pipe
ANS_pause=yes

You might want to consider running mplayer with the -quiet option.
Peter Irbizon
2016-06-03 15:11:57 UTC
Permalink
thank you! looks great!
but I should use mkfifo input.pipe without output.pipe because mplayer
creates it on the second line. thank you for your help again!
Post by Peter White
Post by Peter Irbizon
Hello, one more question. I am using command
echo "pausing_keep_force get_property pause" > /home/user/mplayer-control
and it outputs ANS_pause in terminal window, where mplayer was launched.
But how could I get it into my second terminal, when I initiated echo
"pausing_keep_force get_property pause" > /home/user/mplayer-control
command?
I don't think it is supposed to work that way. Maybe a second FIFO can
$ mkfifo input.pipe output.pipe
$ mplayer -slave -input file=input.pipe video.mkv >output.pipe
$ cat output.pipe &
$ echo "pausing_keep_force get_property pause" > input.pipe
ANS_pause=yes
You might want to consider running mplayer with the -quiet option.
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
Peter White
2016-06-03 19:16:41 UTC
Permalink
Please don't top-post.
Post by Peter Irbizon
thank you! looks great!
but I should use mkfifo input.pipe without output.pipe because mplayer
creates it on the second line.
FWIW, mplayer does not create a FIFO on the second line. Instead a
regular file gets created by the shell redirect operator. Maybe that
serves your purpose just as well but there are technical differences,
one being that in your example output.pipe, being a regular file, would
consume space on your disk and R/W ops on that file involve disk access
as opposed to a FIFO which is always size 0 and no disk ops need to be
performed to access it.

Loading...