Skip to content

Local Audio Streaming and Sharing Platform for all audio formats

License

Notifications You must be signed in to change notification settings

Oinkognito/wavy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Wavy

A local networking solution for audio streaming and sharing, supporting lossless and lossy audio formats through a unified platform.

Important

Wavy is still under heavy development (WIP)

Expect a LOT of breaking changes with each commit.

Table of Contents

Introduction

Wavy is a lightweight and efficient solution for audio streaming within a local network. It is designed to encode, decode, and dispatch audio streams seamlessly while ensuring secure data transfer via SSL/TLS encryption.

Important

The Wavy Project currently is only supported for *NIX Operating Systems (on x86-64 architecture).

Currently supported and tested distributions:

  1. Arch Linux
  2. Ubuntu (Debian)
  3. Fedora

In the future, perhaps Windows / MacOS will be supported.

It supports:

  • Lossless formats (FLAC, ALAC, WAV)
  • Lossy formats (MP3, AAC, Opus, Vorbis)
  • Adaptive bitrate streaming (Soon) using HLS (HTTP Live Streaming).
  • Metadata extraction and TOML-based configuration.
  • Transport stream decoding via FFmpeg for real-time audio playback.

Dependencies

To build and run Wavy, install the following dependencies:

Dependency Purpose
FFmpeg Audio encoding, decoding, and streaming
Base-devel Includes g++ / clang++ for C++ compilation
OpenSSL Secure communication using SSL/TLS
Boost C++ Asynchronous networking & utility functions
Intel oneTBB Parallelism for Wavy operations
libzstd Lossless compression (Zstandard)
CMake & Make Build system tools
Pkg-Config Build system tools helper
Libarchive Handling .tar, .gz, .zst compressed files
libmp3lame MP3 encoding support

Optional Dependencies (for Lossless Support)

Dependency Purpose
FLAC & FLAC++ FLAC decoding and encoding for lossless streaming
Qt6 (Core, Widgets) Required for GUI development.

Here are the dependencies installation command for some common distributions:

Note

It is important that you need to download the DEVELOPMENT version of these packages for pkg-config to work!

If you are on Arch Linux, then ignore this.

So let us say you have libboost downloaded in your Ubuntu system. pkg-config will NOT be able to find and link libboost!

Hence, you would need to install libboost-dev and replace it with libboost.

Arch Linux

sudo pacman -S --needed \
  ffmpeg base-devel openssl boost tbb-devel zstd cmake make pkgconf \
  libarchive lame flac++

Note: Qt6 (optional for GUI):

sudo pacman -S qt6-base qt6-tools

Ubuntu / Debian

sudo apt update && sudo apt install -y \
  ffmpeg build-essential libssl-dev libboost-all-dev libtbb-dev \
  libzstd-dev cmake make pkg-config libarchive-dev \
  libmp3lame-dev libflac++-dev

Optional GUI (Qt6):

sudo apt install qt6-base-dev qt6-tools-dev

Fedora

sudo dnf install -y \
    @development-tools gcc-c++ flac-devel boost-devel openssl-devel \
    ffmpeg-free-devel libavcodec-free-devel libavutil-free-devel libavformat-free-devel libswresample-free-devel \
    zstd cmake make pkgconf \
    libarchive-devel lame-devel git wget tbb-devel

Optional GUI (Qt6):

sudo dnf install qt6-qtbase-devel qt6-qttools-devel

Building

Wavy has a lot of targets that can be built with a lot of customizability.

In general if you want things to just work:

make all # assuming you have setup all the required deps 

If you want to configure dependencies and build the project: (For Ubuntu, Fedora and Arch)

./build.sh 
# When a prompt comes up for which target to build just hit enter or type all

For more information on targets and in depth building details check out BUILD.md

Important

If you want to contribute to Wavy and want compile times for each binary to be faster, here are a few steps that are recommended:

  1. Use Ninja with the existing build system:
make server EXTRA_CMAKE_FLAGS="-DBUILD_NINJA=ON" # add the BUILD_NINJA flag when making a target

This should compile with parallelism and should give faster builds.

  1. Use Mold as the linker:
make all EXTRA_CMAKE_FLAGS="-DUSE_MOLD=ON" # add USE_MOLD flag when making a target

This will try to use mold as the linker for the project. You can try different flags but it is recommended that you do not. It is not necessary.

Mold is significantly smarter and faster than GNU's ld and CLANGs lld and this should help in faster build and linking times for the project.

Architecture

The Wavy system consists of the following components:

  • Encoder: Converts audio files into HLS (HTTP Live Streaming) format.
  • Decoder: Parses transport streams for playback.
  • Dispatcher: Manages transport stream distribution.
  • Server: Handles secure file uploads, downloads, and client session management.

System Overview: Wavy Architecture

For a more detailed explanation, read:
ARCHITECTURE.md

Security

We do have a SECURITY.md.

Since the project is still in active development, no absolute promises can be made other than the standards and practices of the codebase.

API References

Wavy relies on FFmpeg's core libraries for processing audio:

For detailed API documentation, see:
APIREF.md

Examples

Wavy currently is under heavy development as mentioned above, so for people to understand the project better, the project maintains an examples/ directory. Latest libwavy APIs are made sure to have atleast one in-depth example

Note

To compile all examples:

make "-DBUILD_EXAMPLES=ON"

Each example should be pretty straightforward as they are isolated API calls to a particular aspect of libwavy

Documentation

Generating Docs

Install Doxygen, then run:

doxygen .Doxyfile
xdg-open docs/html/index.html  # Opens the documentation in a browser

Credits

  1. TOML++: Header-only TOML config file parser and serializer for C++17. TOML++ (tomlplusplus)
  2. Miniaudio: Audio playback and capture library written in C, in a single source file. Miniaudio

License

The Wavy Project is licensed under the BSD-3-Clause License.
LICENSE