2

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!)

Michael Berry
  • 70,193
  • 21
  • 157
  • 216
  • Just to give you a small caution. My team was using Xuggler to parse an incoming video stream and, any time the stream had any sort of corruption, Xuggler would crash and bring down the JVM in a segfault. Just throwing that out there :) – Jon7 Jul 14 '11 at 14:12
  • @Jon7, thanks for the word of caution. It seems that all the media APIs that do what I want are prone to doing this at some point though - vlcj which I'm also looking at has a tendency to crash the JVM every so often, and the gstreamer-java bindings were in the same boat. Unless of course you could suggest one that doesn't? :-) – Michael Berry Jul 15 '11 at 00:18
  • I suppose I can't actually suggest a better alternative., good call :) We were only concerned with the associated metadata, so we wrote our own parser to pull that out and discard the video data. – Jon7 Jul 15 '11 at 00:35

1 Answers1

2

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.

Michael Berry
  • 70,193
  • 21
  • 157
  • 216