You are not logged in.
Pages: 1
Hello,
I have a setup at home which consists of a file server and a server where i run mpd on.
I use a samba share to mount my music directory on my mpd server and that works fine.
I wish to listen to my music when i am not home so i forwarded port 6600 and i can connect to it using ncmpcpp.
But of course i cant hear anything when playing songs because mpd outputs to alsa so i setup 3 https streams one for mp3, one for flac and one for wav on port 8000.
I wanna do the same thing as jasonwryan discribed in https://bbs.archlinux.org/viewtopic.php?id=164434 but the only difference is i wanna also be able to listnen to my music outside my home network(if thats even possible)
When i do
mpc add http://MYWANIP:8000
i get
mpd error: Connection refused
This is my mpd.conf:
philip@Hathor:~$ cat /etc/mpd.conf
# Files and directories #######################################################
#
music_directory "/var/lib/mpd/music"
#
playlist_directory "/var/lib/mpd/playlists"
#
db_file "/var/lib/mpd/tag_cache"
#
log_file "/var/log/mpd/mpd.log"
#
pid_file "/run/mpd/pid"
#
state_file "/var/lib/mpd/state"
#
sticker_file "/var/lib/mpd/sticker.sql"
#
###############################################################################
# General music daemon options ################################################
#
user "mpd"
#
#group "nogroup"
#
bind_to_address "localhost"
#
#bind_to_address "/run/mpd/socket"
#
#port "6600"
#
#log_level "default"
#
#gapless_mp3_playback "yes"
#
#restore_paused "no"
#
#save_absolute_paths_in_playlists "no"
#
#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc"
#
#auto_update "yes"
#
#auto_update_depth "3"
#
###############################################################################
# Symbolic link behavior ######################################################
#
#follow_outside_symlinks "yes"
#
#follow_inside_symlinks "yes"
#
###############################################################################
# Zeroconf / Avahi Service Discovery ##########################################
#
#zeroconf_enabled "yes"
#
#zeroconf_name "Music Player"
#
###############################################################################
# Permissions #################################################################
#
#password "password@read,add,control,admin"
#
#default_permissions "read,add,control,admin"
#
###############################################################################
# Database #######################################################################
#
#database {
# plugin "proxy"
# host "other.mpd.host"
# port "6600"
#}
# Input #######################################################################
#
input {
plugin "curl"
# proxy "proxy.isp.com:8080"
# proxy_user "user"
# proxy_password "password"
}
#
###############################################################################
# Audio Output ################################################################
#
#
audio_output {
type "alsa"
name "My ALSA Device"
# device "hw:0,0" # optional
# mixer_type "hardware" # optional
# mixer_device "default" # optional
# mixer_control "PCM" # optional
# mixer_index "0" # optional
}
#audio_output {
# type "shout"
# encoder "vorbis" # optional
# name "My Shout Stream"
# host "localhost"
# port "8000"
# mount "/mpd.ogg"
# password "hackme"
# quality "5.0"
# bitrate "128"
# format "44100:16:1"
# protocol "icecast2" # optional
# user "source" # optional
# description "My Stream Description" # optional
# url "http://example.com" # optional
# genre "jazz" # optional
# public "no" # optional
# timeout "2" # optional
# mixer_type "software" # optional
#}
audio_output {
type "httpd"
name "My HTTP Stream"
encoder "lame" # optional, vorbis or lame
port "8000"
bind_to_address "0.0.0.0" # optional, IPv4 or IPv6
# quality "5.0" # do not define if bitrate is defined
bitrate "320" # do not define if quality is defined
format "44100:16:1"
max_clients "0" # optional 0=no limit
}
audio_output {
type "httpd"
name "FLAC Stream"
encoder "flac"
port "8800"
format "44100:16:2"
}
audio_output {
type "httpd"
name "pcm wav Stream"
encoder "wave"
port "8000"
}
# An example of a pulseaudio output (streaming to a remote pulseaudio server)
# Please see README.Debian if you want mpd to play through the pulseaudio
# daemon started as part of your graphical desktop session!
#audio_output {
# type "pulse"
# name "My Pulse Output"
# server "remote_server" # optional
# sink "remote_server_sink" # optional
#}
###############################################################################
# Normalization automatic volume adjustments ##################################
#
#replaygain "album"
#
#replaygain_preamp "0"
#
#replaygain_missing_preamp "0"
#
#replaygain_limit "yes"
#
#volume_normalization "no"
#
###############################################################################
# Character Encoding ##########################################################
#
filesystem_charset "UTF-8"
#
id3v1_encoding "UTF-8"
#
###############################################################################
# SIDPlay decoder #############################################################
#
# songlength_database:
# Location of your songlengths file, as distributed with the HVSC.
# The sidplay plugin checks this for matching MD5 fingerprints.
# See http://www.c64.org/HVSC/DOCUMENTS/Songlengths.faq
#
# default_songlength:
# This is the default playing time in seconds for songs not in the
# songlength database, or in case you're not using a database.
# A value of 0 means play indefinitely.
#
# filter:
# Turns the SID filter emulation on or off.
#
#decoder {
# plugin "sidplay"
# songlength_database "/media/C64Music/DOCUMENTS/Songlengths.txt"
# default_songlength "120"
# filter "true"
#}
#
###############################################################################
How do i make this work(if it is possible)?
At the moment i cant test if it works when im connected to my home network but i will test it as soon i get home.
I just verified the stream works with vlc but it would be nice if it works with mpc because then i just need to connect with mpc and then controll it with ncmpcpp instead of having vlc AND ncmpcpp open
Last edited by philipW (2017-12-20 09:59:01)
Offline
Moved to Multimedia by request
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Online
I solved my issue.
When i did
mpc add http://MYWANIP:8000
it didn't work because i didn't have mpd running locally so mpc couldn't play the stream.
I tough mpc could play the stream on its own but it just adds the stream from my server to the playlist of my local mpd.
So i use ncmpcp that's connected to the mpd running on my server to control my music. mpd outputs 2 http streams: a flac stream for when i'm home and a mp3 stream for when i'm not at home. and the mpd on my laptop plays the output of the stream.
I use mupeace on my phone witch can both control the stream and play the output.
Offline
Pages: 1