Why stream intelligence was needed.
The first NGINX solution had one decisive advantage: it was simple. The SoundBridge received a local HTTP endpoint, while NGINX handled the HTTPS connection to the actual stream in the background. For many streams, this approach worked extremely well.
Over time, however, it became clear that a pure HTTPS-to-HTTP proxy had its limitations. An audio stream is not just audio data. Internet radio streams often carry additional information such as station name, genre, bitrate, and the currently playing track through ICY metadata. Streaming servers also do not all behave the same way: some URLs are simply redirects, some only deliver the actual stream after several HTTP steps, while others use different headers or stream formats.
This is where the second version of the POWERSSBWIZ SoundBridge Wizard came in. Instead of simply passing the connection between the SoundBridge and the radio station through, the Wizard could analyze the stream itself and, when necessary, prepare it specifically for the SoundBridge.
From a simple proxy to a stream-aware relay.
The new version was therefore no longer implemented purely as an NGINX configuration, but as its own small streaming service. The application runs in a Docker container and is based on Python 3.12. In addition, FFmpeg and the required CA certificates are installed inside the container.
This allows the POWERSSBWIZ SoundBridge Wizard to use different approaches depending on the source.
First, the requested stream URL is analyzed and the SoundBridge Wizard attempts to open the stream directly as an ICY stream.
That is an important difference from the original NGINX solution.
ICY metadata.
A traditional Internet radio stream can transmit additional ICY information alongside the actual audio data. The POWERSSBWIZ SoundBridge Wizard explicitly requests this information using the header
Icy-MetaData: 1During the connection, it can process information such as the station name, genre, bitrate, and the interval at which metadata is transmitted.
The most important piece of information, however, is the actual track title.
ICY metadata can contain a value such as StreamTitle. The SoundBridge Wizard can extract this metadata from the live stream and use it to determine the currently playing track. The corresponding function parses the ICY metadata and extracts the individual keys and values.
The POWERSSBWIZ SoundBridge Wizard can then package the detected title back into ICY metadata. It creates a corresponding StreamTitle field and sends it to the client as ICY metadata.
The result is more than just a working audio stream: the relevant radio metadata can remain available to the SoundBridge as well.
Keeping the SoundBridge informed.
The POWERSSBWIZ SoundBridge Wizard also includes its own integrated web interface. It is part of the Python service itself and does not require a separate web server.
The interface is available at the root address of the service:
http://<PUBLIC_HOST>:8777/With the configuration used for this project, for example:
http://192.168.69.222:8777/The web interface displays the current state of the SoundBridge Wizard, including:
Status
Mode
Station
Genre
Bitrate
Now playing
The display automatically updates every two seconds through the status API.
This makes it possible to see directly in a browser whether the Wizard is running, which mode it is using, which station has been detected, and what track is currently playing.
The POWERSSBWIZ SoundBridge Wizard also provides a JSON API at /api/status. It returns information including:
status
mode
source
resolved_source
station
genre
bitrate
now_playingThe endpoint can be accessed directly, for example:
http://192.168.1.1:87777/api/statusFor an additional service check, there is also a /health endpoint:
http://192.168.1.1:87777/healthThese URLs are also printed by the v when the service starts.
No ICY - no problem!
Of course, not every stream provides the expected ICY metadata structure. The POWERSSBWIZ SoundBridge Wizard therefore does not rely exclusively on ICY.
When the source stream cannot be processed directly this way, FFmpeg provides an alternative processing path.
FFmpeg opens the source stream and converts the audio into a standardized MP3 stream for the SoundBridge.
The SoundBridge Wizard also uses automatic reconnect options. If the connection to the source server drops or reaches the end of the stream, FFmpeg can attempt to reconnect. Among other options, the Wizard uses -reconnect, -reconnect_streamed, -reconnect_at_eof, and a maximum reconnect delay.
This makes the second solution considerably more flexible than a pure HTTP/HTTPS proxy. The source no longer has to provide audio in exactly the format the SoundBridge can handle directly. The POWERSSBWIZ SoundBridge Wizard can process the stream through FFmpeg first and then output it in a format suitable for the SoundBridge.
A common output for the SoundBridge.
In FFmpeg mode, the audio is output as MP3 at 128 kbps, 44.1 kHz, stereo.
This effectively shields the SoundBridge from many of the details and inconsistencies of modern streaming servers.
For the SoundBridge, the connection remains simple:
SoundBridge → HTTP → SoundBridge Wizard → Internet streamBehind the scenes, however, the POWERSSBWIZ SoundBridge Wizard can work considerably harder:
SoundBridge → HTTP → SoundBridge Wizard → HTTPS / ICY / FFmpeg → Internet RadioThat additional processing capability is what sets the new solution apart from the original version.
The stream endpoint.
The actual stream is provided through a dedicated HTTP endpoint:
/powerssbwiz/<stream-url>This endpoint is also displayed when the POWERSSBWIZ SoundBridge Wizard starts.
The Wizard accepts both http:// and https:// source URLs. The supplied URL is extracted from the request and then processed by the SoundBridge Wizard.
This allows the SoundBridge to connect to a simple local HTTP stream while the SoundBridge Wizard handles the connection to the actual Internet stream in the background and, depending on the source and processing path, prepares the audio accordingly.
The POWERSSBWIZ SoundBridge Wizard therefore acts as an intermediary between legacy streaming hardware and today's streaming servers.
Docker and Portainer.
The technical implementation was also made more flexible.
The complete POWERSSBWIZ SoundBridge Wizard runs in its own Docker container. The container image is based on python:3.12-slim. When the container starts, FFmpeg and CA certificates are installed, after which the Python service is launched.
Configuration is handled through a .env file. It defines the various parameters for the container and its network environment:
CONTAINER_NAME – the Docker container name
HTTP_PORT – the external HTTP port
TZ – the time zone
PUBLIC_HOST – the host's IP address or hostname
DNS_PRIMARY – the primary DNS server
DNS_SECONDARY – the secondary DNS server
The .env file therefore covers not only the basic container parameters but also the DNS configuration used by the network environment.
The external HTTP port is mapped by Docker to the container's internal port 8777.
The advantage of this approach is that the SoundBridge Wizard can run independently of the host system itself. Python, FFmpeg, and the application are all contained within the Docker environment. The host therefore does not need a separate Python environment or additional application dependencies.
For administration, I use Portainer. This is not a requirement, however. The container can just as easily be managed through Docker or Docker Compose from the command line.
For a home server, Portainer is particularly convenient: containers can be started, stopped, recreated, and monitored through a graphical interface, while the actual configuration remains cleanly defined through Docker Compose and the .env file.
Conclusion.
The project has therefore evolved considerably from the original NGINX solution.
The first version primarily solved one specific problem:
HTTPS on the modern side, HTTP on the SoundBridge side.
The second version goes a step further. It can analyze the stream itself, process ICY metadata, handle station information and StreamTitle, and use FFmpeg as an alternative processing path when necessary.
It also adds an integrated web interface, a status API, and a dedicated health endpoint, making it possible to monitor the streaming process directly from a browser.
What started as a simple proxy has therefore become a small streaming relay specifically designed around the requirements of the SoundBridge.
And that was ultimately the goal: the SoundBridge should not have to know how the modern Internet has changed. It should simply continue playing music - while the POWERSSBWIZ SoundBridge Wizard takes care of making today's streams understandable to hardware that is now more than twenty years old.
Check out this SoundBridge blog post too
Do you have any recommendations or personal guidelines that you find helpful?
Please feel free to comment and share your thoughts on “Roku SoundBridge – Making the SoundBridge Wizard smarter”.
If you like my work or the free stuff and want to say thank you, please use this opportunity now and
THANK YOU, very much! 🙏🏻
If you have any questions, please drop me a message!