Create a silent mp3 from the command line

后端 未结 4 897
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-01 19:37

I am trying to create a silent / empty mp3 file of (x) seconds using the command line. Quite a simple task I thought!

It seems LAME is able to do something like this, bu

4条回答
  •  心在旅途
    2021-02-01 20:25

    Avoid the nuisance of creating a wav header, and let lame handle a raw file:

    dd if=/dev/zero bs=1M count=? | lame -r - - > silence.mp3
    

    setting ?=2 gives a 11 second file (@ standard 44KhZ, etc... parameters).

    Note: this was tested on Unix; I understand there are dd and lame for windows, too.

提交回复
热议问题