Package com.arthenica.ffmpegkit
Class MediaInformation
- java.lang.Object
-
- com.arthenica.ffmpegkit.MediaInformation
-
public class MediaInformation extends java.lang.ObjectMedia information class.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringKEY_BIT_RATEstatic java.lang.StringKEY_DURATIONstatic java.lang.StringKEY_FILENAMEstatic java.lang.StringKEY_FORMATstatic java.lang.StringKEY_FORMAT_LONGstatic java.lang.StringKEY_FORMAT_PROPERTIESstatic java.lang.StringKEY_SIZEstatic java.lang.StringKEY_START_TIMEstatic java.lang.StringKEY_TAGS
-
Constructor Summary
Constructors Constructor Description MediaInformation(org.json.JSONObject jsonObject, java.util.List<StreamInformation> streams, java.util.List<Chapter> chapters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.json.JSONObjectgetAllProperties()Returns all properties defined.java.lang.StringgetBitrate()Returns bitrate.java.util.List<Chapter>getChapters()Returns all chapters.java.lang.StringgetDuration()Returns duration.java.lang.StringgetFilename()Returns file name.java.lang.StringgetFormat()Returns format.org.json.JSONObjectgetFormatProperties()Returns all format properties defined.org.json.JSONObjectgetFormatProperty(java.lang.String key)Returns the format property associated with the key.java.lang.StringgetLongFormat()Returns long format.java.lang.LonggetNumberFormatProperty(java.lang.String key)Returns the format property associated with the key.java.lang.LonggetNumberProperty(java.lang.String key)Returns the property associated with the key.org.json.JSONObjectgetProperty(java.lang.String key)Returns the property associated with the key.java.lang.StringgetSize()Returns size.java.lang.StringgetStartTime()Returns start time.java.util.List<StreamInformation>getStreams()Returns all streams.java.lang.StringgetStringFormatProperty(java.lang.String key)Returns the format property associated with the key.java.lang.StringgetStringProperty(java.lang.String key)Returns the property associated with the key.org.json.JSONObjectgetTags()Returns all tags.
-
-
-
Field Detail
-
KEY_FORMAT_PROPERTIES
public static final java.lang.String KEY_FORMAT_PROPERTIES
- See Also:
- Constant Field Values
-
KEY_FILENAME
public static final java.lang.String KEY_FILENAME
- See Also:
- Constant Field Values
-
KEY_FORMAT
public static final java.lang.String KEY_FORMAT
- See Also:
- Constant Field Values
-
KEY_FORMAT_LONG
public static final java.lang.String KEY_FORMAT_LONG
- See Also:
- Constant Field Values
-
KEY_START_TIME
public static final java.lang.String KEY_START_TIME
- See Also:
- Constant Field Values
-
KEY_DURATION
public static final java.lang.String KEY_DURATION
- See Also:
- Constant Field Values
-
KEY_SIZE
public static final java.lang.String KEY_SIZE
- See Also:
- Constant Field Values
-
KEY_BIT_RATE
public static final java.lang.String KEY_BIT_RATE
- See Also:
- Constant Field Values
-
KEY_TAGS
public static final java.lang.String KEY_TAGS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MediaInformation
public MediaInformation(org.json.JSONObject jsonObject, java.util.List<StreamInformation> streams, java.util.List<Chapter> chapters)
-
-
Method Detail
-
getFilename
public java.lang.String getFilename()
Returns file name.- Returns:
- media file name
-
getFormat
public java.lang.String getFormat()
Returns format.- Returns:
- media format
-
getLongFormat
public java.lang.String getLongFormat()
Returns long format.- Returns:
- media long format
-
getDuration
public java.lang.String getDuration()
Returns duration.- Returns:
- media duration in "seconds.microseconds" format
-
getStartTime
public java.lang.String getStartTime()
Returns start time.- Returns:
- media start time in milliseconds
-
getSize
public java.lang.String getSize()
Returns size.- Returns:
- media size in bytes
-
getBitrate
public java.lang.String getBitrate()
Returns bitrate.- Returns:
- media bitrate in kb/s
-
getTags
public org.json.JSONObject getTags()
Returns all tags.- Returns:
- tags as a JSONObject
-
getStreams
public java.util.List<StreamInformation> getStreams()
Returns all streams.- Returns:
- list of streams
-
getChapters
public java.util.List<Chapter> getChapters()
Returns all chapters.- Returns:
- list of chapters
-
getStringProperty
public java.lang.String getStringProperty(java.lang.String key)
Returns the property associated with the key.- Parameters:
key- property key- Returns:
- property as string or null if the key is not found
-
getNumberProperty
public java.lang.Long getNumberProperty(java.lang.String key)
Returns the property associated with the key.- Parameters:
key- property key- Returns:
- property as Long or null if the key is not found
-
getProperty
public org.json.JSONObject getProperty(java.lang.String key)
Returns the property associated with the key.- Parameters:
key- property key- Returns:
- property as a JSONObject or null if the key is not found
-
getStringFormatProperty
public java.lang.String getStringFormatProperty(java.lang.String key)
Returns the format property associated with the key.- Parameters:
key- property key- Returns:
- format property as string or null if the key is not found
-
getNumberFormatProperty
public java.lang.Long getNumberFormatProperty(java.lang.String key)
Returns the format property associated with the key.- Parameters:
key- property key- Returns:
- format property as Long or null if the key is not found
-
getFormatProperty
public org.json.JSONObject getFormatProperty(java.lang.String key)
Returns the format property associated with the key.- Parameters:
key- property key- Returns:
- format property as a JSONObject or null if the key is not found
-
getFormatProperties
public org.json.JSONObject getFormatProperties()
Returns all format properties defined.- Returns:
- all format properties as a JSONObject or null if no format properties are defined
-
getAllProperties
public org.json.JSONObject getAllProperties()
Returns all properties defined.- Returns:
- all properties as a JSONObject or null if no properties are defined
-
-