You are not logged in.

#1 2008-01-04 00:18:09

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Playing streaming music with MPD: Ogg fix patch

I am trying to move most of my apps to the CLI, and I (obviously) stumbled on a particularly annoying problem that was bugging me from a long time.
So, this is a script that allows me to play streaming music from the internet through mpc (and MPD), from the man page:

#!/bin/bash
mpc clear
cat $1 | mpc add
mpc play

The only problem was that whenever I tried to play music from Jamendo, it hanged for a while and then froze MPD altogether. At times I could get the music playing when I had already forgot I had put it in queue. I was googling about it today, and I found it's a bug, and also found a patch to fix it. So I'm sharing my edited PKGBUILD with you, it may come useful smile

You can get the patch from here. In my PKGBUILD I have downloaded it manually and put it in the PKGBUILD folder.


# $Id $
# Maintainer: Damir Perisa <damir.perisa@bluewin.ch>
# Contributor: Ben <ben@benmazer.net>

pkgname=mpd
pkgver=0.13.0
pkgrel=2
pkgdesc="Music daemon that plays MP3, FLAC, and Ogg Vorbis files"
arch=('i686' 'x86_64')
license="GPL"
url="http://musicpd.org"
depends=('libid3tag' 'libmad' 'flac>=1.1.3' 'audiofile' 'faad2>=2.5' 'libmikmod'
         'alsa-lib' 'libshout' 'libmpcdec>=1.2.5' 'libsamplerate')
install=mpd.install
source=(http://musicpd.org/uploads/files/mpd-${pkgver}.tar.gz
mpd mpd.conf.example fix_canceling_ogg_stream.patch)
md5sums=('0b33bdb9d706439949344073e90f812a'
         'b1fd15de359db08e4b9ae4b199640f0e'
         'b3e370377d39d17427c50f04a0cdea6e')
sha1sums=('96f939b3d926c5b95d7615c1a5e7860f4d5fcd94'
          '1018eeba932aa3df9456a120bc106b4bd345ccda'
          'f04a668c89cd3511751cc7d0b05cc8a3dd36c437')

build() {
  cd ${startdir}/src/${pkgname}-${pkgver}/src
  patch -p1 -i ../../fix_canceling_ogg_stream.patch
  cd ..
  ./configure --prefix=/usr --sysconfdir=/etc --disable-jack -with-zeroconf=no
  make || return 1
  make DESTDIR=${startdir}/pkg install

  install -D ../mpd ${startdir}/pkg/etc/rc.d/mpd
  install -Dm644 ../mpd.conf.example ${startdir}/pkg/etc/mpd.conf.example
  mkdir -p ${startdir}/pkg/var/lib/mpd/playlists
  mkdir -p ${startdir}/pkg/var/log/mpd
  mkdir -p ${startdir}/pkg/var/run/mpd
}

Not so difficult, but there might be beginners like me around, who would need to read tutorials and man pages to get this working. Well, this was the first patch I managed to apply all by myself, and I was surprised about how I actually succedeed tongue

Enjoy the music smile


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#2 2008-01-04 06:03:38

peets
Member
From: Montreal
Registered: 2007-01-11
Posts: 936
Website

Re: Playing streaming music with MPD: Ogg fix patch

I installed the mpd-svn package from AUR - it's supposed to work too.

I can't find any m3u playlists on Jamendo though. Everything plays in flash, or I can download the albums.

Have you tried http://www.magnatune.com? They screen the album submissions, so their stuff is mostly quality. They also work with CC licenses, but their main goal is to get you to buy the artists' music. You get to choose how much you want to pay though!

Offline

#3 2008-01-04 13:25:46

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: Playing streaming music with MPD: Ogg fix patch

I have tried to build the svn version from AUR, but it failed, so I'm happy with this fix.

As for Jamendo, you can get streaming music at least using the old website. You can see the "Listen to entire album" link under the album.
I have tried Magnatune and also bought a couple of albums. It's good music, indeed. I'm not sure I share their policy entirely, since they didn't make clear how things really work. I have asked for clarification, and I'm still waiting for an answer. The website says I can download the get the low quality music and use it with the CC license, but by mail they told me I can't download it legally, even though they're not gonna do anything about it. I have replied and sent a link to the section that says I can download the low quality music, and I'm still waiting for a response. Odd.

I think Jamendo does a better job as for Creative Commons licensing.


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#4 2008-01-05 03:21:16

peets
Member
From: Montreal
Registered: 2007-01-11
Posts: 936
Website

Re: Playing streaming music with MPD: Ogg fix patch

Hmm mpd-svn wouldn't play my music, so I tried your PKGBUILD. I wasn't able to build it. I would get a message saying that the patch file was missing. If I downloaded it manually, I would be told that it had already been applied.

I'm now trying out cmus.

For Jamendo: how do you access it? I find their website really ugly, but found a page on their wiki explaining how to fetch content. Have you tried this, and have you succeeded?

Offline

#5 2008-01-05 14:41:13

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: Playing streaming music with MPD: Ogg fix patch

It says it's already been applied, but you still have to apply it, so, answer "yes" when it asks you to apply it.

For Jamendo, try to use http://blue.jamendo.com, that should bring you to the older version of the website.
I have spoken with Sylvain, Jamendo's founder, and he is gonna put some features back, like m3u playlists.
So, as for now I use the old interface to stream music.


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#6 2008-01-05 20:10:08

peets
Member
From: Montreal
Registered: 2007-01-11
Posts: 936
Website

Re: Playing streaming music with MPD: Ogg fix patch

O.K, mpd works! And I can stream ogg. Thanks!

Offline

#7 2008-01-05 20:34:04

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: Playing streaming music with MPD: Ogg fix patch

No problem smile

Enjoy the music!


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#8 2008-02-19 19:50:25

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: Playing streaming music with MPD: Ogg fix patch

Aww crap! The upgrade has screwed it up again, and the patch is not working. I guess I'll downgrade to 0.13.0.

Edit
or perhaps it is working... well, my Jamendo bash script is working fine, but when I try to open stuff from the website it doesn't work...

Last edited by finferflu (2008-02-19 20:50:35)


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

Board footer

Powered by FluxBB