开发者

How to distinguish between audio file and video file?

开发者 https://www.devze.com 2023-03-16 19:05 出处:网络
I am using Java to write a media application. Given a file, how can I know is it a audio file or video file?

I am using Java to write a media application.

Given a file, how can I know is it a audio file or video file?

By the开发者_运维问答 way, I use vlcj library.


In Java 7 you will be able to use java.nio.file.probeContentType to do this.

In the meantime, there are a number of other options for doing this kind of thing.

0

精彩评论

暂无评论...
验证码 换一张
取 消