You are not logged in.

#1 2009-08-30 11:00:51

FrozenFox
Member
From: College Station, TX
Registered: 2008-03-23
Posts: 422
Website

[SOLVED: MAJOR PEBCAK] Mpd fails to stream (mp3) to icecast

EDIT: Wow, that's possibly the most embarassing FAIL I've ever been involved in. In the unlikely event anyone else ever fails as hard though, I will post my solution. I copied over the mpd.conf.example again and re-did it to my needs without screwing with removing all sorts of commented stuff, and came to find it still wasn't working (even after updating mpd). Considering everyone else's stuff seemed to Just Work (TM), I started thinking something seriously stupid must be wrong. Previously, I was using exaile, which apparently didn't stream at my volume, it streamed at a constant (and would keep playing the wrong file even if I switched songs, etc). In order to test if my stream was working on exaile, I lowered the volume on Exaile and played the stream in, for example, Amarok. .... do you see where this is going? That's right.. to test mpd, I lowered the volume to muted levels locally and listened in to the stream on amarok. ..mpd was sending a muted stream. >_<.. turned up the volume a little, played the stream, and to my frustration and surprise the stream was playing off-sync so I could hear it. The last times I tried to do this, I must have clicked into the stream JUST in time to hear mpd go to mute. Which explains why I would occasionally hear second-long or so bits of audio which I thought were some kind of local buffer output amarok was picking up somewhere. I'm not sure why it never clicked until I started raking my brain for the dumbest possible solutions. -_-

Sigh.

*MASSIVE HEADDESK*

Well, it works now. Hooray, anyway.

Original post:

I'm beat.. I can't seem to make mpd stream any of my mp3s (or for that matter ogg's, but I only tested 1, which i converted) to my icecast server. Exaile+icast-plugin successfully streams to the server with identical settings afaict, and plays as expected. However, mpd seems to send the song information and an *empty stream*. Zero sound. Mpd on my end otherwise works fine, but the stream fails. I've tried every bloody option I can think of..

Any ideas? Did I do something dumb somewhere?..

No errors in the logs i can see.. current ver of mpd, nor the *.14.* old version, nor git version seem to work.

Edit: Well.. in the icecast error log, I see a bunch of

[ WARN stats/stats_event_conv No charset found for "ISO8859-1" ]

errors.. however, that locale already exists on the system. running locale-gen didn't change anything.. and I doubt the relevance.. but I might as well mention it. EDIT2: to be sure, i ran locale -a on the server.. sure enough, it returns en_US, en_US.iso88591, en_US.utf8 plus other stuff. Same goes for local machine..

login/user information edited out accordingly..

/etc/mpd.conf on my machine..

music_directory "/home/myUser/myFolder/Music"                                                 
playlist_directory "/home/myUser/.config/mpd/playlists"                                   
db_file "/home/myUser/.config/mpd/mpd.db"                                                 
log_file "/home/myUser/.config/mpd/mpd.log"                                                                                      
pid_file "/home/myUser/.config/mpd/mpd.pid"                                               
state_file "/home/myUser/.config/mpd/mpdstate"                                                                                                                      
user "mpd"                                                                             

input {
        plugin "curl"
}                    

audio_output {
        type                    "alsa"
        name                    "myAlsa"
        device                  "hw:0,0"        # optional                             
        format                  "44100:24:2"    # optional                             
}                                                                                      
                                                                                       
audio_output {                                                                        
       type                    "shout"                                                
       encoding                "mp3"                   # optional                                                                     
       name                    "Icecast"                                              
       host                    "myIP"                                        
       port                    "8000"                                                 
       mount                   "/mpd"                                                 
       password                "myPassword"                                                                                             
       bitrate                 "128"                                                  
       format                  "44100:16:1"        # tweaked the crap out of this to no avail                                   
       protocol                "icecast2"              # optional                     
       user                    "source"                # optional                     
       description             "Icecast"               # optional                     
       genre                   "myGenre"               # optional                     
       public                  "no"                    # optional                     
       timeout                 "10"                     # optional
}

mixer_type                      "software"

filesystem_charset             "UTF-8"

/etc/icecast.xml on the server machine..

<icecast>
    <limits>
        <clients>100</clients>
        <sources>1</sources>
        <threadpool>5</threadpool>
        <queue-size>524288</queue-size>
        <client-timeout>30</client-timeout>
        <header-timeout>15</header-timeout>
        <source-timeout>10</source-timeout>
        <burst-on-connect>1</burst-on-connect>
        <burst-size>65535</burst-size>
    </limits>

    <authentication>
        <source-password>myPassword</source-password>
        <relay-password>myPassword</relay-password>
        <admin-user>myAdmin</admin-user>
        <admin-password>myPassword</admin-password>
    </authentication>

    <hostname>myIP</hostname>

    <listen-socket>
        <port>8000</port>
    </listen-socket>
    <listen-socket>
        <port>8001</port>
    </listen-socket>

    <fileserve>1</fileserve>

    <paths>
        <basedir>/usr/share/icecast</basedir>
        <logdir>/log</logdir>
        <webroot>/web</webroot>
        <adminroot>/admin</adminroot>
        <alias source="/" dest="/status.xsl"/>
    </paths>

    <logging>
        <accesslog>access.log</accesslog>
        <errorlog>error.log</errorlog>
          <loglevel>2</loglevel> 
          <logsize>10000</logsize>
    </logging>

    <security>
        <chroot>1</chroot>
        <changeowner>
            <user>myUser</user>
            <group>users</group>
        </changeowner>
    </security>
</icecast>

Last edited by FrozenFox (2009-09-01 08:40:26)

Offline

Board footer

Powered by FluxBB