Skip to content

WhoisGray/mp3fixer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

mp3fixer

🎵 Smart Bash utility for renaming audio files using metadata tags.

mp3fixer automatically renames your music files into:

Artist - Title.ext

using metadata extracted via ffprobe.


Features

  • 🎵 Metadata-based renaming
  • 🔁 Recursive directory scanning
  • 🧪 Dry-run preview mode
  • 🛡 Collision protection
  • 🧼 Safe filename sanitization
  • ⚡ Fast and lightweight
  • 🐧 Linux/macOS compatible
  • 🔧 Powered by ffprobe (ffmpeg)

Supported Formats

  • mp3
  • flac
  • m4a
  • wav
  • aac
  • ogg

Quick Install

One-line installer

bash <(curl -fsSL https://raw.githubusercontent.com/WhoisGray/mp3fixer/refs/heads/main/install.sh)

or:

curl -fsSL https://raw.githubusercontent.com/WhoisGray/mp3fixer/refs/heads/main/install.sh | bash

GitHub raw URLs are commonly used to distribute install scripts directly from repositories. ([codegenes][1])


Requirements

Ubuntu / Debian

sudo apt install ffmpeg

macOS

brew install ffmpeg

Usage

Rename Single File

mp3fixer song.mp3

Rename Entire Music Folder

mp3fixer ~/Music

Dry Run Mode

Preview changes without renaming files:

mp3fixer -n ~/Music

Auto Confirm

Skip confirmation prompts:

mp3fixer -y ~/Music

Verbose Logging

mp3fixer -v ~/Music

CLI Options

Option Description
-y Auto confirm all renames
-n Dry run mode
-v Verbose output
-h Show help

Example

Before

01_track.mp3
music_final_v2.mp3
unknown.mp3

After

Daft Punk - Harder Better Faster Stronger.mp3
Hans Zimmer - Time.mp3
Unknown Artist - Unknown Title.mp3

Safe Filename Sanitization

Invalid filename characters are automatically replaced:

/:*?"<>|

Project Structure

mp3fixer/
├── install.sh
├── mp3fixer.sh
└── README.md

TODO :

  • Bug with Directory : /

Author

Yashar Razban

Made with Bash + ffprobe

About

Smart Bash utility to rename audio files using metadata tags (Artist - Title)

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages