sox can't encode to 16-bit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all, 

I'm trying to record by sox, splitting the input to multiple files: 

$ sox --version 
sox:      SoX v14.4.1 

$ rec -c 2 -b 16 -r 48000 -p trim 0 20 | 
sox -V3 -c 2 -b 16 -r 48000 -p test.wav trim 0 10 : newfile : restart 

I want to record 16-bit wav files, but the files generated are 32-bit ones. 

$ soxi test*.wav 

Input File     : 'test001.wav' 
Channels       : 2 
Sample Rate    : 48000 
Precision      : 32-bit 
Duration       : 00:00:10.00 = 480000 samples ~ 750 CDDA sectors 
File Size      : 3.84M 
Bit Rate       : 3.07M 
Sample Encoding: 32-bit Signed Integer PCM 


Input File     : 'test002.wav' 
Channels       : 2 
Sample Rate    : 48000 
Precision      : 32-bit 
Duration       : 00:00:10.00 = 480000 samples ~ 750 CDDA sectors 
File Size      : 3.84M 
Bit Rate       : 3.07M 
Sample Encoding: 32-bit Signed Integer PCM 

During recording, I have a message saying: 
"rec WARN formats: sox can't encode to 16-bit" 

When I record without splitting, I can get 16-bit wav files. 

$ rec -c 2 -b 16 -r 48000 test.wav trim 0 20 

$ soxi test.wav 

Input File     : 'test.wav' 
Channels       : 2 
Sample Rate    : 48000 
Precision      : 16-bit 
Duration       : 00:00:20.00 = 960000 samples ~ 1500 CDDA sectors 
File Size      : 3.84M 
Bit Rate       : 1.54M 
Sample Encoding: 16-bit Signed Integer PCM 

Is there any way to record 16-bit wav files, not 32-bit? 

Regards, 

-- 
Toru Yagi 
yagitohru@xxxxxxxxxxx 



_______________________________________________
Sox-users mailing list
Sox-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/sox-users




[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux