Is there a higher level API for Xuggler?

2k Views Asked by At

After downloading and using Xuggler, my initial impressions are very good; it supports a whole host of codecs, it was relatively hassle free to get going and the getting started tutorial videos explained all the necessary concepts very clearly.

However, after playing around with it for a couple of days I'm really tearing my hair out over getting all the audio and video to sync up nicely. It's fine when playing normally but when adding pausing, seeking and accounting for occasional 6 second pauses while my external hard drive spins up it becomes an absolute nightmare.

I've partly implemented something already but it's nowhere near perfect - you can seek around a few times but after a while it still drifts off.

I can't help thinking this is a common use case of Xuggler and someone must have done this sort of thing already much better than I have. But alas, I can't find any examples beyond the ones on the website. Is there a higher level API around that manages all the audio / video sync issues and just provides some higher level controls (play, pause, stop etc.)? I've no problem going down the route of doing it myself if there's nothing out there already, but I've never been a fan of reinventing the wheel (especially if my new wheel is in all likelihood worse than the old one!)

1

There are 1 best solutions below

0
On BEST ANSWER

This is really a two part answer - the first being yes, there is a higher level "player" framework here. It's in early stages but much better than anything I would have cobbled together quickly, and I'm sure the guy running it would be open to any improvements in the code.

Secondly, I didn't really go with the above at all because I looked to VLCJ instead which uses libVLC which in turn has all the synchronisation stuff built in nicely. To get multiple players embedded in the application reliably you need to use out of process players (see here for how I went about doing it) but once that framework is in place it works reliably, fast and overall very well.