20

I am trying to crop a number of videos using the following vlc terminal command:

vlc input.mp4 --crop=480x270+200+100

However, I am getting the following error:

-bash: vlc: command not found

How can I run a vlc command in mac terminal?

1
  • Do you have vlc installed? If yes, probably the vlc binary is not in your path and you need to use the full path to vlc in your scripts.
    – cristi
    Nov 9, 2015 at 8:48

3 Answers 3

35

Use the following command to set vlc as an alias:

alias vlc='/Applications/VLC.app/Contents/MacOS/VLC'

You can then use vlc input.mp4 to play a video.

The above path is for Mac OS. If you are using another system, just change the path for VLC accordingly.

2
1

Alternatively, as recommended here on this gist, you can add the following in an executable file called vlc in your /usr/local/bin folder:

/Applications/VLC.app/Contents/MacOS/VLC -I rc "$@"

Make the file executable using chmod +x /usr/local/bin/vlc. At this this point, typing vlc in the terminal should give you VLC's command line functionality.

1
$ open -a VLC 'videopath.mp4'

will also work on the MacOS command line

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .