|
| ||||||||||
| Tags: linux, media player, telnet, terminal, vlc |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| How to control VLC through terminal while playing media?
|
|
#2
| |||
| |||
| Re: How to control VLC through terminal while playing media?
Looking at the situation I am suggesting that you should launch the VLC GUI on the computer of yours and then you should simply try to listen the specific port by using the following command. Code: vlc --rc-host=localhost:4212 & Code: echo -e "/home/charles/Desktop/Fiat.wmv" | nc localhost 4212 |
|
#3
| |||
| |||
| Re: How to control VLC through terminal while playing media?
In order to get the requirement of yours I am suggesting following command which you should run on the terminal to control the VLC. Code: #!/usr/bin/python
import sys
import socket
#change to your vlc socket (in vlc configuration: UNIX socket command input)
SOCK = "/tmp/vlc.sock"
try:
command = sys.argv[1]
except:
print "try: %s help\n" % sys.argv[0]
sys.exit()
s = socket.socket(socket.AF_UNIX)
s.settimeout(0.5)
s.connect((SOCK))
s.send("%s\r" % command)
out = ""
while 1:
try:
line = s.recv(1024)
out += line
except socket.timeout:
break
if line == "":
break
s.close()
print out |
|
#4
| ||||
| ||||
| Re: How to control VLC through terminal while playing media?
I think you are doing something wrong with the thing which you have mentioned over here. I let you know that you will be able to get the requirement of yours if you can connect the VLC which you have installed on the computer by using the telnet localhost 4212. I am not sure about the thing whether it is going to work or not. However I recommend that you should try the same and let me know whether it is working or not. |
|
#5
| |||
| |||
| Re: How to control VLC through terminal while playing media?
Let me know any of the above mentioned commands are working for you or not. If there is no change in the situation than I recommend that you should simply run the following command on the terminal. Code: vlc --intf rc |
|
#6
| |||
| |||
| Re: How to control VLC through terminal while playing media?
You should simply launch the VLC media player on the computer and simply play any of the video and then you should launch the terminal on the computer and then run the below mentioned command on the terminal. Code: sh-3.2$ /bin/echo -n "pause" | nc -U /Users/vlc.sock |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "How to control VLC through terminal while playing media?" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What is Media Access Control and Logical Link Control | Pakhi | Networking & Security | 4 | 10-01-2011 10:53 AM |
| What are the Functions Control Terminal Screen in PHP? | Zavier | Software Development | 5 | 04-03-2010 02:16 AM |
| Want playback control on the now playing mode in Windows Media Player 12 | ramsun | Windows Software | 4 | 29-01-2010 09:11 PM |
| Windows Media Player freezes whie playing shared media files | maketu | Media Player | 6 | 07-01-2010 10:50 AM |
| the terminal services activex control (mstscax.dll) does not match the version of the client shell | JinaJ | Small Business Server | 2 | 29-03-2007 06:29 PM |