Package com.arthenica.ffmpegkit
Class MediaInformation
- java.lang.Object
-
- com.arthenica.ffmpegkit.MediaInformation
-
public class MediaInformation extends java.lang.Object
Media information class.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
KEY_BIT_RATE
static java.lang.String
KEY_DURATION
static java.lang.String
KEY_FILENAME
static java.lang.String
KEY_FORMAT
static java.lang.String
KEY_FORMAT_LONG
static java.lang.String
KEY_FORMAT_PROPERTIES
static java.lang.String
KEY_SIZE
static java.lang.String
KEY_START_TIME
static java.lang.String
KEY_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.JSONObject
getAllProperties()
Returns all properties defined.java.lang.String
getBitrate()
Returns bitrate.java.util.List<Chapter>
getChapters()
Returns all chapters.java.lang.String
getDuration()
Returns duration.java.lang.String
getFilename()
Returns file name.java.lang.String
getFormat()
Returns format.org.json.JSONObject
getFormatProperties()
Returns all format properties defined.org.json.JSONObject
getFormatProperty(java.lang.String key)
Returns the format property associated with the key.java.lang.String
getLongFormat()
Returns long format.java.lang.Long
getNumberFormatProperty(java.lang.String key)
Returns the format property associated with the key.java.lang.Long
getNumberProperty(java.lang.String key)
Returns the property associated with the key.org.json.JSONObject
getProperty(java.lang.String key)
Returns the property associated with the key.java.lang.String
getSize()
Returns size.java.lang.String
getStartTime()
Returns start time.java.util.List<StreamInformation>
getStreams()
Returns all streams.java.lang.String
getStringFormatProperty(java.lang.String key)
Returns the format property associated with the key.java.lang.String
getStringProperty(java.lang.String key)
Returns the property associated with the key.org.json.JSONObject
getTags()
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
-
-