Page 1 of 1

Control vlc via a linux fifo (pipe)

Posted: 01 Jul 2014 20:29
by macey
Hello, I am looking for a real vlc 'exper't here..
I can easily control mplayer like this:-

Code: Select all

mplayer -slave -input file=/my_fifo myfile

and 'pipe' commands to the fifo with shell scripts like this:-

Code: Select all

echo 'pause' >my_fifo
This works fine with mplayer,
How do I do this with vlc please?
I have seen posts which say use --rc-fake-tty, I have tried various set-ups but can't get it to work..
Help PLEASE, would much prefer to use vlc over mplayer...
Nothing fancy, just want to use shell scripts to control vlc.

Re: Control vlc via a linux fifo (pipe)

Posted: 02 Jul 2014 13:26
by macey
ok, this is what I did:-

cat vlc_fifo | cvlc --rc-fake-tty mymediafile

vlc plays mediafile ok, then did this:-

echo 'stop' > vlc_fifo
or echo stop > vlc_fifo

no effect, also linux prompt does not return, looks like system is waiting for i/o to complete.
I know that something like this should work.... Just need the detail sorted....
Someone out there must know.. Please?

Re: Control vlc via a linux fifo (pipe)

Posted: 02 Jul 2014 15:16
by macey
ok, it's easy:-

vlc -I rc --rc-host localhost:1250 {file/playlist} (-d optional to daemonise)

echo pause | nc localhost 1250


open up a port (1250 in this case) between your host & clients & have full remote
control over vlc.

At last, been messing with this for months off and on...
Very happy, managed to work this out for myself....admittedly, doesn't use fifo (pipe) but does the job even better.