mocp --version This is : Music On Console Version : 2.6-alpha3 Built : Nov 27 2016 10:55:04 Compiled with : OSS ALSA JACK DEBUG Network streams resample Running on : Linux 4.9.0-13-amd64 x86_64 Author : Damian Pietras Homepage : http://moc.daper.net/ Copyright : (C) 2003-2016 Damian Pietras and others License : GNU General Public License, version 2 or later
mocp needs some adaption to get used to 🙂
used to use vlc player
but have to say: the shuffle function of mocp is way better 🙂
also thanks to ffmpeg the amount of supported fileformats is endless
GOOD JOB 🙂
what does moc stand for? “Music On Console”
mocplayer comes with two components:
- the server process that can be run in the background
- the gui client that connects to the server and commands it
setup mocp:
hostnamectl; # tested on Operating System: Debian GNU/Linux 10 (buster) Kernel: Linux 4.19.0-10-686-pae Architecture: x86 # install mocp apt update apt install moc moc-ffmpeg-plugin libasound2-dev
the one-liner that does it all:
mocp -S && mocp -o r,s,n && mocp -l /home/user/Music/*; mocp
start it like:
/scripts/music.sh
shortcuts & hotkeys
Usage
Run mocp to start the server and interface. Some useful default shortcuts (press h
for more):
Start playing at this file or go to this directory | Enter |
Pause | Space or p |
Play next file | n |
Play previous file | b |
Silent seek forward by 5s | ] |
Silent seek backward by 5s | [ |
Switch between playlist and file list | Tab |
Add a file/directory to the playlist | a |
Add a directory recursively to the playlist | Shift+a |
Delete an item from the playlist | d |
Clear the playlist | Shift+c |
Increase volume by 1% | > |
Decrease volume by 1% | < |
Increase volume by 5% | . (period) |
Decrease volume by 5% | , (comma) |
Set volume to 10% | Alt+1 |
Set volume to 90% | Alt+9 |
Detach MOC from the server | q |
Quit | Shift+q |
Ctrl+z
can be used instead.what is great about a music player that uses only the bash-terminal-command-line gui
it allows, to ssh into any GNU Linux powered computer with the song collection and ssh-remote-control it’s playlist (pause, play, next song)
even over the internet!
(ssh-server could be the user’s pc, ssh-client could be the user’s android phone)
this way it should also be possible to easily create a Android-App for remote controlling mocp.
#NEAT!
possible enhancements:
also: if the user’s Music directory never changes, it might probably be better to remove the -c (clear playlist, playlist seems to be automatically saved on exit?
now
the user can add the script like this: /scripts/music.sh “/path/to/music”
to autostart
possible problems and pitfals:
it is possible, that the user comes across this error:
mocp: alsa.c:319: alsa_read_mixer_raw: Assertion `RANGE(0, vol, 100)' failed.
which simply means: turn down the volume below a value of 100 X-D
# without libasound2-dev error could be: FATAL_ERROR: No valid sound driver! # solution: apt install libasound2-dev
controls:
within the mocp gui a massive amount of hotkeys/shortcuts exist:
q Detach MOC from the server
ENTER Start playing at this file or go to this directory
DOWN Move down in the menu
UP Move up in the menu
PAGE_DOWN Move one page down
PAGE_UP Move one page up
HOME Move to the first item in the menu
END Move to the last item in the menu
Q Quit
s Stop
n Play next file
b Play previous file
p SPACE Pause
f Toggle ReadTags option
S Toggle Shuffle
R Toggle Repeat
X Toggle AutoNext
TAB Switch between playlist and file list
l Switch between layouts
^p Switch on/off play time percentage
a Add a file/directory to the playlist
C Clear the playlist
A Add a directory recursively to the playlist
Y Remove playlist entries for non-existent files
< Decrease volume by 1% > Increase volume by 1%
, Decrease volume by 5%
. Increase volume by 5%
RIGHT Seek forward by n-s
LEFT Seek backward by n-s
h ? Show the help screen
M Hide error/informative message
^r ^l Refresh the screen
r Reread directory content
H Toggle ShowHiddenFiles option
m Go to the music directory (requires config option)
d Delete an item from the playlist
g / Search the menu
V Save the playlist
^t Toggle ShowTime option
^f Toggle ShowFormat option
o Play from the URL
G Go to the currently playing file's directory
i Go to a directory
U Go to '..'
^x ESCAPE Exit from an entry
] Silent seek forward by 5s
[ Silent seek backward by 5s
M-1 Set volume to 10%
M-2 Set volume to 20%
M-3 Set volume to 30%
M-4 Set volume to 40%
M-5 Set volume to 50%
M-6 Set volume to 60%
M-7 Set volume to 70%
M-8 Set volume to 80%
M-9 Set volume to 90%
' Mark the start of a block
" Mark the end of a block
! Go to a fast dir 1
@ Go to a fast dir 2
# Go to a fast dir 3
$ Go to a fast dir 4
% Go to a fast dir 5
^ Go to a fast dir 6
& Go to a fast dir 7
* Go to a fast dir 8
( Go to a fast dir 9
) Go to a fast dir 10
UP Go to the previous entry in the history (entry)
DOWN Go to the next entry in the history (entry)
^u Delete to start of line (entry)
^k Delete to end of line (entry)
x Toggles the mixer channel
w Toggles the software-mixer
E Toggles the equalizer
e Reload EQ-presets
K Select previous equalizer-preset
k Select next equalizer-preset
J Toggle mono-mixing
u Move playlist item up
j Move playlist item down
^u Add a URL to the playlist using entry
T Switch to the theme selection menu
F1 Execute ExecCommand1
F2 Execute ExecCommand2
F3 Execute ExecCommand3
F4 Execute ExecCommand4
F5 Execute ExecCommand5
F6 Execute ExecCommand6
F7 Execute ExecCommand7
F8 Execute ExecCommand8
F9 Execute ExecCommand9
F10 Execute ExecCommand10
L Display lyrics of the current song (if available)
P Toggle displaying full paths in the playlist
z Add (or remove) a file to (from) queue
Z Clear the queue
config:
there is an extensive config file in place:
# download config file template wget https://raw.githubusercontent.com/lipnitsk/mocp/master/config.example.in; # move it into place mv -iv config.example.in ~/.moc/config # check it out vim ~/.moc/config
manpage:
links:
src:
https://github.com/lipnitsk/mocp
mocp forum:
https://moc.daper.net/node/3067
liked this article?
- only together we can create a truly free world
- plz support dwaves to keep it up & running!
- (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
- really really hate advertisement
- contribute: whenever a solution was found, blog about it for others to find!
- talk about, recommend & link to this blog and articles
- thanks to all who contribute!