JavaFX:MediaException:MEDIA_UNSUPPORTED:不支持的媒体类型 [英] JavaFX : MediaException: MEDIA_UNSUPPORTED : media type not supported

查看:129
本文介绍了JavaFX:MediaException:MEDIA_UNSUPPORTED:不支持的媒体类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在媒体播放器中播放 3gp mov mp4 视频.现在,我正在使用JavaFx媒体播放器,但它仅支持 mp4 视频.因此,我可以在该播放器中同时播放其他两种格式,或者是否有其他可用的解决方案.有什么帮助和建议吗?

I need to play the 3gp, mov and mp4 videos in the media player. Right now I am using JavaFx media player but it supports only mp4 videos. So what I can do to play the other two formats as well in this player or is there any other solution also available for this. Any help and suggestions please?

jdk = 1.7

jdk = 1.7

JavaFx:2.1

JavaFx: 2.1

推荐答案

Here is a list of JavaFX supported audio and video formats.

对于JavaFX不支持的任何内容,您可以选择将它们转换为另一种格式,或者找到一种在应用程序内部对其进行解码的方法.

For anything unsupported by JavaFX, you have the option of either converting them to another format or finding a way to decode them inside your application.

有一些可用于解码的库,例如 JCodec

There are libraries available for decoding, such as JCodec or Jffmpeg

您将需要做一些进一步的研究以确定您的确切要求以及需要支持的格式.有些解决方案比其他解决方案困难.

You will need to do some further research to determine your exact requirements and which formats you will need to support. Some solutions are more difficult than others.

这篇关于JavaFX:MediaException:MEDIA_UNSUPPORTED:不支持的媒体类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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