批量创建 mp3 歌曲预览

批量创建 mp3 歌曲预览

我想使用每首歌曲的前 30 秒创建 mp3 歌曲片段。我想对每首 mp3 歌曲应用以下操作:

  1. 剪掉每首歌曲的前30秒长度。
  2. 最后应用淡出效果(从 28 秒到 30 秒)
  3. 将该文件保存为另一个 mp3 文件。

由于歌曲数量相当大,因此这需要批量完成。

有什么软件可以做到这一点吗?

我在使用 Windows 7。

谢谢

答案1

我认为你可以用袜子。你可以从stackoverflow 上的这篇文章

我已经尝试使用以下命令行,它似乎可以完成工作:

sox input.mp3 output.mp3 trim 0 30 fade t 0 30 2
     ^^1       ^^2        ^^3       ^^4
  1. 输入文件名
  2. 输出文件名
  3. 将文件时长从 0 秒缩短至 30 秒
  4. 线性淡入 (t),淡入长度为 0,淡出“位置”为 30 秒,淡出长度为 2

然后你只需要编写一个批处理脚本,这样它就可以(递归地)更改所有你想要的 mp3。

他们提供了一个batch-example.bat可能有助于您入门的内容:

rem Example of how to do batch processing with SoX on MS-Windows.
rem
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
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
rem command.

cd %~dp0
mkdir converted
FOR %%A IN (%*) DO sox %%A "converted/%%~nxA" rate -v 44100
pause

相关内容