使用Java播放视频 [英] Playing video in Java

查看:751
本文介绍了使用Java播放视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在我的JFrame中播放视频。我环顾四周,我已经安装了Java媒体框架,我尝试了很多方法,媒体面板似乎不工作,我不理解播放器。如果有人可以告诉我一个简单的方法来在JFrame中播放视频,甚至可以使用哪种方法调用它。



(我也有.avi文件与.class和.java文件相同的目录)

解决方案

JMF基本上已死。 / h3>

我没有使用Swing播放视频的第一手经验,但这里有一些你可能会尝试的JMF的替代方法。还有一些关于此问题的SO问题:



基于这些,它看起来像 Xuggler 是解决方案。


I need to play a video in my JFrame. I've looked around and I have installed the Java media framework and I've tried numerous ways, media panel doesn't seem to work and I don't understand Player. If someone could tell me an easy way to play a video inside a JFrame or even which methods to call that would be great.

( I also have the .avi file in the same directory as the .class and .java files )

解决方案

JMF is basically dead.

I don't have first-hand experience with playing video with Swing, but here's a list of alternatives to JMF you might try. There are also a number of SO questions about this already:

Based on those, it looks like Xuggler is the solution.

这篇关于使用Java播放视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