Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After few tracks, browser says "media could not be decoded" (streaming mp3's with ezstream and icecast2) #44

Open
vicmortelmans opened this issue Mar 14, 2024 · 0 comments

Comments

@vicmortelmans
Copy link

Hi,

I have a very basic setup with icecast2 and ezstream to stream a set of mp3 files (24/7 in random order).

When playing the stream in a browser, it will play a few tracks and then, appearantly random, stop on this error.

Media resource http://radio.jezus-hart.be/play could not be decoded, error: Error Code: NS_ERROR_DOM_MEDIA_DECODE_ERR (0x806e0004)
Details: virtual MediaResult __thiscall mozilla::FFmpegAudioDecoder<46465650>::DoDecode(MediaRawData *, uint8_t *, int, bool *, DecodedData &): FFmpeg audio error

It plays a few tracks and then stops when starting a new track.

I've tested opening the stream in multiple browsers and VLC and they stop at the same time.

The streaming server keeps running, so refreshing the page continues playback.

I thought perhaps some of the mp3's were faulty, but I've re-encoded all of them with constant bitrate, and that didn't change the problem.

re-encoding didn't work:
ffmpeg -i xxxx.mp3 -codec:a libmp3lame -b:a 128k xxxx.cbr.mp3

So I suspect the problem is with ezstream or with icecast2?

ezstream config file:

<ezstream>

  <servers>
    <server>
      <hostname>127.0.0.1</hostname>
      <port>8001</port>
      <password>******</password>
    </server>
  </servers>

  <streams>
    <stream>
      <mountpoint>/play</mountpoint>
      <format>MP3</format>
    </stream>
  </streams>

  <intakes>
    <intake>
      <type>playlist</type>
          <shuffle>1</shuffle>
      <filename>/home/vps/radio/playlist_mp3.txt</filename>
    </intake>
  </intakes>

</ezstream>

icecast2 config file:

<icecast>
    <location>Antwerpen</location>
    <admin>*****</admin>

    <limits>
        <clients>100</clients>
        <sources>2</sources>
        <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>****</source-password>
        <relay-password>****</relay-password>

        <admin-user>admin</admin-user>
        <admin-password>****</admin-password>
    </authentication>

    <hostname>radio.jezus-hart.be</hostname>

    <listen-socket>
        <port>8001</port>
    </listen-socket>
    <http-headers>
        <header name="Access-Control-Allow-Origin" value="*" />
    </http-headers>

    <fileserve>1</fileserve>

    <paths>
        <basedir>/usr/share/icecast2</basedir>

        <logdir>/var/log/icecast2</logdir>
        <webroot>/usr/share/icecast2/web</webroot>
        <adminroot>/usr/share/icecast2/admin</adminroot>
        <alias source="/" destination="/status.xsl"/>
    </paths>

    <logging>
        <accesslog>access.log</accesslog>
        <errorlog>error.log</errorlog>
        <loglevel>4</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
        <logsize>10000</logsize> <!-- Max size of a logfile -->
    </logging>

    <security>
        <chroot>0</chroot>
    </security>
</icecast>

This is from the icecast2 error.log at the point where the playback stops in the browser, but these messages appear each time a new track is strated, also when playback continues correctly:

[2024-03-14  15:33:24] EROR connection/_handle_connection HTTP request parsing failed
[2024-03-14  15:33:24] DBUG admin/admin_handle_request Admin request (/admin/!POKE)
[2024-03-14  15:33:24] DBUG admin/admin_handle_request Got command (!POKE)
[2024-03-14  15:33:24] EROR admin/admin_handle_request Error parsing command string or unrecognised command: !POKE
[2024-03-14  15:33:24] DBUG fserve/fserve_add_client Adding client to file serving engine
[2024-03-14  15:33:24] DBUG fserve/fserve_add_pending fserve handler waking up
[2024-03-14  15:33:24] DBUG admin/admin_handle_request Admin request (/admin/metadata)
[2024-03-14  15:33:24] DBUG admin/admin_handle_request Got command (metadata)
[2024-03-14  15:33:24] INFO admin/admin_handle_request Bad or missing password on mount modification admin request (command: metadata)
[2024-03-14  15:33:24] DBUG fserve/fserve_add_client Adding client to file serving engine
[2024-03-14  15:33:24] DBUG admin/admin_handle_request Admin request (/admin/metadata)
[2024-03-14  15:33:24] DBUG admin/admin_handle_request Got command (metadata)
[2024-03-14  15:33:24] INFO admin/admin_handle_request Received admin command metadata on mount "/play"
[2024-03-14  15:33:24] DBUG admin/command_metadata Got metadata update request
[2024-03-14  15:33:24] INFO util/util_conv_string converting metadata from UTF-8 to ISO8859-1
[2024-03-14  15:33:24] INFO admin/command_metadata Metadata on mountpoint /play changed to "Kyrie - David.cbr"
[2024-03-14  15:33:24] DBUG fserve/fserve_add_client Adding client to file serving engine
[2024-03-14  15:33:24] DBUG format-mp3/mp3_set_title shoutcast metadata block setup with StreamTitle='Kyrie - David.cbr';
[2024-03-14  15:33:24] DBUG fserve/fserv_thread_function fserve handler exit
[2024-03-14  15:33:25] DBUG stats/modify_node_event update global clients (4)
[2024-03-14  15:33:25] DBUG stats/modify_node_event update global connections (288)
[2024-03-14  15:33:25] DBUG stats/modify_node_event update global clients (3)
[2024-03-14  15:33:25] DBUG stats/modify_node_event update global clients (4)
[2024-03-14  15:33:25] DBUG stats/modify_node_event update global connections (289)
[2024-03-14  15:33:25] DBUG stats/modify_node_event update global client_connections (217)
[2024-03-14  15:33:25] DBUG stats/modify_node_event update global clients (5)
[2024-03-14  15:33:25] DBUG stats/modify_node_event update global connections (290)
[2024-03-14  15:33:25] DBUG stats/modify_node_event update global client_connections (218)
[2024-03-14  15:33:25] DBUG stats/modify_node_event update global clients (6)
[2024-03-14  15:33:25] DBUG stats/modify_node_event update global connections (291)
[2024-03-14  15:33:25] DBUG stats/modify_node_event update global client_connections (219)
[2024-03-14  15:33:25] DBUG stats/modify_node_event update global clients (5)
[2024-03-14  15:33:25] DBUG stats/modify_node_event update "/play" title (Kyrie - David.cbr)
[2024-03-14  15:33:25] DBUG stats/modify_node_event update global clients (4)
[2024-03-14  15:33:25] DBUG stats/modify_node_event update global clients (3)

The output of ezstream just says Streaming ... with the name of the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant