All Projects → orcasound → orcanode

orcasound / orcanode

Licence: AGPL-3.0 license
Software for live-streaming and recording lossy or lossless compressed audio (HLS, DASH, FLAC) via AWS S3 buckets. ⭐

Programming Languages

c
50402 projects - #5 most used programming language
python
139335 projects - #7 most used programming language
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to orcanode

Php Ffmpeg Video Streaming
📼 Package media content for online streaming(DASH and HLS) using FFmpeg
Stars: ✭ 246 (+969.57%)
Mutual labels:  hls, aws-s3, dash
cassandra-nginx-cdn
Some config files and POC code to use Apache Cassandra as distributed storage for HLS chunks accross multiple datacenters and scripts for converting/transcoding UDP MPEG-TS to HLS and vice versa. The idea is take from Globo.com’s Live Video Platform for FIFA World Cup ’14.
Stars: ✭ 24 (+4.35%)
Mutual labels:  hls, hls-live-streaming, hls-stream
smart rtmpd
RTMP server, smart, compact, high performance(c, c++), high concurrency, easy to maintain, easy to deploy, (supports multiple operating systems Windows and Linux, ARM, FreeBSD)
Stars: ✭ 159 (+591.3%)
Mutual labels:  hls, mpeg-dash, dash
hls-live-thumbnails
A service which will generate thumbnails from a live HLS stream.
Stars: ✭ 49 (+113.04%)
Mutual labels:  hls, hls-live-streaming, hls-stream
tms
tms(toy media server) is a toy media server for myself learning media develop. Just for fun.
Stars: ✭ 29 (+26.09%)
Mutual labels:  hls, hls-live-streaming, hls-stream
srt2hls
Simple audio HLS streaming server based on Liquidsoap
Stars: ✭ 66 (+186.96%)
Mutual labels:  hls, hls-live-streaming, hls-server
bitmovin-player-web-samples
Showcases build around the Bitmovin Adaptive Streaming Player, demonstrating usage and capabilities of the HTML5 based HLS and MPEG-DASH player, as well as the Flash based Fallback.
Stars: ✭ 69 (+200%)
Mutual labels:  hls, mpeg-dash
P2p Cdn Sdk Javascript
Free p2p cdn github javascript sdk to reduce video streaming costs of live and on demand video using webrtc by upto 90% and improve scalability by 6x - 🚀 Vadootv 🚀
Stars: ✭ 158 (+586.96%)
Mutual labels:  hls, dash
Magicalexoplayer
The Easiest Way To Play/Stream Video And Audio Using Google ExoPlayer In Your Android Application
Stars: ✭ 171 (+643.48%)
Mutual labels:  hls, dash
KTAudioSoundWave
🍐KTSoundWave-根据语音绘制波浪动画,录音波形图及分贝检测
Stars: ✭ 22 (-4.35%)
Mutual labels:  audio-streaming, audio-recorder
Docker Streaming Server
Live streaming server
Stars: ✭ 141 (+513.04%)
Mutual labels:  hls, dash
replay
A React video player facilitating adaptive stream playback with custom UI and a React-friendly API.
Stars: ✭ 202 (+778.26%)
Mutual labels:  hls, mpeg-dash
shaka-php
🎞 Shaka PHP is a library that uses Shaka Packager for DASH and HLS packaging and encryption, supporting Common Encryption for Widevine and other DRM Systems.
Stars: ✭ 63 (+173.91%)
Mutual labels:  hls, dash
Shaka Player Embedded
Shaka Player in a C++ Framework
Stars: ✭ 153 (+565.22%)
Mutual labels:  hls, dash
Ott Packager
OTT/ABR streaming encoder (H264/HEVC) and packager for DASH and HLS
Stars: ✭ 148 (+543.48%)
Mutual labels:  hls, dash
Digital video introduction
A hands-on introduction to video technology: image, video, codec (av1, vp9, h265) and more (ffmpeg encoding).
Stars: ✭ 12,184 (+52873.91%)
Mutual labels:  hls, dash
alpine-dash-hls
A ready-prepared video transcoding pipeline to create DASH/ HLS compatible video files & playlists
Stars: ✭ 43 (+86.96%)
Mutual labels:  hls, dash
vms
Streaming River IPTV server - proxy frontend
Stars: ✭ 27 (+17.39%)
Mutual labels:  hls, dash
hms-video-demo-android
HUAWEI Video Kit supports streaming media in 3GP, MP4, or TS format and compliant with HTTP/HTTPS, HLS, or DASH. The Kit also provides abundant playback controls, delivering personalized video experiences to users.
Stars: ✭ 22 (-4.35%)
Mutual labels:  hls, dash
nsplayer
A web player with shakaplayer & hls.js both supported
Stars: ✭ 23 (+0%)
Mutual labels:  hls, dash

Orcasound's orcastream

This software contains audio tools and scripts for capturing, reformatting, transcoding and uploading audio for Orcasound. The directory structure reflects that we have developed a base set of tools and a couple of specific projects, orcanode and orcamseed (in the node and mseed directories). Orcasound hydrophone nodes stream by running the node code on Intel (amd64) or Raspberry Pi (arm32v7) platforms using a soundcard. While any soundcard should work, the most common one in use is the Pisound board on either a Raspberry Pi 3B+ or 4. The other project (in the mseed directory) is for converting mseed format data to be streamed via Orcanode through the Orcasound human & machine detection pipeline. This is mainly used for streaming audio data from the OOI (NSF-funded Ocean Observatory Initiative) hydrophones off the coast of Oregon. See the README in each of those directories for more info.

Background & motivation

This code was developed for source nodes on the Orcasound hydrophone network (WA, USA) -- thus the repository names begin with "orca"! Our primary motivation is to make it easy for lots of folks to listen for whales using their favorite device/OS/browser.

We also aspire to use open source software as much as possible. We rely heavily on FFmpeg. One of our long-term goals is to stream lossless FLAC-encoded data within DASH segments to a player that works optimally on as many listening devices as possible.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See the deployment section (below) for notes on how to deploy the project on a live system like live.orcasound.net.

If you want to set up your hardware to host a hydrophone within the Orcasound network, take a look at how to join Orcasound and our prototype built from a Raspberry Pi3b with the Pisound Hat.

The general scheme is to acquire audio data from a sound card within a Docker container via ALSA or Jack and FFmpeg, and then stream the audio data with minimal latency to cloud-based storage (as of Oct 2021, we use AWS S3 buckets). Errors/etc are logged to LogDNA via a separate Docker container.

Prerequisites

An ARM or X86 device with a sound card (or other audio input devices) connected to the Internet (via wireless network or ethernet cable) that has Docker-compose installed and an AWS account with some S3 buckets set up.

Installing

Create a base docker image for your architecture by running the script in /base/rpi or /base/amd64 as appropriate. You will need to create a .env file as appropriate for your projects. Here is an example of an .env file (tested/working as of June, 2021)...

AWS_METADATA_SERVICE_TIMEOUT=5
AWS_METADATA_SERVICE_NUM_ATTEMPTS=0
REGION=us-west-2
BUCKET_TYPE=dev
NODE_TYPE=hls-only
NODE_NAME=rpi_YOURNODENAME_test
NODE_LOOPBACK=true
SAMPLE_RATE=48000
AUDIO_HW_ID=pisound
CHANNELS=1
FLAC_DURATION=30
SEGMENT_DURATION=10
LC_ALL=C.UTF-8

... except that the following fields are excised and will need to be added if you are integrating with the audio and logging systems of Orcasound:

AWSACCESSKEYID=YourAWSaccessKey
AWSSECRETACCESSKEY=YourAWSsecretAccessKey
 
SYSLOG_URL=syslog+tls://syslog-a.logdna.com:YourLogDNAPort
SYSLOG_STRUCTURED_DATA='logdna@YourLogDNAnumber key="YourLogDNAKey" tag="docker"

(You can request keys via the #hydrophone-nodes channel in the Orcasound Slack. As of October, 2021, we are continuing to use AWS S3 for storage and LogDNA for live-logging and troubleshooting.)

Here are explanations of some of the .env fields:

  • NODE_NAME should indicate your device and it's location, ideally in the form device_location (e.g. we call our Raspberry Pi staging device in Seattle rpi_seattle.
  • NODE_TYPE determines what audio data formats will be generated and transferred to their respective AWS buckets.
  • AUDIO_HW_ID is the card, device providing the audio data. Note: you can find your sound device by using the command "arecord -l". It's preferred to use the logical name i.e. pisound, USB, etc, instead of the "0,0" or "1,0" format which can change on reboots.
  • CHANNELS indicates the number of audio channels to expect (1 or 2).
  • FLAC_DURATION is the amount of seconds you want in each archived lossless file.
  • SEGMENT_DURATION is the amount of seconds you want in each streamed lossy segment.

Running local tests

At the root of the repository directory (where you also put your .env file) first copy the compose file you want to docker-compose.yml. For example, if you have a Raspberry Pi and you want to use the prebuilt image, then copy docker-compose.rpi-pull.yml to docker-compose.yml. Then run docker-compose up -d. Watch what happens using htop. If you want to verify files are being written to /tmp or /mnt directories, get the name of your streaming service using docker-compose ps (in this case orcanode_streaming_1) and then do docker exec -it orcanode_streaming_1 /bin/bash to get a bash shell within the running container.

Running an end-to-end test

Once you've verified files are making it to your S3 bucket (with public read access), you can test the stream using a browser-based reference player. For example, with Bitmovin HLS/MPEG/DASH player you can use select HLS and then paste the URL for your current S3-based manifest (.m3u8 file) to listen to the stream (and observe buffer levels and bitrate in real-time).

Your URL should look something like this:

https://s3-us-west-2.amazonaws.com/dev-streaming-orcasound-net/rpi_seattle/hls/1526661120/live.m3u8

For end-to-end tests of Orcasound nodes, this schematic describes how sources map to the dev, beta, and live subdomains of orcasound.net --

Schematic of Orcasound source-subdomain mapping

-- and you can monitor your development stream via the web-app using this URL structure:

dev.orcasound.net/dynamic/node_name

For example, with node_name = rpi_orcasound_lab the test URL would be dev.orcasound.net/dynamic/rpi_orcasound_lab.

Deployment

If you would like to add a node to the Orcasound hydrophone network, contact [email protected] for guidance on how to participate.

Built With

  • FFmpeg - Uses ALSA to acquire audio data, then generates lossy streams and/or lossless archive files
  • rsync - Transfers files locally from /tmp to /mnt directories
  • s3fs - Used to transfer audio data from local device to S3 bucket(s)

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests.

Authors

See also the list of orcanode contributors who have helped this project and the [Orcasound Hacker Hall of Fame] who have advanced both Orcasound open source code and the hydrophone network in the habitat of the endangered Southern Resident killer whales.

License

This project is licensed under the GNU Affero General Public License v3.0 - see the LICENSE.md file for details

Acknowledgments

  • Thanks to the backers of the 2017 Kickstarter that funded the development of this open source code.
  • Thanks to the makers of the Raspberry Pi and the Pisound HAT.
  • Thanks to the many friends and backers who helped improve maintain nodes and improve the Orcasound app.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].