Skip to content

webclubz/Mp3_to_Mp4

Repository files navigation

MP3 to MP4 Converter

A modern desktop application for converting MP3 audio files to MP4 videos with various visualization options.

Features

  • Drag & Drop Interface - Simply drag MP3 files into the application
  • Multiple Visualization Modes:
    • Spectrum Bars - Colorful frequency spectrum bars
    • Spectrum Line - Combined frequency spectrum visualization
    • Waveform - Audio waveform visualization
    • Cover Image - Static image with audio
    • Auto Cover - Automatically generated cover with filename
  • Batch Processing - Convert multiple files at once
  • Customizable Settings:
    • Resolution (720p, 1080p, custom)
    • Frame rate (15-60 FPS)
    • Audio bitrate (128k-320k)
    • Output directory
  • Real-time Progress - Visual progress bars and conversion logs
  • Smart File Handling - Automatic file naming to avoid overwriting

Requirements

  • Python 3.8 or higher
  • FFmpeg (must be installed and available in PATH)
  • PyQt6

Installation

1. Install FFmpeg

On Arch Linux:

sudo pacman -S ffmpeg

On Ubuntu/Debian:

sudo apt install ffmpeg

On macOS:

brew install ffmpeg

2. Install Python Dependencies

pip install -r requirements.txt

Or install PyQt6 directly:

pip install PyQt6

Usage

GUI Application

Run the graphical interface:

python mp3_to_mp4_gui.py

Or make it executable:

chmod +x mp3_to_mp4_gui.py
./mp3_to_mp4_gui.py

Command Line (Original Script)

The original bash script is still available:

./convert.sh -m spectrum_bars *.mp3

See ./convert.sh -h for all command-line options.

GUI Usage Guide

  1. Add Files:

    • Drag and drop MP3 files into the file list, or
    • Click "Add MP3 Files..." to browse and select files
  2. Configure Settings:

    • Basic Settings Tab:
      • Choose conversion mode (spectrum_bars, waveform, etc.)
      • Select cover image (if using "cover" mode)
      • Set output directory
    • Advanced Settings Tab:
      • Adjust resolution (default: 1280x720)
      • Set frame rate (default: 30 FPS)
      • Choose audio bitrate (default: 192k)
      • Enable/disable file overwriting
  3. Start Conversion:

    • Click "Start Conversion"
    • Monitor progress in the progress bar and log window
    • Files will be converted one by one
  4. Output:

    • MP4 files will be saved in the selected output directory
    • Filenames match the input MP3 files (e.g., song.mp3song.mp4)

Conversion Modes Explained

  • spectrum_bars: Displays separate frequency spectrum bars for left/right channels - great for music visualization
  • spectrum_line: Shows a combined frequency spectrum line - cleaner, single-line visualization
  • waveform: Classic audio waveform display - shows the audio wave pattern
  • cover: Uses a custom image you provide as the video background
  • autocover: Automatically creates a simple black background with the song title

Tips

  • For best quality music videos, use spectrum_bars mode with 1080p resolution
  • Use cover mode if you have album artwork
  • Lower FPS (e.g., 15-20) for faster conversion with minimal quality loss
  • Higher bitrate (256k or 320k) preserves better audio quality

Troubleshooting

"FFmpeg not found" error:

  • Make sure FFmpeg is installed and in your system PATH
  • Test by running ffmpeg -version in terminal

"Unable to parse option value" error:

  • This has been fixed in the latest version
  • Make sure you're using the updated convert.sh script

Slow conversion:

  • Lower the resolution or FPS
  • Use a faster preset (the GUI uses "veryfast" by default)
  • Close other applications to free up CPU resources

Files won't drop:

  • Make sure files have .mp3 extension
  • Try using the "Add MP3 Files..." button instead

License

Free to use and modify.

Credits

Created with PyQt6 and FFmpeg.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors