alsa录音arecord特殊用法

--max-file-time
While recording, when the output file has been accumulating sound for this long, close it and open a new output file. Default is the maximum size supported by the file format: 2 GiB for WAV files. This option has no effect if --separate-channels is specified.

--use-strftime
When recording, interpret %-codes in the file name parameter using the strftime facility whenever the output file is opened. The important strftime codes are: %Y is the year, %m month, %d day of the month, %H hour, %M minute and %S second. In addition, %v is the file number, starting at 1. When this option is specified, intermediate directories for the output file are created automatically. This option has no effect if --separate-channels is specified.

循环录制

arecord -t wav --max-file-time 30 mon.wav

Record from the default audio source in monaural, 8,000 samples per second, 8 bits per sample. Start a new file every 30 seconds. File names are mon-nn.wav, where nn increases from 01. The file after mon-99.wav is mon-100.wav.

存储在目录./年/月/日/listen-时-分-秒-序号.wav

arecord -f cd -t wav --max-file-time 3600 --use-strftime %Y/%m/%d/listen-%H-%M-%v.wav

Record in stereo from the default audio source. Create a new file every hour. The files are placed in directories based on their start dates and have names which include their start times and file numbers.
存储在当前目录,文件命名年月日-listen-时分-序号.wav

arecord -f cd -t wav --max-file-time 3600 --use-strftime %Y%m%d—listen-%H%M-%v.wav
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值