audio - sox - how to create mp3 file with bit rate 16kbps -
audio - sox - how to create mp3 file with bit rate 16kbps -
currently command used
`sox input.wav -g -t mp3 -r 16k test.mp3` but creating file bit rate 24.0 kbps.
how create bit rate of out set file 16.0 kbps?
in sox formats manual find, -c option. below quote whole section because may find interesting.
however, if phone call sox test.wav -c 16.01 test.mp3 testfile (48khz/16bit) converted 32kbps. if phone call lame test.wav -b 16 -q 0 test.mp3 16kbps test.mp3 converted samplerate of 8khz. if want maintain 48khz lame test.wav -b 16 -q 0 --resample 48000 test.mp3 32kbps. see, there compromise between high samplerate , high compression ratio.
mp3 compressed audio; mp3 (mpeg layer 3) part of patent-encumbered mpeg standards sound , video compression. lossy compression format achieves compression rates little quality loss.
because mp3 patented, sox cannot distributed mp3 back upwards without incurring patent holder’s fees. users require sox mp3 back upwards must compile , build sox mp3 libraries (lame & mad) source code, or, in cases, obtain pre-built dynamically loadable libraries.
when reading mp3 files, 28 bits of precision stored although 16 bits reported user. allow default behavior of writing 16 bit output files. user can specify higher precision output file prevent lossing information. mp3 output files utilize 24 bits of precision while encoding.
mp3 compression parameters can selected using sox’s −c alternative follows (note current syntax subject change):
the primary parameter lame encoder bit rate. if value of −c value positive integer, it’s taken bitrate in kbps (e.g. if specify 128, uses 128 kbps).
the sec of import parameter "quality" (really performance), allows balancing encoding speed vs. quality. in lame, 0 specifies highest quality slow, while 9 selects poor quality, fast. (5 default , 2 recommended trade-off high quality encodes.)
because −c value float, fractional part used select quality. 128.2 selects 128 kbps encoding quality of 2. there 1 problem approach. need 128 specify 128 kbps encoding default quality, 0 means utilize default. instead of 0 have utilize .01 (or .99) specify highest quality (128.01 or 128.99).
lame uses bitrate specify constant bitrate, higher quality can achieved using variable bit rate (vbr). vbr quality (really size) selected using number 0 9. utilize value of 0 high quality, larger files, , 9 smaller files of lower quality. 4 default.
in order squeeze selection of vbr the −c value float utilize negative numbers select vrr. -4.2 select default vbr encoding (size) high quality (speed). 1 special case 0, valid vbr encoding parameter not valid bitrate. compression value of 0 treated high quality vbr, result both -0.2 , 0.2 treated highest quality vbr (size) , high quality (speed).
audio mp3 sox transcoding libsox
Comments
Post a Comment