Feature: AAC-Support und Bitrate auf Radiomaximum angepasst
Busch-Radio iNet 8216 U unterstützt max. 192 kbps und die Formate MP3, AAC und OGG. Neue Konfigurationsoptionen: - stream_format: mp3 (Standard) oder aac - bitrate: 96/128/160/192 kbps (max. des Radios) Default auf 160 kbps MP3 geändert (war 320 kbps – über Radio-Maximum). Stream-URL im Log zeigt jetzt die echte HA-IP statt Platzhalter. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@ slug: busch_radio_spotify
|
||||
description: >
|
||||
Streamt Spotify-Musik als Internet-Radio-Stream für das Busch-Jäger Unterputz-Internetradio.
|
||||
Das Add-on erzeugt ein virtuelles Spotify Connect-Gerät (via librespot) und stellt das Audio
|
||||
als MP3-Stream über Icecast bereit.
|
||||
als MP3- oder AAC-Stream über Icecast bereit.
|
||||
url: "https://gitea.bitfire.work/retr0/Busch-Radio-Spotify"
|
||||
arch:
|
||||
- aarch64
|
||||
@@ -22,14 +22,16 @@ host_network: true
|
||||
# ---- Konfigurationsoptionen ----
|
||||
options:
|
||||
device_name: "Busch-Radio"
|
||||
bitrate: 320
|
||||
bitrate: 160
|
||||
stream_format: "mp3"
|
||||
stream_port: 8000
|
||||
stream_mount: "/stream.mp3"
|
||||
stream_mount: "/stream"
|
||||
icecast_password: "busch-radio-geheim"
|
||||
|
||||
schema:
|
||||
device_name: str
|
||||
bitrate: "list(96|160|320)"
|
||||
bitrate: "list(96|128|160|192)"
|
||||
stream_format: "list(mp3|aac)"
|
||||
stream_port: port
|
||||
stream_mount: str
|
||||
icecast_password: str
|
||||
|
||||
@@ -15,15 +15,28 @@ set -u
|
||||
# ── Konfiguration lesen ───────────────────────────────────────────────────────
|
||||
DEVICE_NAME=$(bashio::config 'device_name')
|
||||
BITRATE=$(bashio::config 'bitrate')
|
||||
STREAM_FORMAT=$(bashio::config 'stream_format')
|
||||
STREAM_PORT=$(bashio::config 'stream_port')
|
||||
STREAM_MOUNT=$(bashio::config 'stream_mount')
|
||||
ICECAST_PASSWORD=$(bashio::config 'icecast_password')
|
||||
|
||||
# ── Format-spezifische Einstellungen ──────────────────────────────────────────
|
||||
if [ "${STREAM_FORMAT}" = "aac" ]; then
|
||||
FFMPEG_CODEC="aac"
|
||||
FFMPEG_FORMAT="adts"
|
||||
ICECAST_MIME="audio/aac"
|
||||
else
|
||||
FFMPEG_CODEC="libmp3lame"
|
||||
FFMPEG_FORMAT="mp3"
|
||||
ICECAST_MIME="audio/mpeg"
|
||||
fi
|
||||
|
||||
bashio::log.info "╔══════════════════════════════════════════════╗"
|
||||
bashio::log.info "║ Busch-Radio Spotify Bridge v1.0.0 ║"
|
||||
bashio::log.info "║ Busch-Radio Spotify Bridge v1.0.9 ║"
|
||||
bashio::log.info "╚══════════════════════════════════════════════╝"
|
||||
bashio::log.info "Gerätename : ${DEVICE_NAME}"
|
||||
bashio::log.info "Bitrate : ${BITRATE} kbps"
|
||||
bashio::log.info "Format : ${STREAM_FORMAT}"
|
||||
bashio::log.info "Stream-Port : ${STREAM_PORT}"
|
||||
bashio::log.info "Stream-Pfad : ${STREAM_MOUNT}"
|
||||
|
||||
@@ -88,7 +101,7 @@ cat > /tmp/busch-radio/icecast.xml <<ICECAST_EOF
|
||||
<stream-name>Busch-Radio Spotify Bridge</stream-name>
|
||||
<stream-description>Spotify via Home Assistant</stream-description>
|
||||
<bitrate>${BITRATE}</bitrate>
|
||||
<type>audio/mpeg</type>
|
||||
<type>${ICECAST_MIME}</type>
|
||||
</mount>
|
||||
|
||||
<fileserve>1</fileserve>
|
||||
@@ -199,7 +212,7 @@ ICECAST_SOURCE_URL="icecast://source:${ICECAST_PASSWORD}@localhost:${STREAM_PORT
|
||||
# ── Stream-URL ausgeben ───────────────────────────────────────────────────────
|
||||
bashio::log.info "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
bashio::log.info "Stream-URL für das Busch-Jäger Radio:"
|
||||
bashio::log.info " http://<homeassistant-ip>:${STREAM_PORT}${STREAM_MOUNT}"
|
||||
bashio::log.info " http://${HA_IP}:${STREAM_PORT}${STREAM_MOUNT}"
|
||||
bashio::log.info ""
|
||||
bashio::log.info "Icecast-Statusseite:"
|
||||
bashio::log.info " http://<homeassistant-ip>:${STREAM_PORT}"
|
||||
@@ -239,10 +252,9 @@ while true; do
|
||||
-loglevel warning \
|
||||
-f s16le -ar 44100 -ac 2 \
|
||||
-i pipe:0 \
|
||||
-codec:a libmp3lame \
|
||||
-codec:a "${FFMPEG_CODEC}" \
|
||||
-b:a "${BITRATE}k" \
|
||||
-q:a 2 \
|
||||
-f mp3 \
|
||||
-f "${FFMPEG_FORMAT}" \
|
||||
"${ICECAST_SOURCE_URL}" \
|
||||
|| true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user