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

Thread: Can't make MPD stream MP3 through IceCast2

  1. #1
    Join Date
    Sep 2007
    Beans
    3

    Can't make MPD stream MP3 through IceCast2

    I have downloaded the MPoD app for iPhone because I wanted a media remote that works with a linux mediaplayer (can't believe I actually found one!) and it works fine. It also has the feature to receive a stream from mpd and play it on the iPhone which seems quite cool. The problem is that i can't set up the MPD to stream mp3 through icecast. The iPhone obviously can't play OGG since it's Apple.

    I configured the audio_output lite this:

    Code:
    audio_output {
    	type		"shout"
    	encoding	"mp3"			# optional
    	name		"MP3 Shout"
    	host		"localhost"
    	port		"8000"
    	mount		"/mpd.mp3"
    	password	"hackme"
    #	quality		"5.0"
    	bitrate		"128"
    	format		"44100:16:2"
    	protocol	"icecast2"		# optional
    	user		"source"		# optional
    	description	"My Stream Description"	# optional
    	genre		"jazz"			# optional
    	public		"no"			# optional
    	timeout		"2"			# optional
    }
    And when i restart MPD I get:

    Code:
    $ sudo /etc/init.d/mpd restart
     * Stopping Music Player Daemon mpd                                                                                                                                          [ OK ] 
     * Starting Music Player Daemon mpd                                                                                                                                                 output: line 200: couldn't find shout encoder plugin "mp3"
    Aborted
    Since it's MPD that dies from lack of mp3-support I decided to compile it myself but I still get the same error. Here is the ./configure output:

    Code:
    ########### MPD CONFIGURATION ############
    
     Client Support:
     IPv6 support ..................enabled
     TCP support ...................enabled
     Unix domain socket support ....enabled
    
     Playback Support:
     ALSA support ..................enabled
     FIFO support ..................enabled
     HTTP daemon support ...........enabled
     JACK support ..................disabled
     libao support .................disabled
     OSS support ...................enabled
     OS X support ..................disabled
     Pipeline output support .......disabled
     PulseAudio support ............disabled
     Media MVP support .............disabled
     SHOUTcast support .............enabled
     Solaris /dev/audio support ....disabled
    
     Streaming Encoder Support:
     LAME mp3 encoder ..............enabled
     Ogg Vorbis encoder ............enabled
    
     File Format Support:
     AAC support ...................disabled
     C64 SID support ...............disabled
     FFMPEG support ................disabled
     FLAC support ..................disabled
     fluidsynth MIDI support .......disabled
     MikMod support ................disabled
     MODPLUG support ...............disabled
     MAD mp3 decoder support .......enabled
     MP4 support ...................disabled
     Musepack (MPC) support ........disabled
     OggFLAC support ...............disabled
     Ogg Vorbis support ............enabled
       using tremor.................no
     Wave file support .............disabled
     WavPack support ...............disabled
     wildmidi MIDI support .........disabled
    
     Archive support:
     BZ2 archives support ..........disabled
     ISO 9660 archives support .....disabled
     ZIP archives support ..........disabled
    
     Streaming support:
     last.fm radio support .........disabled
     libcurl support (streaming) ...enabled
     libmms support ................disabled
    
     Other features:
     ID3 tag support ...............disabled
     libsamplerate support .........disabled
     Zeroconf support ..............disabled
     libcue support ................disabled
    
    ##########################################

    Any ideas would be appreciated.

  2. #2
    Join Date
    Jan 2005
    Beans
    Hidden!

    Re: Can't make MPD stream MP3 through IceCast2

    Just a note, I'm using streaming output directly through MPD now. (on Karmic)

    Here's how.

    In a terminal:
    Code:
    sudo apt-get build-dep mpd && apt-get source mpd
    This will install the build-depends as well as download and extract the source archive for the ubuntu .deb.

    Go into the extracted source dir and go into the debian/rules file.
    You want the 'DEB_CONFIGURE_USER_FLAGS' bit to say:
    Code:
    DEB_CONFIGURE_USER_FLAGS += $(WITH_TREMOR) --enable-sqlite --enable-un --enable-ao --enable-lame-encoder
    Update for Maverick. (note the end)
    Code:
    DEB_CONFIGURE_USER_FLAGS += $(WITH_TREMOR) --enable-sqlite --enable-un --enable-ao --enable-lame
    Side note: While cd'd into mpd's extracted source folder, doing a "./configure --help" will show you all kinds of other options you can add/remove.

    Then back in the root dir of the source folder do:
    Code:
    debuild binary
    That should build you the same .deb you get from the repos but with .mp3 output enabled.

    My /etc/mpd.conf bit for streaming looks like:

    Code:
    #
    audio_output {
            type            "httpd"
            name            "MetalMusicAddict's Jukebox"
            encoder         "lame"                  # optional, vorbis or lame
            port            "8000"
            quality         "6.0"                   # do not define if bitrate is defined
    #       bitrate         "192"                   # do not define if quality is defined
            format          "44100:16:2"
    }
    #
    If you try this make sure to turn off IceCast and pin your compiled package in Synaptic.
    Last edited by MetalMusicAddict; November 19th, 2010 at 12:57 AM. Reason: Updated instructions for Maverick

  3. #3
    Join Date
    Sep 2007
    Beans
    3

    Re: Can't make MPD stream MP3 through IceCast2

    I didn't get the httpd output to work. But the icecast did So at least it's working now. Thanks a lot!

  4. #4
    Join Date
    Feb 2007
    Location
    Slovenia
    Beans
    251
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Talking Re: Can't make MPD stream MP3 through IceCast2

    Thank you MetalMusicAddict! This helped me a lot. I wanted to stream to a SHOUTCast server, but it would only accept mp3. Your solution worked like a charm!

  5. #5
    Join Date
    Jan 2005
    Beans
    Hidden!

    Re: Can't make MPD stream MP3 through IceCast2

    Quote Originally Posted by unimatrix View Post
    Thank you MetalMusicAddict! This helped me a lot. I wanted to stream to a SHOUTCast server, but it would only accept mp3. Your solution worked like a charm!
    np. For anyone else reading there's a good bit of packages we have that have the non-free bits turned off. (ie: FFMPEG) The above method can be used to recompile them. Just enable the right switches.

  6. #6
    Join Date
    Jun 2010
    Location
    India
    Beans
    9
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Can't make MPD stream MP3 through IceCast2

    Hey guys thanks for the information, as we are all under some Umbrella, here are my few cents

    Configure MPD to be an Icecast Source

    Edit /etc/mpd.conf and enable the Icecast audio_output by adding the following:
    audio_output {
    type "shout"
    encoding "ogg"
    name "my cool stream"
    host "localhost"
    port "8000"
    mount "/mpd.ogg"

    # This is the source password in icecast.xml
    password "hackme"

    # Set either quality or bitrate
    # quality "5.0"
    bitrate "64"

    format "44100:16:1"

    # Optional Paramters
    user "source"
    # description "here's my long description"
    # genre "jazz"
    } # end of audio_output

    # Need this so that mpd still works if icecast is not running
    audio_output {
    type "alsa"
    name "fake out"
    driver "null"
    }
    Last edited by kevinanchi; September 4th, 2010 at 10:59 AM. Reason: Editing

  7. #7
    Join Date
    Nov 2005
    Location
    Leeds, UK
    Beans
    1,634
    Distro
    Ubuntu Development Release

    Re: Can't make MPD stream MP3 through IceCast2

    Thanks MetalMusicAddict, streaming to my android via MPDroid works perfectly now

  8. #8
    Join Date
    Jun 2010
    Beans
    24

    Re: Can't make MPD stream MP3 through IceCast2

    Hello,

    MetalMusicAddict I just did everything what is in your tutorial I am using ubuntu 10.10 ,

    I am getting this error message :
    Code:
    output: line 221: No such encoder: lame
    My mpd.conf

    Code:
    # An example of a httpd output (built-in HTTP streaming server):
    #
    audio_output {
        type         "httpd"
        name       "My HTTP Stream"
        encoder    "lame"        # optional, vorbis or lame
        port          "8000"
        quality      "5.0"            # do not define if bitrate is defined
    #    bitrate     "128"            # do not define if quality is defined
        format        "44100:16:1"
    }
    before that I was building .DEB file in the end I got some warrnings :

    Code:
    dpkg-deb: warning: 'debian/mpd-dbg/DEBIAN/control' contains user-defined field 'Original-Maintainer'
    dpkg-deb: building package `mpd-dbg' in `../mpd-dbg_0.15.10-1ubuntu3_amd64.deb'.
    dpkg-deb: warning: ignoring 1 warnings about the control file(s)

    Do you have any solution for this ?

    Thanks

  9. #9
    Join Date
    Jan 2005
    Beans
    Hidden!

    Re: Can't make MPD stream MP3 through IceCast2

    Update for Maverick. (note the end)
    Code:
    DEB_CONFIGURE_USER_FLAGS += $(WITH_TREMOR) --enable-sqlite --enable-un --enable-ao --enable-lame
    @ikonitas - You .conf looks fine though you might wanna enable a stereo stream.

    Code:
    format        "44100:16:2"
    Make sure you use the above switch and save your changes to the rules file before you compile.
    Last edited by MetalMusicAddict; November 19th, 2010 at 01:04 AM.

  10. #10
    Join Date
    Jun 2010
    Beans
    24

    Re: Can't make MPD stream MP3 through IceCast2

    Thanks MetalMusicAddict for your reply :

    Its all working fine now
    Just one thing I would like to allow mpd to stream his output to icecast2 ...
    Last edited by ikonitas; November 19th, 2010 at 07:19 PM.

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
  •