PASAP

Play As Soon As Possible

PASAP is an app.bin for the WDLXTV homebrew firmware that, once put into an usb storage connected to the WDTV device, runs in background trying out if a http URL exists and, if yes, plays its stream, be it audio or video.

PASAP was originally written to interact with the MPD music daemon: set an mpd output with the internal HTTP and then plase the WDTV box somewhere else on the LAN, there you go with a remote sound output.

Anyway PASAP can be used for a number of other things, for instance to ship a pre-configured WDTV box anywhere and make it play a stream from the Internet by simply plugging it in connected, be it video or audio.

Usage and compatibility

PASAP only works on a specific hardware configuration: WD HD Live players running B-Rad’s WDLXTV firmware, something artists themselves can afford on the consumer market.

If you have found this page looking for a generic tool to “play as soon as possible” a video, audio or stream on any GNU/Linux/BSD box, then the solution is simpler than it seems: a shell script should be enough, something like this into /etc/rc.local:

#!/usr/bin/env zsh
URL="http://radio.dyne.org:8000/ondarossa.mp3"
PLAYER="mplayer -ao alsa -quiet" # -nocache"
# PLAYER="cvlc -v 0"
while true; do
urlok=0
curl --silent --output /dev/null --head --fail "$URL"
res=$?
if [ $res = 0 ]; then urlok=1; fi
if [ $res = 52 ]; then urlok=1; fi
if [ "$urlok" = "1" ]; then ${=PLAYER} ${URL}; fi
sleep 1
done

Will check every second if a stream is available and if yes play it with the configured program.

Support and warranty

We release PASAP as free and open source (Affero GNU GPL v3) in the hope it will be useful, but WITHOUT ANY WARRANTY. If you use it publicly you should abide to the license and mention the use of this software in the documentation of your exhibition or installation, even if with a short notice as “Running Syncstarter software by Dyne.org“.

If you need help using PASAP, you can hire us for the service, or ask volunteer help and suggestions on the syncstarter community mailinglist.

Free Download

Get it on files.dyne.org/pasap