1. 程式人生 > >java獲取音訊的位元率

java獲取音訊的位元率

String fileName ="D:\\pcm2\\back.wav";
File wav = new File( fileName );
Encoder encoder = new Encoder();
try {
    MultimediaInfo mul = encoder.getInfo(wav);
    int bit = mul.getAudio().getBitRate();
    System.out.println(bit);

} catch (EncoderException e) {
    e.printStackTrace();
}