Set of questions related to playing sound / video in java

微笑、不失礼 提交于 2019-12-23 04:40:42

问题


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 ?


回答1:


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.


来源:https://stackoverflow.com/questions/6885226/set-of-questions-related-to-playing-sound-video-in-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!