Coder Social home page Coder Social logo

oszuidwest / rpi-audio-encoder Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 73 KB

Software to turn a Raspberry Pi into a production grade audio encoder

License: The Unlicense

Shell 100.00%
raspberry-pi ffmpeg hifiberry stl streaming streaming-audio audio

rpi-audio-encoder's Introduction

rpi-audio-encoder

This repository contains the audio streaming software for ZuidWest FM in the Netherlands. The setup involves a Raspberry Pi 4 or 5 and a HiFiBerry Digi+ I/O for audio input. The system uses FFmpeg as an encoder, integrated with Supervisor for process management via a web interface. It supports audio streaming to a SRT server.

The encoder, stationed in the studio, connects to the digital output of an Orban Optimod, enabling streaming to any SRT server. Companion server software to complete the audio stack is available in this repository.

Raspberry Pi and SRT logo

Preparing the Raspberry Pi

  • Install Ubuntu Server 22.04 LTS 64-bit or Raspbian 12 64-bit.
  • Follow the guide at https://www.hifiberry.com/docs/software/configuring-linux-3-18-x/ for HiFiBerry setup.
  • Gain root access with sudo su.
  • Download and execute the install script using /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/oszuidwest/rpi-encoder/main/install.sh)".

⚠️ Note: A significant issue exists with kernel versions 6.0 - 6.5 when recording from a HiFiBerry using FFmpeg. Linux distributions with kernel 6.0 to 6.5 are incompatible. We highly recommend Ubuntu 22.04 Server LTS with kernel 5.15 or Raspbian 12 with kernel 6.6 or newer.

Post installation clean-up

  • You probably don't need WiFi. Disable it by adding dtoverlay=disable-wifi to /boot/firmware/config.txt
  • You probably don't need tools for Thunderbolt, Bluetooth, NTFS, Remote Syslogs and Telnet. Remove them with apt remove bolt bluez ntfs-3g rsyslog telnet

On Ubuntu 22.04:

  • You probably don't need LXD for managing containerized applications and virtual machines. Remove it with snap remove lxd
  • You can speed-up booting by removing optional: true from eth0 in /etc/netplan/50-cloud-init.yaml.

Configuring the Audio Processor

  • Connect the digital output of the audio processor to the HiFiBerry's input.
  • Ensure the processor outputs 48kHz 16-bit audio, as the HiFiBerry does not support resampling. This setting is hardcoded.
  • Preferably, set the digital output to transmit SPDIF data. Although AES/EBU might work, it is not identically standardized.

Example for an Orban Optimod:

Audio Encoding Presets

Included audio encoding presets:

  • mp2: Streams MPEG-1 Audio Layer II audio at 384 kbit/s, regarded as the benchmark for compressed broadcast audio.
  • mp3: Streams MPEG-1 Audio Layer III audio at 320 kbit/s, the highest mp3 quality achievable.
  • ogg: Streams OGG Vorbis audio at 500 kbit/s, the highest quality for ogg/vorbis.
  • wav: Streams uncompressed 16-bit Little Endian audio, the pinnacle of uncompressed audio quality.

Icecast Support

Icecast support was removed in version 2.0. SRT has been thoroughly evaluated for reliability. Version 1.1 with support for Icecast is still available for download.

Additional information on SRT:

rpi-audio-encoder's People

Contributors

rmens avatar

Stargazers

 avatar

Watchers

 avatar  avatar

rpi-audio-encoder's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.