Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Stream stop on begin next song

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
padvinder



Joined: 31 Mar 2009
Posts: 6

PostPosted: Tue Mar 31, 2009 7:08 pm    Post subject: Stream stop on begin next song Reply with quote

I have a Debian server with mpd streaming through icecast2. Since a few weeks/months the stream stops playing (makinng sound) when a new song begins, and has to be manually stopped and restarted. Client is either VLC or a java browser plugin, on Windows Vista.

From the logs (see second post) it seems that MPD reconnects to icecast for each new song, but I don't know why, or how to fix it. Anybody here does?

Relevant system information:
Code:
uname -a:
Linux pauw 2.6.26-1-686 #1 SMP Sat Jan 10 18:29:31 UTC 2009 i686 GNU/Linux (Debian testing)
dpkg -l:
ii  icecast2                          2.3.2-2                  Ogg Vorbis and MP3 streaming media server
ii  ices2                             2.0.1-8                  Ogg Vorbis streaming source for Icecast 2
ii  mpd                               0.14.2-3                 Music Player Daemon


Configs:
/etc/mpd.conf
Code:
[...]
audio_output {
        type                    "shout"
        name                    "PAUW stream"
        host                    "XXXXXXXXXXXXXXXX"
        port                    "8000"
        mount                   "/mpd.ogg"
        password                "XXXXXXXXXXXX"
        bitrate                 "128"
        format                  "44100:16:2"
        user                    "source"                # optional
}
[...]
audio_output_format             "44100:16:2"
[...]

Note: I already tried commenting out the last line (which forces format convert before outputting to audio_outputs). mpd also outputs to an ALSA soundcard output.

