You are not logged in.

#1 2015-11-23 20:31:00

kowa
Member
Registered: 2015-11-23
Posts: 24

[mpd] Cannot find any song

Hello,

I want to give mpd and ncmpcpp a try so I've installed them  and mpc.
I have configured my .mpd/mpd.conf to play music in ~/Music which contain some directories with flac.
I have set the default port and check in the ncmpcpp config file if it's the same and it is.
I run

mpd

and then

npmcpp

, then I update the database with

mpc update

but I still have no music in ncmpcpp.

What have I missed ?

Offline

#2 2015-11-23 20:40:22

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [mpd] Cannot find any song

Post your configuration files and we may have a chance at helping. Without them we'll all just be guessing.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2015-11-23 20:46:11

Fuxino
Member
From: Slovakia
Registered: 2014-09-26
Posts: 198

Re: [mpd] Cannot find any song

kowa wrote:

Hello,

I want to give mpd and ncmpcpp a try so I've installed them  and mpc.
I have configured my .mpd/mpd.conf to play music in ~/Music which contain some directories with flac.
I have set the default port and check in the ncmpcpp config file if it's the same and it is.
I run

mpd

and then

npmcpp

, then I update the database with

mpc update

but I still have no music in ncmpcpp.

What have I missed ?

Does it work if you run

mpd ~/.mpd/mpd.conf

?

You should also post the configuration file.


Arch + XMonad

Dotfiles: https://github.com/Fuxino/dotfiles

Offline

#4 2015-11-23 21:05:19

kowa
Member
Registered: 2015-11-23
Posts: 24

Re: [mpd] Cannot find any song

It doesn't change wether I pass the path to config file by argument.
My mpd.conf :

music_directory         "~/Music/"
playlist_directory "~/.mpd/playlists"
db_file "~/.mpd/mpd.db"
log_file "~/.mpd/mpd.log"
pid_file "~/.mpd/mpd.pid"
state_file "~/.mpd/mpdstate"
sticker_file "~/.mpd/sticker.sql"

user    "kowa"
group   "kowa"

bind_to_address         "127.0.0.1"
port                            "6600"

audio_output {
 type           "alsa"
 name           "ALSA Device"
}

log_level       "verbose"
auto_update     "yes"
auto_update_depth       "3"
follow_outside_symlinks "yes"
follow_inside_symlinks  "yes"

Offline

#5 2015-11-23 21:09:20

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [mpd] Cannot find any song

And your ncmpcpp configuration as well please...

Have you created the ~/.mpd directory you specified in your config?
Can you post the output of 'mpc stats'.

Last edited by Slithery (2015-11-23 21:10:47)


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#6 2015-11-23 21:17:33

Proinsias
Member
From: Glasgow
Registered: 2013-08-19
Posts: 121

Re: [mpd] Cannot find any song

ncmpcpp config?

You can update the database in ncmpcpp with 'u', you could also try just using:

mpc add /path/to/file
mpc play

*edit* doh xpost

Last edited by Proinsias (2015-11-23 21:18:06)

Offline

#7 2015-11-23 21:35:38

Fuxino
Member
From: Slovakia
Registered: 2014-09-26
Posts: 198

Re: [mpd] Cannot find any song

slithery wrote:

Have you created the ~/.mpd directory you specified in your config?

And also the *.db, *.log, etc. files.


Arch + XMonad

Dotfiles: https://github.com/Fuxino/dotfiles

Offline

#8 2015-11-23 21:40:20

kowa
Member
Registered: 2015-11-23
Posts: 24

Re: [mpd] Cannot find any song

ncmpcpp config (just the lines decommented):

ncmpcpp_directory = ~/.ncmpcpp
mpd_host = localhost
mpd_port = 6600
mpd_connection_timeout = 5
mpd_music_dir = ~/Music

also I've tried

mpc add ~/Music
error adding /home/kowa/Music: Malformed URI

Same message when I specify a music file location.

Offline

#9 2015-11-24 12:33:16

smirky
Member
From: Bulgaria
Registered: 2013-02-23
Posts: 277
Website

Re: [mpd] Cannot find any song

Hey kowa,

Try the following:

$ mpc update
$ mpc ls

If this actually shows you anything which represents your music directory, then try this

$ mpc ls | mpc add

Those commands above assume that you've set an alias to mpc for example

$ alias mpc='mpc -h pass@locahost'

Last edited by smirky (2015-11-24 12:34:04)


Personal spot  ::  https://www.smirky.net/  ::  Try not to get lost!

Offline

#10 2015-11-24 16:05:09

brix
Member
Registered: 2014-05-26
Posts: 69

Re: [mpd] Cannot find any song

Too obvious to mention, maybe, but nonetheless...

If the album directories and music files in the Music directory lack the correct permissions, mpd will not see them. In which case run the following while in the Music directory:

#!/usr/bin/bash
# give std permissions to subdirs and  files in current dir
echo "changing permissions in $(pwd)"
find "$(pwd)"/ -type d -exec chmod 755 {} \;
find "$(pwd)"/ -type f -exec chmod 644 {} \;
echo "permissions standardized"

Enough is more.

Offline

#11 2015-11-24 16:39:12

kowa
Member
Registered: 2015-11-23
Posts: 24

Re: [mpd] Cannot find any song

Brix, I have the rights set to 755 for directories and 644 for files like you said but thank you.

mpc ls

show me the directories who are album directories, but ncmpcpp still have no music after updating database.
I have tried to change the hostname in mpd.conf from localhost to my real hostname as I wasn't sure if localhost is a fake name or not but it doesn't recognize my true hostname so I guess I should leave localhost.

Offline

#12 2015-11-24 17:02:13

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [mpd] Cannot find any song

Do you have the flac codec installed?

pacman -Ss flac

No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#13 2015-11-24 17:16:53

kowa
Member
Registered: 2015-11-23
Posts: 24

Re: [mpd] Cannot find any song

Yes flac is installed.

Offline

#14 2015-11-25 23:59:56

Proinsias
Member
From: Glasgow
Registered: 2013-08-19
Posts: 121

Re: [mpd] Cannot find any song

If mpc ls is showing your album directories you should be able to add one to the playlist and listen.

This:

mpc add ~/Music
error adding /home/kowa/Music: Malformed URI

is wrong. You should add a folder from within the ~/Music directory:

mpc add ArchLinux_Ballads

not:

mpc add ~/Music/Archlinux_Ballads

This will give the malformed uri message. It works with completion too which is nice.
Once you've added an album try mpc play.

If you can get mpd/mpc up and running, and if it's listing your albums it sounds like you're pretty much there, you can the leave it alone and focus on ncmpcpp. My ncmpcpp/config file works just fine as a one liner:

mpd_music_dir = /mnt/storage/music

edit: my mpd.conf:

music_directory         "/mnt/storage/music"                                                                                        
playlist_directory              "~/.config/mpd/playlists"
db_file                 "~/.config/mpd/database"
log_file                        "~/.config/mpd/log"
pid_file                        "~/.config/mpd/pid"
state_file                      "~/.config/mpd/state"
sticker_file                    "~/.config/mpd/sticker.sql"
restore_paused "yes"
save_absolute_paths_in_playlists        "yes"
auto_update     "yes"

Last edited by Proinsias (2015-11-26 00:16:36)

Offline

Board footer

Powered by FluxBB