Command Line Mp3 Player

Home » CentOS » Command Line Mp3 Player
CentOS 10 Comments

I have a CentOS 7 server that I want to use as an audio source for our hold music. It does not have a GUI installed, so I am looking for a program with a command line interface that will let me play a folder full of mp3 files on a continuous loop.

MOC seems to do what I want, but I can’t find a build for CentOS 7. Is there another program that I can use for this?

Thanks.

10 thoughts on - Command Line Mp3 Player

  • mplayer is pulling in 83 dependencies! I think I’ll look for something a bit more self-contained.

  • I don’t understand that reaction to packaging. mplayer uses a variety of libraries to support a large variety of media types. It doesn’t include servers or SUID binaries, so it doesn’t carry a significant security risk, and it doesn’t consume much disk space. It doesn’t make any more sense that complaining about the number of files in a package.
    (NOTE: “filesystem” contains 15000+ files! DON’T REMOVE IT!)

    If you want to support mp3 only, then try mpg123 or madplay http://www.mpg123.de/index.shtml http://www.underbit.com/products/mad/

  • mpg123 installed from the nux repo and runs, but I’m not getting any audio. It looks like I may be missing drivers or something. When I run mpg123 in verbose mode, I get this:

    Audio driver: alsa Audio device:

    Any suggestions as to where to go from here?

  • What is your audio device? Are you sure it’s supported?

    (The lshw command will tell you what hardware you have.)

  • is VLC media player available in CentOS 7?

    it will play random order and loop. reads thru sub directories.

    but, like MOC [Music On Console], there are a few deps.

    vlc was recommended by a poster to a thread i started because i was having some webcam problems.

    it cured problems and i have enjoyed using it.

    i pulled these vlc files from nux.ro

    ]$ yum provides vlc*

    vlc-core-2.0.8-2.el6.nux.x86_64 : VLC media player core Repo : installed Matched from:
    Other : vlc-core(x86-64)
    Other : vlc-nox

    vlc-2.0.8-2.el6.nux.x86_64 : The cross-platform open-source multimedia
    : framework, player and server Repo : installed Matched from:
    Other : vlc(x86-64)
    Other : vlc-xorg(x86-64)

    vlc-plugin-jack-2.0.8-2.el6.nux.x86_64 : JACK audio plugin for VLC
    Repo : installed Matched from:
    Other : vlc-plugin-jack(x86-64)

    vlc-extras-2.0.8-2.el6.nux.x86_64 : VLC media player with extras
    modules Repo : installed Matched from:
    Other : vlc-extras(x86-64)

    i do not know what they deps are, but i do not recall it being a large amount, maybe 10?

  • Supported by what? OS, or mpg123?

    I don’t have the lshw command. However, I did find this:

    /proc/asound/cards:
    0 [Intel ]: HDA-Intel – HDA Intel
    HDA Intel at 0xfc1a0000 irq 42

    /proc/asound/Intel/pcm0p/info:
    card: 0
    device: 0
    subdevice: 0
    stream: PLAYBACK
    id: ALC888 Analog name: ALC888 Analog subname: subdevice #0
    class: 0
    subclass: 0
    subdevices_count: 1
    subdevices_avail: 1

  • Bowie Bailey wrote:

    yum -y install lshw. It’s nice. Slower to start than dmidecode, but much easier to read. And you can tell it to give you just some info, such as lshw -c storage

    mark

  • That makes sense. I’m doing too many things at once right now…it didn’t even occur to me to try to install it from yum.

    Here’s what I get.

    *-multimedia
    description: Audio device
    product: 82801I (ICH9 Family) HD Audio Controller
    vendor: Intel Corporation
    physical id: 1b
    bus info: pci@0000:00:1b.0
    version: 02
    width: 64 bits
    clock: 33MHz
    capabilities: pm msi pciexpress bus_master cap_list
    configuration: driver=snd_hda_intel latency=0
    resources: irq:42 memory:fc1a0000-fc1a3fff