/etc/icecast2/icecast.xml:
Code:
<icecast>
    <limits>
        <clients>100</clients>
        <sources>2</sources>
        <threadpool>5</threadpool>
        <queue-size>524288</queue-size>
        <client-timeout>30</client-timeout>
        <header-timeout>15</header-timeout>
        <source-timeout>10</source-timeout>
        <!-- If enabled, this will provide a burst of data when a client
             first connects, thereby significantly reducing the startup
             time for listeners that do substantial buffering. However,
             it also significantly increases latency between the source
             client and listening client.  For low-latency setups, you
             might want to disable this. -->
        <burst-on-connect>1</burst-on-connect>
        <!-- same as burst-on-connect, but this allows for being more
             specific on how much to burst. Most people won't need to
             change from the default 64k. Applies to all mountpoints  -->
        <burst-size>65535</burst-size>
    </limits>

    <authentication>
        <!-- Sources log in with username 'source' -->
        <source-password>XXXXXXXXXX</source-password>
        <!-- Relays log in username 'relay' -->
        <relay-password>XXXXXXXXXX</relay-password>

        <!-- Admin logs in with the username given below -->
        <admin-user>XXXXXXXXXXXX</admin-user>
        <admin-password>XXXXXXXXXXXX</admin-password>
    </authentication>

    <!-- Uncomment this if you want directory listings -->
    <!--
    <directory>
        <yp-url-timeout>15</yp-url-timeout>
        <yp-url>http://dir.xiph.org/cgi-bin/yp-cgi</yp-url>
    </directory>
     -->

    <!-- This is the hostname other people will use to connect to your server.
    It affects mainly the urls generated by Icecast for playlists and yp
    listings. -->
    <hostname>XXXXXXXXXXXXXXXXXXXXX</hostname>

    <!-- You can use these two if you only want a single listener -->
    <!--<port>8000</port> -->
    <!--<bind-address>127.0.0.1</bind-address>-->

    <!-- You may have multiple <listener> elements -->
    <listen-socket>
        <port>8000</port>
        <!-- <bind-address>127.0.0.1</bind-address> -->
    </listen-socket>
    <!--
    <listen-socket>
        <port>8001</port>
    </listen-socket>
    -->

    <!--<master-server>127.0.0.1</master-server>-->
    <!--<master-server-port>8001</master-server-port>-->
    <!--<master-update-interval>120</master-update-interval>-->
    <!--<master-password>hackme</master-password>-->

    <!-- setting this makes all relays on-demand unless overridden, this is
         useful for master relays which do not have <relay> definitions here.
         The default is 0 -->
    <!--<relays-on-demand>1</relays-on-demand>-->

    <!--
    <relay>
        <server>127.0.0.1</server>
        <port>8001</port>
        <mount>/example.ogg</mount>
        <local-mount>/different.ogg</local-mount>
        <on-demand>0</on-demand>

        <relay-shoutcast-metadata>0</relay-shoutcast-metadata>
    </relay>
    -->

    <!-- Only define a <mount> section if you want to use advanced options,
         like alternative usernames or passwords
    <mount>
        <mount-name>/example-complex.ogg</mount-name>

        <username>othersource</username>
        <password>hackmemore</password>

        <max-listeners>1</max-listeners>
        <dump-file>/tmp/dump-example1.ogg</dump-file>
        <burst-size>65536</burst-size>
        <fallback-mount>/example2.ogg</fallback-mount>
        <fallback-override>1</fallback-override>
        <fallback-when-full>1</fallback-when-full>
        <intro>/example_intro.ogg</intro>
        <hidden>1</hidden>
        <no-yp>1</no-yp>
        <authentication type="htpasswd">
                <option name="filename" value="myauth"/>
                <option name="allow_duplicate_users" value="0"/>
        </authentication>
        <on-connect>/home/icecast/bin/stream-start</on-connect>
        <on-disconnect>/home/icecast/bin/stream-stop</on-disconnect>
    </mount>

    <mount>
        <mount-name>/auth_example.ogg</mount-name>
        <authentication type="url">
            <option name="mount_add"       value="http://myauthserver.net/notify_mount.php"/>
            <option name="mount_remove"    value="http://myauthserver.net/notify_mount.php"/>
            <option name="listener_add"    value="http://myauthserver.net/notify_listener.php"/>
            <option name="listener_remove" value="http://myauthserver.net/notify_listener.php"/>
        </authentication>
    </mount>

    -->

    <fileserve>1</fileserve>

    <!-- set the mountpoint for a shoutcast source to use, the default if not
         specified is /stream but you can change it here if an alternative is
         wanted or an extension is required
    <shoutcast-mount>/live.nsv</shoutcast-mount>
    -->

    <paths>
      <!-- basedir is only used if chroot is enabled -->
        <basedir>/usr/share/icecast2</basedir>

        <!-- Note that if <chroot> is turned on below, these paths must both
             be relative to the new root, not the original root -->
        <logdir>/var/log/icecast2</logdir>
        <webroot>/usr/share/icecast2/web</webroot>
        <adminroot>/usr/share/icecast2/admin</adminroot>
        <!-- <pidfile>/usr/share/icecast2/icecast.pid</pidfile> -->

        <!-- Aliases: treat requests for 'source' path as being for 'dest' path
             May be made specific to a port or bound address using the "port"
             and "bind-address" attributes.
          -->
        <!--
        <alias source="/foo" dest="/bar"/>
          -->
        <!-- Aliases: can also be used for simple redirections as well,
             this example will redirect all requests for http://server:port/ to
             the status page
          -->
        <alias source="/" dest="/status.xsl"/>
    </paths>

    <logging>
        <accesslog>access.log</accesslog>
        <errorlog>error.log</errorlog>
        <!-- <playlistlog>playlist.log</playlistlog> -->
         <loglevel>4</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
         <logsize>10000</logsize> <!-- Max size of a logfile -->
        <!-- If logarchive is enabled (1), then when logsize is reached
             the logfile will be moved to [error|access|playlist].log.DATESTAMP,
             otherwise it will be moved to [error|access|playlist].log.old.
             Default is non-archive mode (i.e. overwrite)
        -->
        <!-- <logarchive>1</logarchive> -->
    </logging>

    <security>
        <chroot>0</chroot>
        <!--
        <changeowner>
            <user>nobody</user>
            <group>nogroup</group>
        </changeowner>
        -->
    </security>
</icecast>


Last edited by padvinder on Tue Mar 31, 2009 7:20 pm; edited 2 times in total
Back to top
View user's profile Send private message
padvinder



Joined: 31 Mar 2009
Posts: 6

PostPosted: Tue Mar 31, 2009 7:11 pm    Post subject: Reply with quote

