Linux command
mocp 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Launch
mocp
Example
mocp [path/to/directory]
Start server
mocp -S
Add song
mocp -q [path/to/audio_file]
Add songs recursively
mocp -a [path/to/directory]
Clear
mocp -c
Play or stop
mocp --play
Example
mocp --stop
Stop the server
mocp -x
说明
MOC (Music On Console) is a console-based audio player with an ncurses interface. It supports OGG, WAV, MP3, FLAC, and other audio formats through various decoder plugins. The player uses a client-server architecture: the server handles playback while clients provide the interface. This allows music to continue playing after closing the interface. Navigate directories using arrow keys and press Enter to play files.
参数
- -S, --server
- Run only the server in background and exit
- -F, --foreground
- Run server in foreground with logging to stdout
- -x, --exit
- Shut down the MOC server
- -p, --play
- Start playing from first playlist item
- -s, --stop
- Stop playback
- -P, --pause
- Pause playback
- -U, --unpause
- Resume from pause
- -G, --toggle-pause
- Toggle between play and pause states
- -f, --next
- Play next song
- -r, --previous
- Play previous song
- -q, --enqueue
- Add files to queue without starting interface
- -a, --append
- Append files, directories, or playlists
- -c, --clear
- Clear the playlist
- -k _N_, --seek _N_
- Seek forward/backward by N seconds (use +/- prefix)
- -v _N_, --volume _N_
- Set or adjust mixer volume
- -i, --info
- Display currently playing file information
- -T _theme_, --theme
- Load specified theme file
- -C _file_, --config
- Use alternate configuration file
- -m, --music-dir
- Start in configured MusicDir
FAQ
What is the mocp command used for?
MOC (Music On Console) is a console-based audio player with an ncurses interface. It supports OGG, WAV, MP3, FLAC, and other audio formats through various decoder plugins. The player uses a client-server architecture: the server handles playback while clients provide the interface. This allows music to continue playing after closing the interface. Navigate directories using arrow keys and press Enter to play files.
How do I run a basic mocp example?
Run `mocp` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -S, --server do in mocp?
Run only the server in background and exit