I think you could use sox. You can grab a precompiled version that supports mp3 from this post on stackoverflow.
I've tried it with the following command line and it seems to do the job:
sox input.mp3 output.mp3 trim 0 30 fade t 0 30 2
^^1 ^^2 ^^3 ^^4
- input filename
- output filename
- trim the file from 0 to 30 seconds
- fade linear (t), fade-in-length 0, fade-out 'location' at 30 seconds with fade-out-length of 2
Then you only need to write a batch script, so it can (recursively) change all your desired mp3's.
They provide a
batch-example.bat which might help you get started:
rem Example of how to do batch processing with SoX on MS-Windows.
rem Place this file in the same folder as sox.exe (& rename it as appropriate).
rem You can then drag and drop a selection of files onto the batch file (or
rem onto a `short-cut' to it).
rem In this example, the converted files end up in a folder called `converted',
rem but this, of course, can be changed, as can the parameters to the sox
FOR %%A IN (%*) DO sox %%A "converted/%%~nxA" rate -v 44100