Skip to content

A C++ based, lightweight music and noise remover for YouTube and other internet media, using DeepFilterNet for audio enhancement.

License

Notifications You must be signed in to change notification settings

omeryusufyagci/fast-music-remover

Repository files navigation

Fast Music Remover Logo

Fast Music Remover

GitHub license GitHub issues Tests Discord GitHub stars GitHub forks

Fast Music Remover is a lightweight tool designed to remove music, sound effects and noise from internet media. Processing takes about 8% of the original source length -that's under 5 seconds for a minute-long video!

Support for realtime processing is currently in the works, and there are many other features and improvements we're working on in parallel. If this sounds interesting to you, consider contributing!

The primary goal of the project is to enhance the audio tracks of typical mainstream media, such as lecture recordings, field reports and interviews. To see Fast Music Remover in action, take a look at our demo video below!


Fast-Music-Remover_DemoVideo.MP4

The original interview video is by Fisher College of Business, licensed under a Creative Commons Attribution license (reuse allowed).

Background

This project started as an experiment with a demucs-based Python tool. While this was powerful in isolating individual audio components, the processing performance was limited. Although effective, demucs was a bit overqualified for the job; great for instrument separation but not ideal for the streamlined, low-latency filtering we’re aiming for here. If you're curious to see where it all began, you can still check out that initial version here.

Motivation and Use Cases

Fast Music Remover was built to tackle shared pain points and offer a completely free, open solution for enhancing audio in everyday media. Here’s where it shines:

  • Interview Editing: Extract clear voice tracks for interviews and field reports, cutting through ambient noise without losing speech clarity.
  • Education & Lectures: Strip away background noise to improve the sound quality of lecture recordings.
  • Streaming & Social Media: Prepare your media for posting by removing background music or effects to avoid copyright issues.
  • Home Recording Enthusiasts: Clean up home recordings, isolating specific tracks and eliminating unwanted noise for a polished final product.
  • Regular Media Consumers: Enjoy your favorite podcast or video without the extra sound effects, keeping the focus on what matters.

Roadmap

Our immediate priority is to provide a stable first release with cross-platform support for Linux, macOS, and Windows. We’re focused on getting this early version out as soon as possible, and your feedback will help shape the direction of the project.

Following the first release, we plan to introduce a separate, unstable release with some features in alpha stage, such as realtime support.

Contributing

We have a wide array of interesting technical challenges spanning multiple domains. Take part and join us in building a free an open tool that addresses practical needs!

Check out the contributing guidelines for details on how to get started.

Benchmarks

The processed audio quality shows no audible degradation so far. A formal benchmarking process for performance and quality is planned. If you're interested in contributing to the benchmarking process, you can open an issue, reach out via the discussions or discord.

Prerequisites

Quick Tip: If you're just looking to test Fast Music Remover, you can skip these prerequisites and jump straight to the Docker Quick Start below!

To get started with Fast Music Remover, ensure that you have the following software installed on your system. These dependencies are necessary for running the backend server, compiling the C++ processor, and handling media files.

  • Python 3.9+: Required for running the backend server.
  • FFmpeg: For extracting, probing, and processing audio files.
  • CMake: Needed to compile the C++ MediaProcessor.
  • nlohmann-json: A JSON library required for parsing configuration files in the MediaProcessor.
  • libsndfile: Required for sampled audio file operations in the MediaProcessor.
  • Docker and Docker Compose (optional but recommended for a quick setup):
Click here for installation commands for Ubuntu/Debian and macOS

Installation Commands

FFmpeg:

  • On Ubuntu/Debian:

    sudo apt update
    sudo apt install ffmpeg
  • On macOS:

    brew install ffmpeg

    After installing FFmpeg, ensure the correct path is set in the config.json file. By default, it is set to /usr/bin/ffmpeg. If you are using macOS and installed FFmpeg via Homebrew, update the path in config.json to:

    "ffmpeg_path": "/opt/homebrew/bin/ffmpeg"

CMake:

  • On Ubuntu/Debian:
    sudo apt update
    sudo apt install cmake
  • On macOS:
    brew install cmake

nlohmann-json:

  • On Ubuntu/Debian:
    sudo apt update
    sudo apt install nlohmann-json3-dev
  • On macOS:
    brew install nlohmann-json

libsndfile:

  • On Ubuntu/Debian:
    sudo apt update
    sudo apt install libsndfile1-dev
  • On macOS:
    brew install libsndfile

Docker and Docker Compose:

  • On Ubuntu:
    sudo apt install docker.io docker-compose
  • On macOS:
    brew install docker
    brew install docker-compose

Note: Ensure all the above dependencies are installed before proceeding with the setup.

Getting Started

To get started with Fast Music Remover, you have two main options: running it directly via the provided Dockerfile or installing all the necessary dependencies manually.

Option 1: Quick Start with Docker

Ensure Docker is installed by running:

docker --version

If Docker is installed, you can quickly try Fast Music Remover by running the following command:

docker-compose up --build

Note: You may need sudo to run this command, depending on how your system is setup.

Once it's up, open http://localhost:8080 in your browser, and you can test the service right away by submitting a URL.

This Docker setup will spin up a containerized version of the tool with everything set up: the Flask backend, the C++ MediaProcessor, and the frontend. Once processing is done, a playback of the processed media will be available on the frontend.

Option 2: Manual Installation

For those who want more control or are looking to contribute, follow these steps to set up Fast Music Remover manually.

Step 1: Ensure Dependencies Are Installed

Ensure all dependencies mentioned in the Prerequisites section are installed before proceeding.

Step 2: Install Python Dependencies

Install the Python dependencies with:

pip install -r requirements.txt

Step 3: Compile the Media Processor (C++)

  1. Navigate to the MediaProcessor directory:
cd MediaProcessor
  1. Make a build directory and navigate into it:
mkdir build
cd build
  1. Run CMake and compile
cmake ..
make

Note: If you encounter errors here, double-check that all prerequisites are installed.

Step 4: Start the Backend Server

After setting up the dependencies and compiling the C++ project, go back to the project root and start the backend server:

python3 app.py 

Note: The server should indicate it is running on http://127.0.0.1:8080. Visit this address in your browser and submit a URL to begin.

License

Fast Music Remover is released under the MIT license.