Page 1 of 4 123 ... LastLast
Results 1 to 10 of 36

Thread: mpd with mcp, ncmcp, ncmpc++

  1. #1
    Join Date
    Aug 2007
    Beans
    65

    mpd with mcp, ncmcp, ncmpc++

    Hi,

    In my somewhat aimless meandering to find a good media player to stick with in Linux, and after trying Audacious, Aqualung, gmusicbrowser, CMus, and a few more, I have come across a favourite of many: using mpd with which ever front end of preference.

    I'm generally interested in CLI front ends, hence mcp, ncmpc and/or ncmpc++. I installed all of these and tried configuring as per various 'how-to's available on the web, some recommending to configure the mpd.conf file in your home directory, some the /etc/mpd.conf file. However, it does not work.

    If I type ~$ mpd, I generally get told it is already running (even if I stop it using init.d). Starting mcp, ncmpc or ncmpcpp shows no signs of the music files which I had previously set the path to in the config files. In one case they did show up, but in playback I could here nothing, despite having uncommented the ALSA lines in the config file. I otherwise generally got the error that port 6600 was in use already.

    I have also attempted to uninstall mpd in order to try to start from scratch, but was unsuccessful as Synaptic just wouldn't let me.

    Does anybody know how to uninstall, and more importantly, how to set up mpd and the frontend correctly? This is for use on the local machine only, for now.

    I run Jaunty (recently did a clean install) on dual boot. Would appreciate any help anyone can give me!

    Thank you!

    bgc

  2. #2
    Join Date
    Aug 2007
    Beans
    65

    Re: mpd with mcp, ncmcp, ncmpc++

    Can I also add that I would appreciate any suggestions for a media player!

    I started off using Audacious, mainly due to its good file format support, but progressively saw that its memory footprint was becoming substantial (maybe a bug? At some point, with no loaded library or anything it reached 1GB of RAM!). I have tried Aqualung and gmusicbrowser, both of which show potential, but that don't quite fit the bill.

    MPlayer looks good as long as I learn how to use it properly to create playlists etc., although visualising playlists for instance would be useful.

    CMus is good, except that I don't want a program that loads all my media into a library using id3 tags. Because of that it still uses ~ 20MB of RAM, which for a CLI media player is quite substantial IMO.

    Basically I would like extensive format support (mainly mp3, ogg, ape, flac, cue), simple interface (CL is good, but also willing to consider GUI), easy to create and sort playlists, the ability to browse directory structure of music (my music is well organised in terms of structure, as opposed to the id3 tags, which are not), and a small memory footprint!

    My point of reference back in Windows was foobar2000, which was highly configurable, played anything you could throw at it, and was simple enough and not a massive memory hog (as Windows programs go).

    So any suggestions are very welcome! Thanks!

  3. #3
    Join Date
    Jul 2008
    Location
    Éire
    Beans
    88

    Re: mpd with mcp, ncmcp, ncmpc++

    Hey, I'm using mpd + ncmpcpp. Love it. Tried loads of music players and setled on this (for now anyway). If you wanted a graphical interface you can use sonata.

    I like the way the deamon runs in the background so that you can control it with whatever app you want. Like I have kb shortcuts set up to skip, pause etc using mpc. I browse songs and stuff using ncmpcpp.

    Could you post your /etc/mpd.conf file maybe? I'm not sure but I think mpd is supposed to be run as root and then it changes itself to a normal user. I have it set to run as a deamon in /etc/rc.conf so it's just always running in the background. I open up ncmpcpp then if I want to do something.
    To be human is to affirm one's humanity by recognizing the humanity of others and, on that basis, establish respectful human relations with them.

    Ubuntu User 24011

  4. #4
    Join Date
    Aug 2007
    Beans
    65

    Re: mpd with mcp, ncmcp, ncmpc++

    Hi! Thanks for your reply! MPD seems to be the choice of many, which is why I was interested in trying. I have to be honest with you: I have tried many configurations to try and get it to work. Not always the best strategy as things can get mixed up badly. Some prefer to move config files to the home directory and run as user, some prefer to use the config file in /etc/ keeping 'mpd' as user, so I'm not sure where I'm at right now. This is my /etc/mpd.conf file:

    (Apologies for length of output, but don't know how to do it differently!)



    # Required files and directories ##############################################
    #
    # This setting controls the top directory which MPD will search to discover the
    # available audio files and add them to the daemon's online database.
    #
    music_directory "/media/Data/music"
    #
    # This setting sets the MPD internal playlist directory. The purpose of this
    # directory is storage for playlists created by MPD. The server will use
    # playlist files not created by the server but only if they are in the MPD
    # format.
    #
    playlist_directory "/var/lib/mpd/playlists"
    #
    # This setting sets the location of the MPD database. This file is used to
    # load the database at server start up and store the database while the
    # server is not up.
    #
    db_file "/var/lib/mpd/mpd.db"
    #
    # These settings are the locations for the daemon log files for the daemon.
    # These logs are great for troubleshooting, depending on your log_level
    # settings.
    #
    log_file "/var/log/mpd/mpd.log"
    error_file "/var/log/mpd/mpd.error"
    ################################################## #############################


    # Optional files ################################################## ############
    #
    # This setting sets the location of the file which stores the process ID
    # for use of mpd --kill and some init scripts. This setting is disabled by
    # default.
    #
    #pid_file "/var/run/mpd/mpd.pid"
    #
    # This setting sets the location of the file which contains information about
    # most variables to get MPD back into the same general shape it was in before
    # it was brought down. This setting is disabled by default.
    #
    state_file "/var/lib/mpd/mpdstate"
    #
    ################################################## #############################


    # General music daemon options ################################################
    #
    # This setting specifies the user that MPD will run as, if set. MPD should
    # never run as root and you may use this setting to make MPD change its user
    # id after initialization. Do not use this setting if you start MPD as an
    # unprivileged user. This setting is disabled by default, and the server will
    # run as root.
    #
    user "mpd"
    #
    # This setting sets the address for the daemon to listen on. Careful attention
    # should be paid if this is assigned to anything other then the default, any.
    # This setting can deny access to control of the daemon.
    #
    # For network
    bind_to_address "127.0.0.1"
    #
    # And for Unix Socket
    #bind_to_address "~/.mpd/socket"
    #
    # This setting is the port that is desired for the daemon to get assigned to.
    #
    #port "6600"
    #
    # This setting controls the type of information which is logged. Available
    # setting arguments are "default", "secure" or "verbose". The "verbose" setting
    # argument is recommended for troubleshooting, though can quickly stretch
    # available resources on limited hardware storage.
    #
    #log_level "default"
    #
    # If you have a problem with your MP3s ending abruptly it is recommended that
    # you set this argument to "no" to attempt to fix the problem. If this solves
    # the problem, it is highly recommended to fix the MP3 files with vbrfix
    # (available from <http://www.willwap.co.uk/Programs/vbrfix.php>), at which
    # point gapless MP3 playback can be enabled.
    #
    gapless_mp3_playback "yes"
    #
    # This setting enables MPD to create playlists in a format usable by other
    # music players.
    #
    #save_absolute_paths_in_playlists "no"
    #
    # This setting defines a list of tag types that will be extracted during the
    # audio file discovery process. Optionally, 'comment' can be added to this
    # list.
    #
    #metadata_to_use "artist,album,title,track,name,genre,date,composer ,performer,disc"
    #
    ################################################## #############################

    # Symbolic link behavior ################################################## ####
    #
    # If this setting is set to "yes", MPD will discover audio files by following
    # symbolic links outside of the configured music_directory.
    #
    #follow_outside_symlinks "yes"
    #
    # If this setting is set to "yes, MPD will discover audio files by following
    # symbolic links inside of the configured music_directory.
    #
    #follow_inside_symlinks "yes"
    #
    ################################################## #############################

    # Zeroconf / Avahi Service Discovery ##########################################
    #
    # If this setting is set to "yes", service information will be published with
    # Zeroconf / Avahi.
    #
    #zeroconf_enabled "yes"
    #
    # The argument to this setting will be the Zeroconf / Avahi unique name for
    # this MPD server on the network.
    #
    #zeroconf_name "Music Player"
    #
    ################################################## #############################


    # Permissions ################################################## ###############
    #
    # If this setting is set, MPD will require password authorization. The password
    # can setting can be specified multiple times for different password profiles.
    #
    #password "password@read,add,control,admin"
    #
    # This setting specifies the permissions a user has who has not yet logged in.
    #
    #default_permissions "read,add,control,admin"
    #
    ################################################## #############################
    Last edited by bgc; June 8th, 2009 at 02:20 PM.

  5. #5
    Join Date
    Jul 2008
    Location
    Éire
    Beans
    88

    Re: mpd with mcp, ncmcp, ncmpc++

    Ya, that's more or less like mine, except my music directory is /home/user/music

    I'd try uncommenting the lines (just delete the #)

    pid_file "/var/run/mpd/mpd.pid"
    and
    port 6600

    maybe that's why the clients can't connect, although I'd say the mpd port would be set to 6600 by default anyway...

    then do "sudo /etc/rc.d/mpd restart" (or start if it's not already running)
    then run "mpc status" and see what output you get.

    Did you do "mpd --create-db", this adds all the sonds from your music dir (/media/Data/music) to mpd's database.
    To be human is to affirm one's humanity by recognizing the humanity of others and, on that basis, establish respectful human relations with them.

    Ubuntu User 24011

  6. #6
    Join Date
    Aug 2007
    Beans
    65

    Re: mpd with mcp, ncmcp, ncmpc++

    Hi, I followed your suggestions. Firstly I'm assuming that the way to restart mpd is with "sudo /etc/init.d/mpd restart", as your command didn't work. mpc status essentially says that it has problems connecting to "localhost" on port 6600, connection refused. I have also done the mpd --create-db (which it seemed to do at some point), although trying now says that it cannot setgid for user "mpd" at line 58...

  7. #7
    Join Date
    Jul 2008
    Location
    Éire
    Beans
    88

    Re: mpd with mcp, ncmcp, ncmpc++

    You could try "sudo -i" and then /etc/rc.d/mpd restart

    It could be that the permissions and stuff for the mpd user are not set up correctly.
    This is the guide that I used for setting up mpd originally, it's for arch linux, but should apply to ubuntu as well.
    http://wiki.archlinux.org/index.php/...p_Instructions

    You have to create those /var/ files and mpd has to be the owner of those files. The guide shows how to do it. This might have been done automatically though in ubuntu.
    To be human is to affirm one's humanity by recognizing the humanity of others and, on that basis, establish respectful human relations with them.

    Ubuntu User 24011

  8. #8
    Join Date
    Aug 2007
    Beans
    65

    Re: mpd with mcp, ncmcp, ncmpc++

    Hi, I think that website is one of the ones I tried following. I have followed all steps. Now, mpc status gives me vol, rep and ran settings, and opening ncmpc(pp) also shows the music, but no sound.

    Also, when I try to uninstall or reinstall mpd I do get an error, so I do wonder how much could be because of something I changed elsewhere, or whether a clean installation would be better!

    Thanks for your help!

  9. #9
    Join Date
    Jul 2008
    Location
    Éire
    Beans
    88

    Re: mpd with mcp, ncmcp, ncmpc++

    That's a goos sign anyway, seems to be working!

    Stupid question, but is does mpc show the volume is turned up and that it's playing?
    "mpc play" is the command to start playing, I think.


    Here is the output when I type mpc:
    Ash - Let It Flow
    [playing] #28/2733 3:29/4:43 (74%)
    volume: 23% repeat: off random: on
    To be human is to affirm one's humanity by recognizing the humanity of others and, on that basis, establish respectful human relations with them.

    Ubuntu User 24011

  10. #10
    Join Date
    Aug 2007
    Beans
    65

    Re: mpd with mcp, ncmcp, ncmpc++

    Hi, I get the same output as you (the time counter doesn't change, but repeating the command shows that the song has moved on), and volume is 100%!

    I'm also playing music with MPlayer, which has no issues, so it's not related to sound card drivers or permission to access sound or anything like that I don't think...

    This is as close as I've been to making it work!!! Aaarrgh!

Page 1 of 4 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •