0

我的网络收音机不工作。

我使用 Debian 9、Icecast 2.4.2 和 Liquidsoap 1.1.1

我用命令启动了网络广播:

/etc/init.d/icecast2 重启

服务liquidsoap重新启动

我打开地址:http://MY_IP:8000/autodj

我在浏览器中遇到错误:404 - 找不到您请求的文件

我在 icecast 日志中遇到错误:“/usr/share/icecast2/web/autodj”没有这样的文件或目录

我的冰播配置(/etc/icecast2/icecast.xml):

<icecast>
<!-- location and admin are two arbitrary strings that are e.g. visible
     on the server info page of the icecast web interface
     (server_version.xsl). -->
<location>Earth</location>
<admin>icemaster@localhost</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>
    <!-- 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>***</source-password>
    <!-- Relays log in with username 'relay' -->
    <relay-password>***</relay-password>

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

<hostname>localhost</hostname>

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

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

<mount>
    <mount-name>/autodj</mount-name>
    <charset>utf-8</charset>
    <username>source</username>
    <password>***</password>
</mount>

<fileserve>1</fileserve>

<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" destination="/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="/" destination="/status.xsl"/>
    <!-- The certificate file needs to contain both public and private part.
         Both should be PEM encoded.
    <ssl-certificate>/usr/share/icecast2/icecast.pem</ssl-certificate>
    -->
</paths>

<logging>
    <accesslog>access.log</accesslog>
    <errorlog>error.log</errorlog>
    <!-- <playlistlog>playlist.log</playlistlog> -->
    <loglevel>3</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>   

我的液体肥皂配置(/etc/liquidsoap/radio.liq):

set("log.file.path", "/var/log/liquidsoap/basic.log")
set("log.stdout", true)
set("log.level",4)

set("tag.encodings",["UTF-8"])

music = mksafe(playlist("/etc/liquidsoap/music"))

output.icecast(%vorbis(bytes_per_page=1024),
host="localhost", 
port=8000, 
password="***",
mount="autodj", 
music)

冰播日志:

[2021-06-26  20:04:06] INFO sighandler/_sig_die Caught signal 15, shutting down...
[2021-06-26  20:04:06] INFO main/main Shutting down
[2021-06-26  20:04:06] INFO fserve/fserve_shutdown file serving stopped
[2021-06-26  20:04:07] INFO slave/_slave_thread shutting down current relays
[2021-06-26  20:04:07] INFO slave/_slave_thread Slave thread shutdown complete
[2021-06-26  20:04:07] INFO auth/auth_shutdown Auth shutdown
[2021-06-26  20:04:07] INFO yp/yp_shutdown YP thread down
[2021-06-26  20:04:08] INFO stats/stats_shutdown stats thread finished
[2021-06-26  20:04:08] INFO main/main Icecast 2.4.2 server started
[2021-06-26  20:04:08] INFO connection/get_ssl_certificate No SSL capability
[2021-06-26  20:04:08] INFO yp/yp_update_thread YP update thread started
[2021-06-26  20:04:29] INFO connection/_handle_source_request Source logging in at mountpoint "/autodj" from 127.0.0.1
[2021-06-26  20:04:29] INFO source/get_next_buffer End of Stream /autodj
[2021-06-26  20:04:29] INFO source/source_main listener count on /autodj now 0
[2021-06-26  20:04:29] INFO source/source_shutdown Source from 127.0.0.1 at "/autodj" exiting
[2021-06-26  20:05:45] INFO fserve/fserve_client_create checking for file /style.css (/usr/share/icecast2/web/style.css)
[2021-06-26  20:05:46] INFO fserve/fserve_client_create checking for file /favicon.ico (/usr/share/icecast2/web/favicon.ico)
[2021-06-26  20:05:46] WARN fserve/fserve_client_create req for file "/usr/share/icecast2/web/favicon.ico" No such file or directory
[2021-06-26  20:05:46] INFO fserve/fserve_client_create checking for file /icecast.png (/usr/share/icecast2/web/icecast.png)
[2021-06-26  20:07:10] INFO fserve/fserve_client_create checking for file /autodj (/usr/share/icecast2/web/autodj)
[2021-06-26  20:07:10] WARN fserve/fserve_client_create req for file "/usr/share/icecast2/web/autodj" No such file or directory

原木液皂:

