FFmpeg works on Pipe protocols, and the same functionality has been ported to ffmpy so data can be written to stdin and read from stdout. You would likely have to provide some timing constructs as well to handle synchronization and appropriate buffer managment, but I see no reason this couldn't be made to work.

ffmpy: using the pipe protocol

live audio streaming with FFmpeg on a rasberry pi

Answer from Aaron on Stack Overflow
🌐
Medium
medium.com › @jmpion › simple-audio-compression-with-python-70bdd7535b0a
Simple Audio Compression With Python | by Jean Meunier-Pion | Medium
October 19, 2022 - As a first step, we convert this .mp3 file to a .wav file, in order to process it, later, with the Python library soundfile. You can use any .mp3 file you wish. For this tutorial, however, I advise to use an audio whose duration is less than five minutes, so as to avoid the scripts taking too much time to run.
🌐
GitHub
github.com › sonos › pyFLAC
GitHub - sonos/pyFLAC: Real-time lossless audio compression in Python · GitHub
A simple Pythonic interface for libFLAC. FLAC stands for Free Lossless Audio Codec, an audio format similar to MP3, but lossless, meaning that audio is compressed in FLAC without any loss in quality.
Author: sonos
Discussions

Audio Compressor in Python - Stack Overflow
How can i code a audio file compressor in python ?? Below i made a voice recorder but now i want to compress that recorded voice file. import sounddevice as sd from scipy.io.wavfile import write im... More on stackoverflow.com
🌐 stackoverflow.com
Open Source Audio Compressor/Limiter Library for Python
The repository with more detailed ...om/Gdalik/audiocomplib · I have already uploaded the wheels to PyPi, so you can install it directly from there: ... Ran some mixes through a cheap analog mixer & I’m blown away! ... Meet Intel® Neural Compressor: An Open-Source Python Library for ... More on reddit.com
🌐 r/opensource
1
4
February 15, 2025
python - Fast way to compress audio data? - Stack Overflow
I'm trying to build (Inspirated by teamspeak) a voip program that comunicate via UDP. Here is my source (Server): import pyaudio import socket CHUNK = 1024 FORMAT = pyaudio.paInt16 CHANNELS = 1 ... More on stackoverflow.com
🌐 stackoverflow.com
Python library for stabilizing the volume of audio files?
I didn't look too much into it, but here is a promising command line program. https://github.com/slhck/ffmpeg-normalize This shouldn't be too hard to code yourself either, using scipy and/or numpy. Edit: This should also be of relevance: https://en.wikipedia.org/wiki/LKFS More on reddit.com
🌐 r/Python
5
10
August 26, 2018
🌐
Stack Overflow
stackoverflow.com › questions › 64413483 › audio-compressor-in-python
Audio Compressor in Python - Stack Overflow
How can i code a audio file compressor in python ?? Below i made a voice recorder but now i want to compress that recorded voice file. import sounddevice as sd from scipy.io.wavfile import write im...
🌐
Adafruit
blog.adafruit.com › 2021 › 06 › 01 › pyflac-real-time-lossless-audio-compression-in-python-audio-python-sonos
pyFLAC: Real-time lossless audio compression in Python #Audio #Python @Sonos
June 1, 2021 - Maintained by Xiph.org, it is free and open-source, and remains the most widely supported lossless audio codec. Other audio compression techniques such as MP3 or AAC can remove perceptually redundant information in the signal. Sonos has created pyFLAC: a Python library for realtime lossless audio compression using libFLAC.
🌐
Interview AI
interview-ai.site › en › article › how-to-compress-audio-files-for-free-script-for-easy-realization-in-python
How to compress audio files for free: Script for easy realization in Python | Interview AI
July 2, 2025 - If you are caught in the upload ... automatic transcription. ... Python ‘s pydub can be used to efficiently compress audio files to optimize their size while maintaining quality....
🌐
PyPI
pypi.org › project › audiocomplib
audiocomplib · PyPI
This Python package provides two essential audio processing tools: Audio Compressor and Peak Limiter.
Find elsewhere
🌐
PyPI
pypi.org › project › CaaS
CaaS · PyPI
CaaS provides support for compression of WAV and MP3 audio files.
      » pip install CaaS
    
