A web-based esp32 music player for webradio and mp3/ogg/aac/aac+ files from a local lamp or llmp server.
Sound output comes from a separate VS1053 mp3/aac/ogg/wav decoder breakout board.
You control the music player with a browser on your phone, pc or tablet.
- Supports http, https (insecure mode)/chunked streams.
- Search for web radio stations on radio-browser and save the results to your favorites.
- No need for a display as the interface is completely network based.
- Plays mp3, ogg, aac and aac+ streams.
- Runs on:
esp32
esp32-wrover
esp32-s2
esp32-s3
The interface is kept very simple, a playlist tab on the right and selectable source tabs on the left.
After 30 seconds of inactivity the file info overlay is shown, click on the overlay to hide it or use the info button on the bottom to toggle the overlay.
On this overlay you can also save the current playing search result to the favorites tab with this icon.
eStreamPlayer is written for playback over http(s). What this means is that you will need a (lamp or llmp) webserver to play back your local files.
This is because the esp32 does not speak NFS or SMB which are common ways to share files over a network. Instead eStreamPlayer uses a php script on the server to navigate the music folders. Copy this script to the server to use your music library.
This is totally insecure and should only be used on a trusted LAN!
But if you don't have a local music server you can still use eStreamPlayer to tune in to web radio stations and add your own radio stations to presets and favorites.
- Check and set your options in
platformio.ini
- Add your WiFi credentials to
include/secrets.h
as shown below.
#ifndef SECRETS
#define SECRETS
const char *SSID_NAME= "wifi_network";
const char *SSID_PASSWORD = "wifi_password";
#endif
- On first boot or after a flash erase the fatfs will be formatted. This will take from a couple of seconds up to a minute depending on the size of the filesystem.
You can monitor the boot/formatting progress on the serial port.
Flashing an update will not erase the fatfs data.
Note: Take care to select the same partition table when updating the app otherwise the fatfs partition will be formatted. - Browse to the ip address shown on the serial port.
- A lamp or llmp webstack is required to serve local files. Apache2 and lighttpd were tested and should work.
- The following file headers should be sent for supported filetypes:
MP3
audio/mpeg
OGG
audio/ogg
orapplication/ogg
AAC
audio/aac
AAC+
audio/aacp
With a vanilla LAMP setup this will be the default. - The php script
eSP32_vs1053.php
has to be copied to the root of the music library. The script is fairly version agnostic.
- The free -as in beer- radio-browser.info API is used for the search. The returned data is in the public domain.
See de1.api.radio-browser.info for API information. - The icons are from material.io and are available under Apache2.0 license.
- Reconnecting WebSocket which is available under MIT licence.
- Google Roboto font which is available under Apache2.0 license.
- jQuery 3.4.1 which is available under MIT license.
The Google Roboto font and jQuery are fetched from the net. Your downloads will be tracked by the respective providers for this 'free' data.
MIT License
Copyright (c) 2023 Cellie
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.