Go Back   TechArena Community > Software > Windows Software
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



How to control VLC through terminal while playing media?

Windows Software


Reply
 
Thread Tools Search this Thread
  #1  
Old 09-07-2011
Member
 
Join Date: Jun 2005
Posts: 65
How to control VLC through terminal while playing media?
  

Well I am big fond of Linux based operating system. Why because it seems to be secure than that of the windows based operating system. I have installed VLC on the computer of mine. well I wanted to know how can I control the VLC media player from the different console. Let me know how can I get the above mentioned requirement in the situation of mine. Any help to fix the matter would be highly appreciated. Thanks a lot in advance.

Reply With Quote
  #2  
Old 09-07-2011
Member
 
Join Date: Nov 2008
Posts: 1,054
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 &
And copy and paste the below mentioned command on the other terminal.
Code:
echo -e "/home/charles/Desktop/Fiat.wmv" | nc localhost 4212
Reply With Quote
  #3  
Old 09-07-2011
Member
 
Join Date: Nov 2008
Posts: 996
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
Reply With Quote
  #4  
Old 09-07-2011
Member
 
Join Date: May 2008
Posts: 979
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.
Reply With Quote
  #5  
Old 09-07-2011
Member
 
Join Date: Nov 2008
Posts: 1,192
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
Well you should copy and paste the above mentioned command and simply press enter from the keyboard.
Reply With Quote
  #6  
Old 10-07-2011
Member
 
Join Date: Jun 2009
Posts: 1,518
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
Reply With Quote
Reply

  TechArena Community > Software > Windows Software
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


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


All times are GMT +5.5. The time now is 04:11 AM.