Get Video file metadata in Java

夙愿已清 提交于 2019-12-05 07:52:09

问题


I have been trying to find a way to get the metadata out of video files such as frame rate, length, codec, aspect ratio. What java libraries are out there that would be good for this?


回答1:


You can use VLCJ (GPL license)

VLCJ wraps around libVLC DLL library (the library used in VLC) via JNA for Java app. It supports reading the metadata from a media file via MediaPlayer.getMediaMeta()

Take note: certain versions of VLCJ don't work in full functionality with certain versions of libVLC. For example, VLCJ 1.2.x only works perfectly well with libVLC 1.2.0 (which is not released yet - a nightly build at the moment). If you use it with libVLC 1.1.x, it won't be able to read media file metadata via MediaPlayer.getMediaMeta(). In this case, you need to get the correct libVLC library for VLCJ version you choose.

http://code.google.com/p/vlcj/wiki/WhichVersion

VLCJ 1.2.x has some design changes when compared to VLCJ 1.1.x which may frustrate seasoned developer of VLCJ but it is for the good reasons.



来源:https://stackoverflow.com/questions/8380425/get-video-file-metadata-in-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!