forwarding and rewinding audio in xuggler
Asked Answered
R

1

1

I have used xuggler to play audio files other than wav,au,aiff. Since xuggler performs audio decoding at low level it is very hard to write a method that both forwards and rewinds the audio being played . ( while decoding xuggler analyzes each data packet and then sends it to play)

One way could be read bunch of packets at a time and then send the next packet to play.This way the effect of forwarding audio can be felt . But i don't know how to implement this method Moreover this is not the best way i can forward the data.

Are there any direct methods to forward and rewind audio ? If not direct what is the algorithm , steps to do this ?

Roadway answered 3/8, 2011 at 9:41 Comment(1)
@ closer you find this question hard to understand ? I guess why everybody is trying to close down xuggle questions !Roadway
R
2

Have you looked at the seekKeyFrame() method in IContainer? See here. On seek, you could just flush the dataline and then on execution of the method the container should jump to the given location.

If you want to do it by a percentage call, then getDuration() gets the entire length of the stream (if available.) You can then work out accurate timestamps from there.

Ralfston answered 3/8, 2011 at 17:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.