Category: Xuggler

Resample it yourself

Did you guys ever try to resample audio-data of a clip in java? The JMF not very helpful, but today I will give you a little introduction to the xuggle library which will do that for you.

Xuggler is a library with the power of ffmpeg in your java application. A couple of weeks ago it was able to play video clips in your java application. But the real awesome stuff came with the new version of Xuggler. In version 3.0, which was released under AGPL :( , the MediaTools showed up. Now its possible to decode and encode your video clip from any format to any format.

If that is everything you need, you’ll be fine with just that. But if you need to resample the audio data (what you need, if you want to put the clip into, lets say, a FLV-Container), you need to implement a little more then just

while(packet.read() == null);

Read more »