Published: May 06, 2020
Version: 1.5
🌐
Reddit
reddit.com › r/opensource › open source audio compressor/limiter library for python
r/opensource on Reddit: Open Source Audio Compressor/Limiter Library for Python
February 15, 2025 - The repository with more detailed ...om/Gdalik/audiocomplib · I have already uploaded the wheels to PyPi, so you can install it directly from there: ... Ran some mixes through a cheap analog mixer & I’m blown away! ... Meet Intel® Neural Compressor: An Open-Source Python Library for ...
🌐
GitHub
github.com › mayankgupta022 › FractalAudioCompression
GitHub - mayankgupta022/FractalAudioCompression: Fractal Audio Compression in python
python [scriptname] [inputfile] tile_size where scriptname = name of .py file which contains code for fractal compression inputfile = a .wave file which needs to be compressed tile_size = defines the size of tile which will be used to break the audio into domains Output is stored in [inputfile].wavc
Forked by 2 users
Languages: Python 100.0% | Python 100.0%
🌐
GitHub
gist.github.com › kidpixo › be810cd9089bc03f74290cb7c567ac89
Python audio compressor using ffmpeg with Opus support for highly efficient speech compression. Supports batch processing, dry runs, and customizable bitrates. · GitHub
Python audio compressor using ffmpeg with Opus support for highly efficient speech compression. Supports batch processing, dry runs, and customizable bitrates. - convert_audio_ffmpeg.py
🌐
GitHub
github.com › Danztee › audio-compressor
GitHub - Danztee/audio-compressor: A powerful Python script to reduce audio file sizes using various compression techniques.
# Compress a single file python audio_compressor.py input.wav # Specify output file python audio_compressor.py input.wav -o compressed.mp3 # High compression (low quality, small size) python audio_compressor.py input.wav -b 64k -r 16000 -c 1 # Batch process all audio files in a directory python audio_compressor.py /path/to/audio/files/ --batch
Author: Danztee
🌐
GitHub
github.com › topics › audio-compression
audio-compression · GitHub Topics · GitHub
Implementation of fixed and variable-length Huffman Coding for audio compression developed using Python.
🌐
Reddit
reddit.com › r/python › python library for stabilizing the volume of audio files?
r/Python on Reddit: Python library for stabilizing the volume of audio files?
August 26, 2018 -

I have audio files that vary heavily in volume, and I would like to make a program that modifies the volume and outputs a new file. Is this possible in Python?

Edit: What I mean is not just uniformly reducing the volume of one audio file, there are some parts where it is very loud and some inaudible parts. I would like a library where I would be able to analyze and bring only those parts closer to the middle range.

🌐
GitHub
github.com › beckerfelipee › Audio-Converter-and-Compressor
GitHub - beckerfelipee/Audio-Converter-and-Compressor: This Python program is designed to efficiently convert and compress audio files and can handle large batches seamlessly in a single execution. · GitHub
This Python program is designed to efficiently convert and compress audio files and can handle large batches seamlessly in a single execution. - beckerfelipee/Audio-Converter-and-Compressor
Author: beckerfelipee
🌐
PyPI
pypi.org › project › pysndfx
pysndfx · PyPI
Apply audio effects such as reverb and EQ directly to audio files or NumPy ndarrays. This is a lightweight Python wrapper for SoX, the Swiss Army knife of sound processing programs. Supported effects range from EQ and compression to phasers, reverb and pitch shifters.
🌐
GitHub
github.com › ksigWyatt › Pi-Audio-Compressor
GitHub - ksigWyatt/Pi-Audio-Compressor: Senior Embedded Systems Project - Dynamic Audio Compression on Raspberry Pi · GitHub
Senior Embedded Systems using Python running on Raspberry Pi · The objective of the project is to create an audio compression system, similar to those found in professional audio equiptment. Our program will not feature as many intricate settings as are on similar hardware.
Author: ksigWyatt
🌐
GitHub
github.com › jadujoel › audio-compressor-python
GitHub - jadujoel/audio-compressor-python: compressor · GitHub
compressor · to use you need to download binaries for ffmpeg and put in the "sigPy" directory. Go to https://ffmpeg.org/download.html and download static binaries for ffmpeg and ffprobe.
Author: jadujoel