A simple way of embedding a video in my Swing GUI

前端 未结 2 1992
小鲜肉
小鲜肉 2021-02-02 02:23

I\'ve been looking for a while now for a dead simple way of embedding a video into my Java Swing GUI. Am I chasing after the wind? Ideally, I would love to have something like:<

2条回答
  •  感情败类
    2021-02-02 02:55

    you can use xuggle. This is their site http://www.xuggle.com/. I have use it to display avi(divx) and works "fine". JMF i little bit slow in comparation to xuggle. Problem in java is that you can't accurate sync every frame on windows because Thread.sleep(30) doesn't sleep precisely 30 msec, and minimum how much can sleep in windows OS is 16 msec so you can't tune it to be approximately 30 msec. On linux should work more accurately, I think minimum sleeping time is 1 msec.

提交回复
热议问题