Capture streaming audio from your favorite sources to build a custom podcast stream. This container builds on the php:fpm container to include tools and scripts for capturing streaming audio, transcoding it to HE-AAC, and storing it as a set of HTTP live streams and a podcast.
Three environment variables are exposed to configure StreamShifter:
The recordings and scripts to be served are stored in a named volume. Configure your webserver to serve it under a vhost by whatever means you would configure it to serve php:fpm.
Start the PHP FPM server with something like this:
docker run -d --name streamshifter -e BASEURL=https://streamshifter.alfter.us/ -v streamshifter-data:/var/www/html salfter/streamshifter
To schedule recordings, use the record.sh script in a running container (use docker exec) with four parameters, all required:
Use whatever task scheduler your system provides (crontab, systemd timer unit, etc.) to run the script at the appropriate time. This example saves 10 seconds of the stream from KDWN, a talk-radio station in Las Vegas (streaming URL subject to change at their whim):
docker exec -it streamshifter record.sh 10 test "https://14983.live.streamtheworld.com/KDWNAMAAC.aac?tdsdk=js-2.9&pname=TDSdk&pversion=2.9&banners=320x50&sbmid=ddc0cb91-c9a7-46c4-bf53-85841c22c8e4" Test
There is also a cleanup script you can run periodically that will remove everything more than one week old:
docker exec -it streamshifter cleanup.sh
Container development happens at https://gitlab.com/salfter/streamshifter.
Content type
Image
Digest
sha256:81b2d5ee4…
Size
467.8 MB
Last updated
over 2 years ago
docker pull salfter/streamshifter