Control vlc via a linux fifo (pipe)

*nix specific usage questions
macey
Blank Cone
Blank Cone
Posts: 11
Joined: 11 Apr 2010 09:02

Control vlc via a linux fifo (pipe)

Postby macey » 01 Jul 2014 20:29

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.

macey
Blank Cone
Blank Cone
Posts: 11
Joined: 11 Apr 2010 09:02

Re: Control vlc via a linux fifo (pipe)

Postby macey » 02 Jul 2014 13:26

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?

macey
Blank Cone
Blank Cone
Posts: 11
Joined: 11 Apr 2010 09:02

Re: Control vlc via a linux fifo (pipe)

Postby macey » 02 Jul 2014 15:16

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.


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 16 guests