LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-01-2014, 02:03 PM   #1
macey
LQ Newbie
 
Registered: Jul 2014
Posts: 8

Rep: Reputation: Disabled
Control vlc via linux fifo (pipe)


Hello, I am looking for a real vlc 'expert' here..
I can easily control mplayer like this:-

Code:
mplayer -slave -input file=/my_fifo  myfile

and 'pipe' commands to the fifo with shell scripts like this:-
Code:
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...
 
Old 07-01-2014, 02:38 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Does vlc just read from stdin normally? If so you can probably use "<" to redirect stdin from a file, like a fifo

vlc < myfifo

Maybe the combination of --rc-fake-tty and redirection from a fifo is what you want?

This is the applicable section of the help menu:
Code:
Remote control interface (oldrc)
      --rc-show-pos, --no-rc-show-pos
                                 Show stream position (default disabled)
          Show the current position in seconds within the stream from time to time. (default disabled)
      --rc-fake-tty, --no-rc-fake-tty
                                 Fake TTY (default disabled)
          Force the rc module to use stdin as if it was a TTY. (default disabled)
      --rc-unix <string>         UNIX socket command input
          Accept commands over a Unix socket rather than stdin.
      --rc-host <string>         TCP command input
          Accept commands over a socket rather than stdin. You can set the address and port the interface will bind to.

Last edited by suicidaleggroll; 07-01-2014 at 02:41 PM.
 
Old 07-01-2014, 02:47 PM   #3
macey
LQ Newbie
 
Registered: Jul 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
@suicidaleggroll thanks, I'll give it a try...

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..

Last edited by macey; 07-02-2014 at 06:25 AM.
 
Old 07-02-2014, 08:16 AM   #4
macey
LQ Newbie
 
Registered: Jul 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
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.

Last edited by macey; 07-02-2014 at 08:20 AM.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need a big buffer to introduce delay in a pipe. (FIFO) bwashed Programming 9 08-15-2014 09:51 PM
pipe, FIFO qrange Linux - Software 4 07-16-2012 10:08 AM
What is meaning that a file is a named pipe (FIFO)? mei0fei Linux - Newbie 2 07-12-2011 06:48 AM
[SOLVED] How to handle a broken pipe exception (SIGPIPE) in FIFO pipe? zyroot998 Programming 5 03-03-2011 08:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration