SimpleMediaLibrary is a small, lightweight .NET Blazor (Server) application designed for the management and playback of audio recordings in MP3 format. Although it is primarily used for ATC recording files written to disk by rtl_airband
, it is versatile enough to be used for any MP3 formatted files.
- Automatically adds new MP3 files to the library as they are written to disk
- Enables quick playback of audio recordings directly from the browser
- Allows individual files to be downloaded
- Hosts all files server-side
- .NET Blazor (Server)
- MP3 Audio Playback
- File System Monitoring
- .NET SDK
- Docker (Optional for deployment)
- Any modern web browser (e.g., Chrome, Firefox)
- Clone the repository:
git clone https://github.com/yourusername/SimpleMediaLibrary.git
- Navigate to the project directory:
cd SimpleMediaLibrary
- Restore NuGet packages:
dotnet restore
- Build the project:
dotnet build
- Run the application:
dotnet run
- Open your web browser and go to
http://localhost:5000
- In the appliaion, click the "gear" icon on the app bar and configure the path where the MP3 files are stored. Also change the application name and click "Save"
- Back on the home page, select the date of the recording and click on any file in the table to initiate playback
When deploying with Docker, an SSL certificate in PFX format is required. The path to this certificate is specified in the Docker run command.
-
Open a terminal and navigate to your desired directory, e.g.,
/home/pi/.simple-media/certs
. -
Run the following command to generate a self-signed certificate:
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365
-
When prompted, enter the passphrase for the private key and answer the certificate questions.
-
Combine the private key and the certificate into a single PFX file:
openssl pkcs12 -export -out certificate.pfx -inkey key.pem -in cert.pem
-
You'll be prompted to enter a password for the PFX file. This password will need to be provided in the Docker environment later.
-
Move or ensure the
certificate.pfx
file is in the/home/pi/.simple-media/certs
directory as specified in the Docker run command.
Run the Docker command to start the container:
docker run -d --name mediaplayer \
-v /home/pi/recordings:/app/Data/library \
-v /home/pi/.simple-media/data:/app/Data \
-v /home/pi/.simple-media/certs:/https/cert \
-e ASPNETCORE_Kestrel__Certificates__Default__Path=/https/cert/certificate.pfx \
-e ASPNETCORE_URLS="http://+:80;https://+:443" \
-p 5443:443 \
-p 8080:80 \
--restart unless-stopped \
cloudavionics/player:latest-arm64
We welcome contributions from the community. Please read our contributing guidelines before submitting any changes.
This project is licensed under the MIT License - see the LICENSE.md file for details.