25 votes

On professional web radio it is quite important to remove silence from start or end of the songs.
I give you 2 ideas in order to implement this feature:

1. Using the "eatblank" liquidsoap instruction.
2. Use the sox utility.
In the first case the liquidsoap script should be
modified for each playlist, with a checkbox where the user can specify if removing silence with liquidsoap is allowed.
I think this implementation is more difficult.

The second with Sox is a really easy thing!

For cutting silence at beginning and end of a mp3 file, you can do:
sox inputfile.mp3 outputfile.mp3 silence 1 0.1 1% reverse silence 1 0.1 1% reverse

You can make it also for an entire directory in this manner,

for file in *.mp3; do sox "$file" "nosilence/${file%.mp3}.mp3" silence 1 0.1 1% reverse silence 1 0.1 1% reverse; done

The "nosilence" folder must exist, the name is just an idea.

In this case, I think a checkbox should exist when uploading file, asking the user if remove silence is wanted.

Suggested by: dreinn Upvoted: 25 Jun Comments: 2

Under consideration

Comments: 2

Add a comment

0 / 500

* Your name will be publicly visible

* Your email will be visible only to moderators