Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How can I use the CLI version of the VLC on OSX?

After installing VLC on OSX, it works fine through the normal GUI process, spotlight, etc. Also, I know it's possible to do

open bla.avi -a vlc

However, when I issue vlc command in the shell, it doesn't work. which vlc in shell doesn't return anything either.

CLI version of VLC is very handy for transcoding, streaming, etc. So it would be nice to have it working.

share|improve this question
1  
What is your question here? Are you just looking for the command? What have you tried? –  Baarn Dec 19 '12 at 16:21
    
Under linux when I issue vlc in terminal it tells me to use cvlc I guess it would be the same under OSX. –  Baarn Dec 19 '12 at 16:22
    
So I'm assuming that you downloaded VLC... it should ship the needed command line tools with the program... it can do transcoding, streaming, "etc", but you need to provide a specific use case in order for us to provide any detailed information. –  allquixotic Dec 19 '12 at 16:22
    
please don't write it doesn't work because I am pretty sure that it works, just not in the way you expect it to. So please tell what you want and what you get instead. –  Baarn Dec 19 '12 at 16:31
3  
@allquixotic Unfortunately, on OS X, VLC doesn't install the command line version. –  slhck Dec 19 '12 at 17:34

3 Answers 3

up vote 3 down vote accepted

The command open bla.avi -a vlc works because OS X is using its Launch Services database to open the application VLC. This doesn't have anything to do with a command line binary of the same name, which isn't installed by default.

The binary you search for is in the VLC.app package, so you can type that into a terminal:

/Applications/VLC.app/Contents/MacOS/VLC -I rc

This will open the interactive command line VLC. Or, execute the following in order to have the above line registered as an alias to vlc:

echo "alias vlc='/Applications/VLC.app/Contents/MacOS/VLC -I rc'" >> ~/.bash_profile

Once you've added this, you need to restart your Terminal. Now type vlc and you'll get to the command line.

If you don't like the interactive interface or would like to use VLC with other options, you need to edit your ~/.bash_profile accordingly, e.g. through open -e ~/.bash_profile.

share|improve this answer

OS X applications don't usually install any program executables outside their application bundle. As you don't usually interact with them from the command line, they're not put into any folder on your PATH.


If you installed VLC to /Applications, the actual executable is /Applications/VLC.app/Contents/MacOS/VLC.

/Applications/VLC.app/Contents/MacOS/VLC -hwill show some help, and /Applications/VLC.app/Contents/MacOS/VLC --intf ncurses will launch the ncurses UI.

share|improve this answer

To access vlc from the command line, you can create a local symbolic link as below:

mkdir ~/bin
ln -s /Applications/VLC.app/Contents/MacOS/VLC ~/bin/vlc

Make sure that your ~/bin is in your environmental PATH variable, in other words that your ~/.profile file contains something like:

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

This is default behaviour on Linux.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.