java 嵌入视频,在Swing GUI中嵌入视频的简单方法

在寻找将视频嵌入Java Swing GUI的简单方法时,作者发现JMF(Java Media Framework)可能需要较多代码。然而,提供了一个简洁的JMF示例,只需要六行代码即可创建基本的媒体播放器。此外,还提到了Xuggle和VLC的Java绑定作为其他解决方案,但可能需要更多工作。
摘要由CSDN通过智能技术生成

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:

VideoPlayer video = new VideoPlayer("filename");

frame.getContentPane().add(video);

video.play();

Am I searching for something that doesn't exist? I've developing mainly for linux but with windows in mind as I might try and make my application cross platform in the future.

Addtional information:

I've looked at JMF before and was unpleased at the amount of code needed before a video could actually be displayed and played. I might visit it again.

I thought of an embedded browser that would play a video using VLC, but again not the easiest thing ever.

I have complete control on the format of the videos to be played. They are fixed in numb

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值