Help - Search - Members - Calendar
Full Version: looking for a software that will trim mp3s
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - General
mrbruno
hi, is there any free software that will cut the first 5 seconds of my mp3s?

I've got a lot of podcast that begin with annoying sounds so I need
to delete them.

I don't want to edit each file manually, so I need a program with batch function.

I tried mp3trim but its batch function is for leading silence removal only, not annoying sounds.
odyssey
If you create a cuesheet with two tracks and the given mp3 file, (Edit: Look below) you should be able to do this losslessy with the pcutmp3 tool

Otherwise IF you would do it manually, I'd recommend mp3 surgeon.
SebastianG
Hello, mrbruno!

This worked for me:
  1. Download pcutmp3.jar
  2. Make sure you've installed a java runtime environment. You can check via
    CODE
    java -version
  3. Copy pcutmp3.jar into the folder with your MP3 files
  4. Create a new subfolder within the current folder (trimmed)
  5. Enter the following in the console:
    CODE
    for %f in (*.mp3) do java -jar pcutmp3.jar --dir trimmed --out "%s" --crop 1:5s-999m0s "%f"
Afterwards the directory trimmed should contain all MP3 files with the first 5 seconds removed.

Note: In case your files' durations exceed 999 minutes, you should increase that number. heheh smile.gif
Also, you'll lose the ID3 tags I think -- I'm not sure, though.

Cheers!
SG
mrbruno
thanks for the tips sebastian.
This would be the perfect solution for me...
but I don't think I have java.
Maybe I will install it if there's no other solution
mrbruno
I've just installed java but I don't know how to view the console...


I've enabled the console in the java control panel
In IE, there should be java in options/advanced
but there's nothing related to java
odyssey
QUOTE (mrbruno @ Oct 17 2007, 17:07) *
I've just installed java but I don't know how to view the console...


I've enabled the console in the java control panel
In IE, there should be java in options/advanced
but there's nothing related to java

Put the command in a .bat file (you create it with notepad), but change "java" to the installaed location of java (usually something like C:\Program Files\Java\jre1.0.6_02\bin\java )

You move the bat file to the directory with the files and run it.
mrbruno
my java is located in C:\Program Files\Java\jre1.6.0_03\bin\java, so this would be :

for %f in (*.mp3) do C:\Program Files\Java\jre1.0.6_03\bin\java -jar pcutmp3.jar --dir trimmed --out "%s" --crop 1:5s-999m0s "%f"

I've tried to put this .bat in the directory with the files but no luck !

By the way, I finally managed to view the console but I don't know how to enter text in it .
SebastianG
By console I just meant the DOS command prompt (cmd)

If you want to try again the Batch file thingy you should replace "%f" by "%%f"
because otherwise the for loop won't work.
CODE
mkdir trimmed
for %%f in (*.mp3) do java -jar pcutmp3.jar --dir trimmed --out "%%s" --crop 1:5s-999m0s "%%f"

This should work in case pcutmp3.jar ia also located in that directory where the BAT file and the MP3 files are.

(You don't need to use the full path for the java executable file. If properly installed its path is part of the search path and Windows will find it automatically.)

Cheers!
SG
mrbruno
ok so I clicked start/run then typed cmd to get the prompt.
Then I pasted this :


for %f in (*.mp3) do java -jar pcutmp3.jar --dir trimmed --out "%s" --crop 1:5s-999m0s "%f"

it didn't worked!


I also tried to replace "%f" by "%%f" in batch but it did not process the files
SebastianG
The BAT version works if you also replace "%s" by "%%s"
I just checked.

So, to recap:
  • put pcutmp3.jar and the BAT file into the same directory your MP3s are in
  • double click the BAT file
Don't forget to use "mkdir trimmed" as well since pcutmp3.jar doesn't create directories itself.

CODE
mkdir trimmed
for %%f in (*.mp3) do java -jar pcutmp3.jar --dir trimmed --out "%%s" --crop 1:5s-999m0s "%%f"


Cheers!
SG
mrbruno
works fine, exactly what I needed.
Thanks a lot!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.