Set of questions related to playing sound / video in java
Asked Answered
S

1

0

There are some set of questions i wanted to ask related to Java Sound which are as follows :

  • Can i use xuggler with netbeans ?
  • If yes can anyone please tell the way out ?
  • What are the audio and video formats xuggler is able to decode
  • Is xuggler the best open source library to play audio and video in java ?
  • Is JLayer a good library to play audio files ?
  • Can i use JLayer to play video files ?

I want my program to play mp3,wav,mp4,3gp files (commonly used) which is the best library to use ?

Stretcher answered 30/7, 2011 at 18:41 Comment(4)
One question per post - will make discussions on each area easierChasitychasm
@ Noel M i would have posted only the first question..But SO says does not meet our quality standards ! if put up a small question so posted all at once :)Stretcher
I can't see any issue with asking "What are the audio and video formats xuggler is able to decode" or "Can i use JLayer to play video files" as one question. Some others seem to be subjective and would probably get closed. As for the first question, Google seems to answer thatChasitychasm
@ Noel M it would be nice if you answer it. I didn't find anything.Stretcher
C
2

From the top down:

  • Yes, what have you tried? I just installed Xuggler then added the jars and it worked like any other library would. There's nothing special you need to set it up.
  • As above, you'll have to be more specific over what's wrong. It shouldn't require anything special.
  • It depends, but basically anything ffmpeg supports. For more specific information see here.
  • If you're not doing any encoding / transcoding work and all you're doing is playing videos, I'd personally say no, it's not the best. It works on much too low a level, something like VLCJ would probably be a better option using out of process players to make sure it all works correctly. A bit of effort to set up but once you have it there you shouldn't have any problems stability wise, and it'll support pretty much any format out there.
  • Well, yes, but if you're using something like VLCJ already then that can handle everything like that for you.
  • Unless I'm missing something (correct me someone if I'm wrong on this) no.
Concertgoer answered 1/8, 2011 at 21:43 Comment(4)
Well to play a video, you have to grab each packet from the container, decide whether it's an audio or video packet, play it at the right time, sync all the streams up, cope with any errors that might show up... and this is before we deal with syncing and suchlike! There's no play(), pause(), stop() etc. methods - it's not an API that works on that conceptual level.Concertgoer
@ berry120 I can pause the DataLine using stop() ! But yes analyzing each packet is too much of a work.Stretcher
@steve yes, granted! But you see what I mean. As an aside, Xuggler is fantastic for encoding / transcoding work where you need to analyse packets in that sort of detail - it's a very good solution. Just for playback, VLCJ is most likely a better alternative.Concertgoer
@ berry120 Can i forward data using xuggler ?Stretcher

© 2022 - 2024 — McMap. All rights reserved.