• Welcome to RadioDJ - Free Radio Automation Software Forum. Please log in or sign up.

How to add a small bit of silence to ends of MP3 files...

Started by JackRabbit, July 09, 2023, 11:30:15 PM

JackRabbit

I don't like to use fading between tracks, as some of my tracks are not music. It sounds weird when a song fades out over a stand-up comedy track, for ex.

At times, that creates a problem, as some tracks have no silence at all at the beginning or end. When two of them play back to back, it sounds wrong, like joining a TV show "already in progress". For these files, I've been searching for a simple, automated way to add just a half-second of silence to the ends of the MP3 file. Obviously, I don't want to reencode the file to retain the music quality. Finding a Windows tool that can do this has not been easy. I think I've finally found one and would like to share it.

My requirements for the tool are:
Free & open-source
NO reencoding of MP3 files
Easy to use on multiple files at once.
All MP3 Tags are copied to the new file.
The old file is not modified, in case something goes wrong.
(With all these requirements, you can see why finding a tool was difficult.)

The tool is "MP3Binder" from https://github.com/crra/mp3binder

It is a simple command-line tool. I made MP3 file that is 0.5 seconds of silence. I simply use the tool to add the HalfSecondDelay.MP3 to the start & end of my music files, as needed.

You will have to do your own work to make a batch file to automate the process. The free "Drag & Drop Robot" is a cool tool that can easily automate tasks like this, without bothering with making batch files. https://www.donationcoder.com/software/mouser/other-windows-apps/drag-and-drop-robot

If you happen to have the awesome program "Directory Opus", you can use the button script that I've put together, or create a version for your favorite file-manager, AutoHotKey, etc:
-----------------------------------------------------------------------------------------------------------------
// Warning - Does not work with network paths
// You will need to modify the path of your "HalfSecondDelay.MP3" to wherever you have it stored.
@externalonly
@disablenosel:type=*.mp3
@filesonly

// Changes britney.mp3 to britney_BAK.mp3  so we don't have to overwrite the original filename & have a backup
rename {file$} {file$|noext}_BAK.MP3

// Adds a 0.5 sec delay to start & end of selected file
mp3binder --verbose --nochapters --tcopy 2 --output {file$} {alias|AHKscripts}\RadioDJ_delay_file\HalfSecDelay.mp3 {file$|noext}_BAK.MP3 {alias|AHKscripts}\RadioDJ_delay_file\HalfSecDelay.mp3
---------------------------------------------------------------------------------------------------------------
If you have any questions, just let me know.


JackRabbit

Yes. I use Audacity a lot. However, it only works directly with lossless types of audio. To work with MP3, it is loaded into Audacity, then re-encoded back to MP3 when saved out.

MP3binder and MP3directcut are tools that work directly with MP3 formats without having to reencode.

MP3binder isn't particularily fast on my system, but it gets the job done in one click. MP3directcut is much faster, but I haven't found a way to automate the process.

Today I found a program called MP3Wrap mp3wrap.sourceforge.net that works similar, but much faster, to MP3binder.