And the logs:
/var/log/icecast/error.log (debug-level, around song change)
Code:
[2009-03-31  21:07:50] DBUG stats/modify_node_event update node total_bytes_read (84295708)
[2009-03-31  21:07:50] DBUG stats/modify_node_event update node total_bytes_sent (62432047)
[2009-03-31  21:07:52] DBUG format-ogg/format_ogg_free_headers releasing header pages
[2009-03-31  21:07:52] DBUG format-ogg/free_ogg_codecs freeing codecs
[2009-03-31  21:07:52] DBUG format-vorbis/vorbis_codec_free freeing vorbis codec
[2009-03-31  21:07:52] DBUG format-vorbis/initial_vorbis_page checking for vorbis codec
[2009-03-31  21:07:52] INFO format-vorbis/initial_vorbis_page seen initial vorbis header
[2009-03-31  21:07:52] DBUG format-vorbis/process_vorbis_page processing incoming header packet (1)
[2009-03-31  21:07:52] DBUG format-vorbis/process_vorbis_page processing incoming header packet (2)
[2009-03-31  21:07:52] DBUG format-vorbis/process_vorbis_page processing incoming header packet (2)
[2009-03-31  21:07:52] DBUG format-vorbis/process_vorbis_page we have the header packets now
[2009-03-31  21:07:52] DBUG format-vorbis/process_vorbis_headers Adding the 3 header packets
[2009-03-31  21:07:52] DBUG format-ogg/format_ogg_attach_header attaching BOS page
[2009-03-31  21:07:52] DBUG format-ogg/format_ogg_attach_header attaching header page
[2009-03-31  21:07:52] DBUG format-ogg/format_ogg_attach_header attaching header page
[2009-03-31  21:07:52] DBUG stats/process_source_event delete node audio_bitrate
[2009-03-31  21:07:52] DBUG stats/process_source_event delete node audio_channels
[2009-03-31  21:07:52] DBUG stats/process_source_event delete node audio_samplerate
[2009-03-31  21:07:52] DBUG stats/process_source_event new node audio_samplerate (44100)
[2009-03-31  21:07:52] DBUG stats/process_source_event new node audio_channels (2)
[2009-03-31  21:07:52] DBUG stats/process_source_event new node audio_bitrate (128000)
[2009-03-31  21:07:52] DBUG stats/modify_node_event update node ice-bitrate (128)
[2009-03-31  21:07:52] DBUG stats/modify_node_event update node artist (Do)
[2009-03-31  21:07:52] DBUG stats/modify_node_event update node title (Heaven)
[2009-03-31  21:07:52] DBUG stats/modify_node_event update node subtype (Vorbis)
[2009-03-31  21:07:55] DBUG stats/modify_node_event update node total_bytes_read (84376414)
[2009-03-31  21:07:55] DBUG stats/modify_node_event update node total_bytes_sent (62432047)
[2009-03-31  21:08:00] DBUG stats/modify_node_event update node total_bytes_read (84456959)


/etc/mpd/mpd.log (spans across a few songs)
Code:
Mar 31 21:09 : client 6758: closed
Mar 31 21:09 : client 6759: opened from XXXXXXXXXXXXX
Mar 31 21:09 : client 6759: process command "password "XXXXXXXXXXXXX""
Mar 31 21:09 : client 6759: command returned 0
Mar 31 21:09 : client 6759: process command "status"
Mar 31 21:09 : client 6759: command returned 0
Mar 31 21:09 : client 6759: process command "close"
Mar 31 21:09 : client 6759: command returned 20
Mar 31 21:09 : client 6759: closed
Mar 31 21:09 : client 6760: opened from XXXXXXXXXXXXX
Mar 31 21:09 : client 6760: process command "password "XXXXXXXXXXXXX""
Mar 31 21:09 : client 6760: command returned 0
Mar 31 21:09 : client 6760: process command "status"
Mar 31 21:09 : client 6760: command returned 0
Mar 31 21:09 : client 6760: process command "close"
Mar 31 21:09 : client 6760: command returned 20
Mar 31 21:09 : client 6760: closed
Mar 31 21:09 : client 6761: opened from XXXXXXXXXXXXX
Mar 31 21:09 : client 6761: process command "password "XXXXXXXXXXXXX""
Mar 31 21:09 : client 6761: command returned 0
Mar 31 21:09 : client 6761: process command "status"
Mar 31 21:09 : client 6761: command returned 0
Mar 31 21:09 : client 6761: process command "close"
Mar 31 21:09 : client 6761: command returned 20
Mar 31 21:09 : client 6761: closed
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Tue Mar 31, 2009 7:26 pm    Post subject: Reply with quote

Based on that error log, the connection to the source client is alive and is reading data from it.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
padvinder



Joined: 31 Mar 2009
Posts: 6

PostPosted: Tue Mar 31, 2009 7:29 pm    Post subject: Reply with quote

