Class MediaInfo
- All Implemented Interfaces:
- AutoCloseable
The default optional class to access media file attributes without the need to define a customized class that
extends 
MediaInfoBase.
Example usage:
MediaInfoLibrary library = MediaInfoLibrary.newInstance();
MediaInfoAccessor accessor = new MediaInfoAccessor(library);
try (MediaInfo myVideo = new MediaInfo(accessor).open("./MyVideo.mkv")) {
    List videoCodecs = MediaInfo.parseList(myVideo.get(StreamType.General, 0, "Video_Codec_List"));
    int videoWidth = Integer.parseInt(myVideo.get(StreamType.Video, 0, "Width"));
    // Get and parse additional parameters...
}
 - See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionget(StreamType streamType, int streamNumber, int parameterIndex) Get a piece of information about a file (parameter is an integer that represents the parameter index).get(StreamType streamType, int streamNumber, int parameterIndex, InfoType infoType) Get a piece of information about a file (parameter is an integer that represents the parameter index).get(StreamType streamType, int streamNumber, String parameter) Get a piece of information about a file (parameter is a string).get(StreamType streamType, int streamNumber, String parameter, InfoType infoType) Get a piece of information about a file (parameter is a string).get(StreamType streamType, int streamNumber, String parameter, InfoType infoType, InfoType searchType) Get a piece of information about a file (parameter is a string).Gets information about MediaInfo.intgetStreamCount(StreamType streamType) Gets the number of streams for the given stream type.intgetStreamOrParameterCount(StreamType streamType, int streamNumber) Gets the number of streams for the given stream type or the total count of information parameters for a stream.inform()Get all details about a file.Configures information about MediaInfo.Methods inherited from class MediaInfoBaseclose, open, parseList, parseTime
- 
Constructor Details- 
MediaInfoCreates a newMediaInfoobject.- Parameters:
- accessor- the accessor used to call the underling libMediaInfo library.
 
 
- 
- 
Method Details- 
informGet all details about a file.- Returns:
- All details about a file in one string
 
- 
getGet a piece of information about a file (parameter is a string).- Parameters:
- streamType- the stream type
- streamNumber- the stream number
- parameter- the parameter you are looking for in the stream (e.g., resolution, codec, bitrate, etc.)
- Returns:
- the query result, or empty if there is a problem or not found
- See Also:
 
- 
getGet a piece of information about a file (parameter is a string).- Parameters:
- streamType- the stream type
- streamNumber- the stream number
- parameter- the parameter you are looking for in the stream (e.g., resolution, codec, bitrate, etc.)
- infoType- the type of information about the parameter
- See Also:
 
- 
getpublic String get(StreamType streamType, int streamNumber, String parameter, InfoType infoType, InfoType searchType) Get a piece of information about a file (parameter is a string). For a list of available parameters, please refer to General.csv.- Parameters:
- streamType- the stream type
- streamNumber- the stream number
- parameter- the parameter you are looking for in the stream (e.g., resolution, codec, bitrate, etc.)
- infoType- the type of information about the parameter
- searchType- describes where to look for the parameter
- Returns:
- the queries information; or an empty string if there was a problem
 
- 
getGet a piece of information about a file (parameter is an integer that represents the parameter index).- Parameters:
- streamType- the stream type
- streamNumber- the stream number
- parameterIndex- the parameter index that you are looking for in the stream
- Returns:
- a string about information you search, an empty string if there is a problem
 
- 
getGet a piece of information about a file (parameter is an integer that represents the parameter index).- Parameters:
- streamType- the stream type
- streamNumber- the stream number
- parameterIndex- the parameter index that you are looking for in the stream
- infoType- the type of information you want about the parameter (the text, the measure, the help...)
- Returns:
- the information or an empty string if there is a problem
 
- 
getStreamCountGets the number of streams for the given stream type.- Parameters:
- streamType- the stream type
- Returns:
- number of streams of the given stream type
 
- 
getStreamOrParameterCountGets the number of streams for the given stream type or the total count of information parameters for a stream.- Parameters:
- streamType- the stream type
- streamNumber- the stream number
- Returns:
- number of streams of the given stream type
 
- 
getOption
- 
setOption
 
-