2

I need to convert audio files to mp3 format with a 192 kbps bitrate using xuggler.

The method addAudioStream, which implements the IWriter interface, is writing the audio files at 64 kbps.

How can I set the bit rate?

Pops
  • 30,199
  • 37
  • 136
  • 151
user1019710
  • 321
  • 5
  • 14

1 Answers1

0

Get the Stream Coder for the audio stream and call setBitrate like this:

getStreamCoder().setBitRate(192*1024);
jontro
  • 10,241
  • 6
  • 46
  • 71
  • No, it doesn't affect the output. – user1019710 Dec 03 '11 at 09:53
  • I have a similar problem: I use setBitRate method, but there is no effect on the output file. Have you resolved your problem? How? – mrzasa Jan 16 '12 at 10:05
  • Check [IStreamCoder.setBitRate(int)](http://build.xuggle.com/view/Stable/job/xuggler_jdk5_stable/javadoc/java/api/com/xuggle/xuggler/IStreamCoder.html#setBitRate%28int%29) documentation – nikagra Jun 20 '12 at 15:02