Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Install mp3splt on Ubuntu Linux: Step-by-Step

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To install mp3splt on Ubuntu Linux, open a terminal and run sudo apt install mp3splt (or mp3splt-gtk for the graphical version). This gives you a command-line tool to split MP3 files without re-encoding, which is fast and lossless. You'll need sudo privileges and an active internet connection.

What You'll Need

  • An Ubuntu system (any currently supported version, e.g., 20.04 LTS or newer)
  • Terminal access (Ctrl+Alt+T opens it)
  • An account with sudo privileges (the main user usually has this)
  • Internet connection to download packages

Step-by-Step

  1. Open a terminal. Press Ctrl+Alt+T on your keyboard, or search for “Terminal” in the activities overview.
  2. Update your package list. Run sudo apt update. This refreshes the list of available packages from Ubuntu’s repositories. Enter your password when prompted (it won’t show as you type).
  3. Install mp3splt (command-line version). Run sudo apt install mp3splt. This installs the core tool. If you prefer a graphical interface, install mp3splt-gtk instead or in addition: sudo apt install mp3splt-gtk. You can install both; the command-line tool is often more flexible for scripting.
  4. Verify the installation. Run mp3splt --version to see the installed version. If you installed the GTK version, you can launch it by typing mp3splt-gtk in the terminal or finding it in the applications menu.
  5. Basic usage example. To split an MP3 by time, use: mp3splt -t 1.00 file.mp3 – this splits the file into 1-minute segments. To split at specific times, use mp3splt -t 0.30.00-1.30.00 file.mp3 to extract the segment from 30 seconds to 1 minute 30 seconds. The output files are named like file_0000.mp3, file_0001.mp3, etc.
  6. Explore more options. Run mp3splt --help to see all available options, such as splitting by silence (-s), by track list (-c), or by fixed number of parts (-n).

Common Mistakes

  • Forgetting sudo – Without sudo, apt will say “permission denied” or “E: Unable to lock the administration directory”. Always use sudo for install commands.
  • Not updating first – If you skip sudo apt update, you might get an error that the package cannot be found or an older version is installed. Always update first.
  • Typing the package name wrong – It’s mp3splt (all lowercase, no spaces). A common typo is “mp3split” (with an i). If you get “Unable to locate package”, double-check the spelling.
  • Using the wrong syntax for time – mp3splt expects time in mm.ss.xx format (minutes.seconds.hundredths). For example, 1 minute 30 seconds is 1.30.00, not 1:30. Using colons will cause an error.

Tips

  • Use the GTK version for simple tasks – If you don’t want to remember command-line options, install mp3splt-gtk. It provides a simple window where you can drag and drop files and set split points.
  • Split by silence automatically – For audiobooks or podcasts, try mp3splt -s -p th=0.05 file.mp3 to split at silences longer than 0.05 seconds. You can adjust the threshold.
  • Preserve ID3 tags – By default, mp3splt copies tags from the original file. Use --tag options to set custom tags if needed.
  • Batch processing – You can use a loop in bash to split multiple files. For example: for f in *.mp3; do mp3splt -t 2.00 "$f"; done splits every MP3 in the folder into 2-minute parts.

Troubleshooting

If you get “Unable to locate package mp3splt” – This usually means your package list is outdated or the universe repository is not enabled. First run sudo apt update. If that fails, enable the universe repository with sudo add-apt-repository universe and then update again. Then retry the install.

If the install succeeds but the command is not found – Make sure you are using the correct command name. For the command-line tool, it’s mp3splt. For the GUI, it’s mp3splt-gtk. If you installed only the GTK version, the mp3splt command won’t exist. Install both if you need both.

If mp3splt crashes or gives a segmentation fault – This is rare but can happen with certain MP3 files. Try running it on a different file to see if the issue is file-specific. Also ensure your system is up to date with sudo apt upgrade.

If output files are not created – Check that you have write permission in the current directory. If you are in a read-only directory, change to a writable one (e.g., cd ~/Music) and try again.

If you get a “Permission denied” error when writing output – Run the command with sudo only if necessary, but it’s better to change to a directory you own. Using sudo for splitting files can create root-owned files that are hard to manage later.

Frequently Asked Questions

What is the difference between mp3splt and mp3splt-gtk?

mp3splt is the command-line version, which is faster for scripting and automation. mp3splt-gtk is a graphical interface that makes it easier for beginners to split files by dragging and dropping. Both use the same underlying engine.

Does mp3splt re-encode the MP3 files?

No, mp3splt works by copying the audio data without re-encoding. This means the output files are identical in quality to the original, and the process is very fast.

Can I split an MP3 by a list of track times?

Yes, you can use a cue file with the -c option. For example, mp3splt -c tracks.cue file.mp3 splits according to the track times in the cue file.

How do I split an MP3 into equal parts of a specific length?

Use the -t option with the desired length. For example, mp3splt -t 0.30.00 file.mp3 splits into 30-second segments. To split into a specific number of equal parts, use -n 4 to split into 4 parts.

Can I use mp3splt on other Linux distributions?

Yes, mp3splt is available in most Linux distributions’ repositories. On Debian/Ubuntu, use apt. On Fedora, use dnf install mp3splt. On Arch, use pacman -S mp3splt.

Is mp3splt available for Windows or macOS?

Yes, there are Windows and macOS versions available from the official mp3splt website, but they are not installed via a package manager. You can download the binaries from the project’s official site.