Topic: How to make chumby play any stream
Chumby's ability to play audio streams has been deteriorating over the years due to the changes in encryption and streaming formats.
I posted about dealing with the encryption earlier in http://forum.chumby.com/viewtopic.php?id=9953 but it doesn't address the audio format problems.
The solution requires a web server able to execute cgi-bin scripts and ffmpeg to repack the audio streams. It is also possible to convert the audio to a different format - mp3 - but it is much more expensive (about 30x) and not necessary unless you are using dash.
Here is a cgi-bin script to repack audio from e.g HLS stream into something chumby can play:
#!/bin/bash
# /cgi-bin/repack
# repack HLS/AAC stream
# Query string must begin with http(s)://
if [ "${QUERY_STRING:0:8}" == "https://" -o "${QUERY_STRING:0:7}" == "http://" ]; then
# change accordingly to the the stream content(maybe?)
# it seems CC is able to auto detect(?)
echo Content-Type: audio/aac
echo
exec 2>/dev/null
exec /usr/bin/ffmpeg -hide_banner -loglevel warning -nostdin -i "$QUERY_STRING" -vn -acodec copy -f adts -
# to convert to mp3 change also the header Content-type to audio/mpeg
#ffmpeg -hide_banner -loglevel warning -nostdin -i "$QUERY_STRING" -vn -acodec libmp3lame -f mp3 -
fi
The script discards the video from the stream so it should be possible to play audio from video streams.
Now if you want to listen to audio from an audio/video stream at URL you can put http://your_server_ip:port/cgi-bin/repack?URL in chumby to play it.