Settings | Sign in | Sign up

The author has 5 posts.

linux放音和录音命令

Floor 1 巨大八爪鱼 4/28/25 14:01

放音:./aplay test.wav

设置放音音量:./amixer sset "DAC LINEOUT" 100%

录音:./arecord -d 秒数 test2.wav

Floor 2 巨大八爪鱼 4/28/25 14:02

arecord就是aplay的软链接。

ln -s aplay arecord

Floor 3 巨大八爪鱼 4/29/25 10:29

读取放音音量:./amixer sget "DAC LINEOUT"

 

8位无符号8kHz单声道采样(Unsigned 8 bit, Rate 8000 Hz, Mono)录音:

./arecord -d 2 a.wav

16位有符号小端序44.1kHz双声道采样(Signed 16 bit Little Endian, Rate 44100 Hz, Stereo)录音:

./arecord -d 2 a.wav -f cd

32位有符号小端序48kHz单声道采样(Signed 32 bit Little Endian, Rate 48000 Hz, Mono)录音:

./arecord -d 2 a.wav -f S32_LE -r 48000 -c 1

Floor 4 巨大八爪鱼 4/29/25 11:06

24位有符号小端序48kHz单声道采样(Signed 24 bit Little Endian, Rate 48000 Hz, Mono)录音:

./arecord -d 2 a.wav -f S24_LE -r 48000 -c 1

巨大八爪鱼: 选24位模式的话,实测得到的wav文件是32位的,并且播放起来没有声音。不如直接选32位的。

Content converter:

Reply the post
Content:
User: You are currently anonymous.
Captcha:
Unclear? Try another one.
©2010-2025 Purasbar Ver3.0 [Mobile] [Desktop]
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported license.