2021/06/26 20:04:29 >>> LOG START
2021/06/26 20:04:29 [protocols.external:3] Found "/usr/bin/wget".
2021/06/26 20:04:29 [main:3] Liquidsoap 1.1.1
2021/06/26 20:04:29 [main:3] Using: graphics=[distributed with Ocaml] pcre=7.2.3 dtools=0.3.1 duppy=0.5.1 duppy.syntax=0.5.1 cry=0.2.2 mm=0.2.1 xmlplaylist=0.1.3 lastfm=0.3.0 ogg=0.4.5 vorbis=0.6.1 opus=0.1.0 speex=0.2.0 mad=0.4.4 flac=0.1.1 flac.ogg=0.1.1 dynlink=[distributed with Ocaml] lame=0.3.2 shine=0.2.0 gstreamer=0.2.0 frei0r=0.1.0 voaacenc=0.1.0 theora=0.3.0 gavl=0.1.5 bjack=0.1.4 alsa=0.2.1 ao=0.2.0 samplerate=0.1.2 taglib=0.3.1 magic=0.7.3 camomile=0.8.4 inotify=1.0 faad=0.3.2 soundtouch=0.1.7 portaudio=0.2.0 pulseaudio=0.1.2 ladspa=0.1.4 dssi=0.1.1 sdl=0.9.1 camlimages=4.2.0 lo=0.1.0 yojson=1.3.2 gd=1.0a5
2021/06/26 20:04:29 [dynamic.loader:3] Could not find dynamic module for fdkaac encoder.
2021/06/26 20:04:29 [dynamic.loader:3] Could not find dynamic module for aacplus encoder.
2021/06/26 20:04:29 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/flac.cmxs.
2021/06/26 20:04:29 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/lame.cmxs.
2021/06/26 20:04:29 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/pulseaudio.cmxs.
2021/06/26 20:04:29 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/faad.cmxs.
2021/06/26 20:04:29 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/ogg.cmxs.
2021/06/26 20:04:29 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/cry.cmxs.
2021/06/26 20:04:29 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/voaacenc.cmxs.
2021/06/26 20:04:29 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/mad.cmxs.
2021/06/26 20:04:29 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/taglib.cmxs.
2021/06/26 20:04:29 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/flac_ogg.cmxs.
2021/06/26 20:04:29 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/vorbis.cmxs.
2021/06/26 20:04:29 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master.
2021/06/26 20:04:29 [frame:3] Frame size must be a multiple of 1764 ticks = 1764 audio samples = 1 video samples.
2021/06/26 20:04:29 [frame:3] Targetting 'frame.duration': 0.04s = 1764 audio samples = 1764 ticks.
2021/06/26 20:04:29 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video samples = 1764 ticks.
2021/06/26 20:04:29 [video.converter:4] Couldn't find preferred video converter: gavl.
2021/06/26 20:04:29 [audio.converter:4] Couldn't find preferred samplerate converter: libsamplerate.
2021/06/26 20:04:29 [audio.converter:4] Using native samplerate converter
2021/06/26 20:04:29 [threads:3] Created thread "generic queue #1".
2021/06/26 20:04:29 [threads:3] Created thread "generic queue #2".
2021/06/26 20:04:29 [threads:3] Created thread "non-blocking queue #1".
2021/06/26 20:04:29 [threads:3] Created thread "non-blocking queue #2".
2021/06/26 20:04:29 [clock:4] Currently 1 clocks allocated.
2021/06/26 20:04:29 [clock.wallclock_main:4] Starting 1 sources...
2021/06/26 20:04:29 [source:4] Source output.icecast_4966 gets up.
2021/06/26 20:04:29 [source:4] Source mksafe gets up.
2021/06/26 20:04:29 [source:4] Source playlist_4962 gets up.
2021/06/26 20:04:29 [music:3] Loading playlist...
2021/06/26 20:04:29 [music:3] Playlist is a directory.
2021/06/26 20:04:29 [music:3] Successfully loaded a playlist of 4 tracks.
2021/06/26 20:04:29 [music:4] Content kind is {audio=2;video=0;midi=0}.
2021/06/26 20:04:29 [music:4] Activations changed: static=[], dynamic=[mksafe:autodj:autodj].
2021/06/26 20:04:29 [source:4] Source safe_blank gets up.
2021/06/26 20:04:29 [safe_blank:4] Content kind is {audio=2;video=0;midi=0}.
2021/06/26 20:04:29 [safe_blank:4] Activations changed: static=[], dynamic=[mksafe:autodj:autodj].
2021/06/26 20:04:29 [mksafe:4] Activations changed: static=[autodj:autodj], dynamic=[].
2021/06/26 20:04:29 [autodj:4] Activations changed: static=[autodj], dynamic=[].
2021/06/26 20:04:29 [autodj:4] Enabling caching mode: active source.
2021/06/26 20:04:29 [autodj:3] Connecting mount autodj for source@localhost...
2021/06/26 20:04:29 [decoder:4] Trying method "META" for "/etc/liquidsoap/music/3.mp3"...
2021/06/26 20:04:29 [decoder:4] Trying method "WAV" for "/etc/liquidsoap/music/3.mp3"...
2021/06/26 20:04:29 [decoder.wav:4] Invalid MIME type for "/etc/liquidsoap/music/3.mp3": audio/mpeg!
2021/06/26 20:04:29 [decoder.wav:4] Invalid file extension for "/etc/liquidsoap/music/3.mp3"!
2021/06/26 20:04:29 [decoder:4] Trying method "MIDI" for "/etc/liquidsoap/music/3.mp3"...
2021/06/26 20:04:29 [decoder:4] Trying method "IMAGE" for "/etc/liquidsoap/music/3.mp3"...
2021/06/26 20:04:29 [decoder:4] Trying method "FLAC" for "/etc/liquidsoap/music/3.mp3"...
2021/06/26 20:04:29 [decoder.flac:4] Invalid MIME type for "/etc/liquidsoap/music/3.mp3": audio/mpeg!
2021/06/26 20:04:29 [decoder.flac:4] Invalid file extension for "/etc/liquidsoap/music/3.mp3"!
2021/06/26 20:04:29 [decoder:4] Trying method "AAC" for "/etc/liquidsoap/music/3.mp3"...
2021/06/26 20:04:29 [decoder.aac:4] Invalid MIME type for "/etc/liquidsoap/music/3.mp3": audio/mpeg!
2021/06/26 20:04:29 [decoder.aac:4] Invalid file extension for "/etc/liquidsoap/music/3.mp3"!
2021/06/26 20:04:29 [decoder:4] Trying method "MP4" for "/etc/liquidsoap/music/3.mp3"...
2021/06/26 20:04:29 [decoder.mp4:4] Invalid MIME type for "/etc/liquidsoap/music/3.mp3": audio/mpeg!
2021/06/26 20:04:29 [decoder.mp4:4] Invalid file extension for "/etc/liquidsoap/music/3.mp3"!
2021/06/26 20:04:29 [decoder:4] Trying method "OGG" for "/etc/liquidsoap/music/3.mp3"...
2021/06/26 20:04:29 [decoder.ogg:4] Invalid MIME type for "/etc/liquidsoap/music/3.mp3": audio/mpeg!
2021/06/26 20:04:29 [decoder.ogg:4] Invalid file extension for "/etc/liquidsoap/music/3.mp3"!
2021/06/26 20:04:29 [autodj:3] Connection setup was successful.
2021/06/26 20:04:29 [decoder:4] Trying method "MAD" for "/etc/liquidsoap/music/3.mp3"...
2021/06/26 20:04:29 [threads:3] Created thread "wallclock_main" (1 total).
2021/06/26 20:04:29 [clock:4] Main phase starts.
2021/06/26 20:04:29 [clock.wallclock_main:3] Streaming loop starts, synchronized with wallclock.
2021/06/26 20:04:29 [decoder.mad:4] Libmad recognizes "/etc/liquidsoap/music/3.mp3" as mpeg audio (layer III, 192kbps, 44100Hz, 2 channels).
2021/06/26 20:04:29 [decoder:3] Method "MAD" accepted "/etc/liquidsoap/music/3.mp3".
2021/06/26 20:04:29 [metadata.flac:4] Invalid MIME type for "/etc/liquidsoap/music/3.mp3": audio/mpeg!
2021/06/26 20:04:29 [metadata.flac:4] Invalid file extension for "/etc/liquidsoap/music/3.mp3"!
2021/06/26 20:04:29 [metadata.mp4:4] Invalid MIME type for "/etc/liquidsoap/music/3.mp3": audio/mpeg!
2021/06/26 20:04:29 [metadata.mp4:4] Invalid file extension for "/etc/liquidsoap/music/3.mp3"!
2021/06/26 20:04:29 [decoder.ogg:4] Invalid MIME type for "/etc/liquidsoap/music/3.mp3": audio/mpeg!
2021/06/26 20:04:29 [decoder.ogg:4] Invalid file extension for "/etc/liquidsoap/music/3.mp3"!
4

1 回答 1

0

我试过 Debian 10 和 Liquidsoap 2.0.0

它工作正常

于 2021-06-29T17:30:51.843 回答