to call MPlayer through scripting

Joined
Aug 3, 2012
Messages
5
Reaction score
0
Points
1
Dear All,

I had installed Player successfully on MAC BOOK Pro in App folder. Now I want to call it through Shell scripting and want to use step 2 of the instructions written in the web page whose adress is as follows : MPlayer in a Mac Terminal – vemod.net.

can you please elaborate how to use PATH in my shell scripting.


Pankaj
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Create a file (if it doesn't exist) in your home directory called ".bash_profile" (without the quotation marks of course). Add the following to it:
Code:
PATH="/Applications/MPlayer OSX.app/Contents/Resources/External_Binaries/mplayer.app/Contents/MacOS/mplayer:${PATH}"
export PATH
 
OP
P
Joined
Aug 3, 2012
Messages
5
Reaction score
0
Points
1
Create a file (if it doesn't exist) in your home directory called ".bash_profile" (without the quotation marks of course). Add the following to it:
Code:
PATH="/Applications/MPlayer OSX.app/Contents/Resources/External_Binaries/mplayer.app/Contents/MacOS/mplayer:${PATH}"
export PATH

Dear Vansmith,

Please guide me where to locate the home directory. Secondly, the file which you told to make ".bash_profile" what should be the extension of this file like .txt etc..

Finally after making this file and writing the code in this file. will i be able to call the Mplayer with passing the arguments of the location as parameters from the shell script.


thanks

Pankaj
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
The home directory is your user directory - /Users/<whatever your username is>.

The .bash_profile doesn't have an extension. Simply name it .bash_profile and place it in your home/user directory. Once you've completed this, you should be able to call mplayer from the command line without having to use the full path.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top