![]() |
|
|||
![]()
Music Player Daemon (MPD) OpenBSD Howto
MPD /audio/mpd is one of the lightest, most responsive methods to access mp3, ogg files and internet streams. Installation entails 2 components; the daemon and one of a number of front ends. On an older i386, playback of locally stored mp3's or internet music streams uses less than 2% of the cpu. In OpenBSD, the /audio/mpd port has two flavors, the basic port and a flavor that enables the tremor integer decorder. The tremor option enhances performance on *ogg files at the expense of network streaming. There are multiple front ends that function as traditional clients to the music player daemon. Clients can be command line, console, embedded, or GTK+, Qt or Java based gui's. Plugin interfaces ranging from a Firefox extension, desktop specific controllers and emacs are available. The clients also can control some aspects of the daemon. In OpenBSD, configuration is easy, just edit /etc/mpd.conf to delineate where your music is stored. Code:
music_directory "/home/user/music" The port maintainers have set defaults for local users with the libao (sndio) backend. For Gnome3 users, libao will work in parallel with pulseaudio or /etc/mpd.conf can be edited to change mpd output from libao to pulseaudio. The music files and the chain of directories all need to be executable. In OpenBSD, the executable directory chain is there by default when using /home/user/music. On initial startup and after any additions to the music folder, an update command will need to be run. Once the music directory is in place and configured in /etc/mpd.conf, add mpd to collection of package script daemons to be started in /etc/rc.conf.local. For example: Code:
pkg_scripts="messagebus avahi_daemon mpd" Either reboot or run Code:
/etc/rc.d/mpd -f start I'll mention two mpd clients; audio/ncmpc and audio/sonata. Ncmpc can be run in the console or in a terminal. With the setup described above you should see that it is connected to the localhost. Ctrl-U will start a music database update. The F1 key will show the help file, F2 the playlist and F3 will let you browse the music folder. Internet music streams can be added in the F2 playlist panel with the 'a' key. The 'S' key will save the music stream url where it can be found in the F3 panel. Two of my favorite stream sources are: Code:
http://audio-mp3.ibiblio.org:8000/wncw-128k and Code:
http://stream-tx1.radioparadise.com:80/mp3-128 If the station you wish to stream is a *m3u link, the mp3 stream will be embedded with the *m3u file. For example, the WNCW web page provides this web page link Download the link to your local directory view the contents $ less 128K.m3u providesCode:
#extm3u #extinf:99999,88.7 WNCW http://audio-mp3.ibiblio.org:8000/wncw-128k For those using xterm: . Alternative terminals that support changing title bar icons, such as /x11/rxvt-unicode can use after copying an icon to the file path specified. Those running a desktop environment that supports freedestop menu entries can use the following entry in /usr/local/share/applications/ncmpd.desktop Code:
[Desktop Entry] Name=NcMpc Comment=MPD Front end Exec=xterm -g 54x18 +sb -T "NcMpc Music" -e ncmpc Terminal=false Type=Application Icon=music.png Categories=GTK;AudioVideo; Sonata, /audio/sonata, provides the same functionality with a mouse pointer interface and a system tray icon. Internet streams are added and stored under the 'streams' tab. Album art is available in addition to lyrics for those with bandwidth and cpu cycles to burn. Edit: 5) dbus_daemon renamed to messagebus Last edited by shep; 4 Weeks Ago at 03:46 PM. Reason: 1) Update RadioParadise to more robust server 2) Dealing with m3u links 3) Clarify pkg_scripts damons 4) Corrected WNCW link |
|
|||
![]()
This is an update for OpenBSD release 6.3
In OpenBSD 6.3 release, mpd is now built with sndio output. If I attempted to start mpd system wide in /etc/rc.conf.local, there were problems with sndio and using the default mpd.conf. What worked well is to setup a local configuration (per user) as described in the Arch Linux mpd wiki. I used OpenBSD /usr/local/share/doc/examples/mpd/mpd.conf when making a ~/.mpd/mpd.conf I additionally used a Unix socket in my home directory by doing the following 1) ~/.profile Code:
# $OpenBSD: dot.profile,v 1.5 2018/02/02 02:29:54 yasuoka Exp $ # # sh/ksh initialization PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games MPD_HOST=${HOME}/.mpd/socket export PATH HOME TERM MPD_HOST Code:
bind_to_address "localhost" to Code:
#bind_to_address "localhost" Code:
#bind_to_address "~/.mpd/socket" to Code:
bind_to_address "~/.mpd/socket" Code:
music_directory "~/Music" Code:
mpd ~/.mpd/mpd.conf Last edited by shep; 2 Weeks Ago at 04:06 PM. Reason: Updated for 6.3 |
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenBSD : Ripping and writing music CDs with cdio(1) | J65nko | Guides | 5 | 30th November 2011 08:33 PM |
New to OpenBSD: problem with music, raid? | barum87 | OpenBSD General | 3 | 24th June 2010 04:04 AM |
Howto Compile in OpenBSD 4.5 | shep | OpenBSD Packages and Ports | 2 | 7th May 2009 11:25 PM |
I'm looking for a music text based music player that can play .m4p and .m4a formats | cssgalactic | FreeBSD Ports and Packages | 4 | 14th July 2008 04:16 AM |
whats playing on your music player? | ephemera | Off-Topic | 22 | 10th June 2008 06:57 PM |