Yeah, the music plays and the server streams all right, but it stops on a song change: the client stays connected to the server, but no sound is heard until a manual stop/play. I googled on it and some said it might have to do with headers/changing formats, so that is why I experimented with the audio_output_format setting in mpd.conf, to ensure every song played through icecast is the same format. Doesn't change anything about the problem though.
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Tue Mar 31, 2009 7:43 pm    Post subject: Reply with quote

You have to resolve the source client to icecast part. If the source client is closing the link then you need to find out why it is doing that from mpd, if icecast is seeing a dropped connection then it will report it, but you haven't shown that part of the log.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
5oak



Joined: 06 May 2009
Posts: 3

PostPosted: Wed May 06, 2009 9:51 am    Post subject: Reply with quote

Hi,

I am experiencing the same problems. The only listening client that keeps on playing the stream is foobar2000. Any developments on this issue yet?

Greets,

5oak
Back to top
View user's profile Send private message
padvinder



Joined: 31 Mar 2009
Posts: 6

PostPosted: Wed May 06, 2009 10:12 am    Post subject: Reply with quote

I haven't been able to fix it, really can't find the problem..
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Wed May 06, 2009 12:59 pm    Post subject: Reply with quote

without seeing the log at the time the stops occurs then we cannot help much as your description does not indicate where the problem is exactly. If the stream really has stopped then icecast will report it but so far you haven't said that is actually happening.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
5oak



Joined: 06 May 2009
Posts: 3

PostPosted: Wed May 06, 2009 1:11 pm    Post subject: Reply with quote

karlH wrote:
without seeing the log at the time the stops occurs then we cannot help much as your description does not indicate where the problem is exactly. If the stream really has stopped then icecast will report it but so far you haven't said that is actually happening.

karl.


I don't think it's quite clear what the problem is exactly. I'll try to explain, but of course I'm no expert (I'm also pretty new to linux). Anyways, here it goes:

When a song changes almost all music players (vlc, windows media player, totem, mplayer, etc.) keep playing the stream but there's no sound anymore. So the stream doesn't stop, there's just no sound anymore (on the listening end). Stopping the stream in the music player and starting it again solves the issue, but of course this has to be done after every song change. An exception to this is foobar2000, it keeps playing sound after song changes.

Neither mpd, nor icecast show any errors (as far as I can tell). I have no clue as to what is wrong, but I'm willing to help as much as I can to solve this issue.

Here's a thread that's related:
http://icecast.imux.net/viewtopic.php?t=3969&sid=8633e779bcd69238f69bc8df28e24a67

And another one:
http://icecast.imux.net/viewtopic.php?p=6620&sid=187f2ed2f9008ba91c9dfdade6a1a60f

Greets,

5oak
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Wed May 06, 2009 2:02 pm    Post subject: Reply with quote

If something like curl keeps receiving content over the song change then it's not the X->mpd->icecast part of chain thats stalling. mplayer and vlc here handles new headers just fine, so it's unlikely to be that unless you using a really old version or are changing samplerate/channels between tracks, but then you should not be doing that anyway. Maybe a url is required to demonstrate the issue.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
padvinder



Joined: 31 Mar 2009
Posts: 6

PostPosted: Wed May 06, 2009 2:20 pm    Post subject: Reply with quote

http://pauw.student.utwente.nl:8000/
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Wed May 06, 2009 2:51 pm    Post subject: Reply with quote

padvinder, seems to play ok, both in ogg123 and mplayer.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
5oak



Joined: 06 May 2009
Posts: 3

PostPosted: Mon May 11, 2009 1:53 pm    Post subject: Reply with quote

My stream seems to play OK indeed. I guess the problem is with some of the mediaplayers out there. Foobar, MPlayer (linux) and Winamp play the stream flawlessly, while VLC and Windows Mediaplayer fail...
Back to top
View user's profile Send private message
padvinder



Joined: 31 Mar 2009
Posts: 6

PostPosted: Mon May 11, 2009 2:01 pm    Post subject: Reply with quote

Yeah, I'll just use foobar from now on. It's weird though, because it used to work with VLC also (never did with Windows Mediaplayer).
Back to top
View user's profile Send private message
rcalinjageman



Joined: 29 Jun 2009
Posts: 2

PostPosted: Mon Jun 29, 2009 5:50 am    Post subject: Solved? Reply with quote

I've had the same problem, running mpd/icecast2 on Ubuntu--after several years of successful streaming, a few months ago most clients I tried stopped playing at each track change.

I just did a manual update to mpd 0.15, however, and the problem has gone away. I'm not sure why this helped, but it did.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber