Over the winter of 2017-2018 a team of acoustic experts, hardware geeks, and software developers have been working to realize the goal of the 2017 Kickstarter. Paul, Steve, Skander, Ty, Val, and I have been busy sorting through a dizzying array of cool new hardware options and potential software solutions, seeking the optimal combination. We’ve hit some roadblocks along the way, but are very excited about the solution that we’re now alpha-testing!
Our goal remains clear — create a new way to stream live ocean audio — from hydrophone to headphone — that “just works” on any browser/device combination and scales beyond the historic limits of 20-50 simultaneous listeners. Of course, as with most cutting-edge technological innovations, the devil is in the details!
Without going into too much nitty-gritty, in this update I want to show you where we’ve ended up. Along the way, I’ll explain recent shifts in Internet streaming technology and how we see Orcasound fitting in, not only as a user and advocate for open-source software, but also as a contributor (through the Orcasound Git repositories).
Where we’ve been
When we first started streaming live data from Orcasound hydrophones more than a decade ago, we used a big desktop computer running Windows XP and proprietary, but free software (WinAmp with the Shoutcast plugin). Depending on the hydrophones — which typically cost $500-5000 each, there was more hardware next to the PC — external sound boards, power supplies, isolation amplifiers, etc. The Shoutcast stream was replicated by a company in Texas, allowing up to 20 folks to listen to the audio stream for about $1/person/month.
Most folks got the live MP3-encoded stream to work with iTunes or WinAmp, but many struggled to find the right software to listen live on their computers… and then tablets… and then phones. The main complaints from listeners and network members over the years have remained: (1) I can’t get the stream to “just work” on my new or updated device; (2) all the listening “seats” are occupied just when my friend told me the whales sounds were really great; and (3) all this clunky hydrophone hardware is hard to set up and expensive to maintain.
Where we’re at
Thanks to the 2017 Kickstarter, we’ve been able to step back and look at the full range of technological solutions currently available for streaming live audio from the ocean to your ears — from hydrophone to headphone. The good news is that many new tools and technologies have emerged, including software that is often open-source — free for using and improving. The bad news is that we had so many choices that it took us longer than expected to find an optimal solution — one that would ideally alleviate all those key complaints.
For example, the list of single-board computers that could replace our old, clunky PCs is really long, so we ended up looking closely at Arduino, Beaglebone, Udoo, and Raspberry Pi devices. Each one has its own audio capabilities, or ones that can be added to it, as well as constraints on what software will run easily on it…
We’ve ended up choosing the following components for Orcasound 2.0 — a completely new way to listen to the oceans:
- A DIY dual-hydrophone stand that costs <$50 and can be deployed and recovered from a small boat by 1-2 people
- Hydrophones [~$300] that plug into a bias-power (~6V) jack, so they don’t require their own power supply
- A few convenient cables and jacks [$15]
- The Pisound audio HAT (from Lithuania!) [$125], capable of sampling 2 hydrophones at 192,000 samples per second — so that we can record the full range of killer whale calls and whistles, and most of their echolocation frequencies
- The Raspberry Pi 3 single-board computer [$35], running the ultimate open-source operating system: Linux (Raspian)
- Open-source software (ffmpeg and/or test-engine-engine-tools) that encodes the audio data using two emerging but still competing HTTP-based protocols: for cost-effective data storage, access, and management with the upload currently handled by s3fs.
- An inexpensive waterproof box [$20] — so we can keep the electronics as close to the ocean as possible, without having to struggle with the corrosion and failures that often occur when you immerse them in salt water
- Power over ethernet (POE) injectors compatible with Raspberry Pis [$15]– so we need fewer wires running from a structure with Internet access down to our hydrophones in the ocean
- A UPS (uninterruptible power supply) [$40] — to keep a host’s router & the POE-computer power going through outages which commonly occur in remote hydrophone locations
(If you’re curious to see more of this hardware and our tests of it, check out the Google photo album of Orcasound node hardware.)
Once the ocean sounds have made it to a server on the Internet, the next big task is to get them to play on the ever-increasing galaxy of devices, operating systems, and apps. Paul led the way quickly to the HLS or DASH protocols and multiple advisors agreed we should develop a web app — software that is hosted on the web and runs in the browser on any given device — rather than native applications for specific devices. Again there were a LOT of choices and we tried many of them, but have ended up with this tech stack:
- Raspian-based ffmpeg and s3fs generate compressed lossy (HLS or DASH) files, and optionally lossless FLAC files
- Data are stored in an AWS S3 bucket specific to each hydrophone node — from which as many streams as necessary can be provided via HTTP (and from which continuous lossless recordings from the previous month will be accessible)
- Heroku-hosted web site are implemented in Phoenix/Elixir
- HLS segments are played by Media Element and HLS.JS (we also tried and like the Shaka player and look forward to helping develop similar DASH players, as well as the ability to live-stream lossless FLAC audio data over DASH)
We’d welcome your help in developing any/all of these software components. Join us via the Orcasound Git repositories!