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
`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_MEDIA_PROPERTIES`
`static java.lang.String` `KEY_SIZE`
`static java.lang.String` `KEY_START_TIME`
`static java.lang.String` `KEY_TAGS`

### Constructor Summary

Constructors
`MediaInformation​(org.json.JSONObject jsonObject, java.util.List<StreamInformation> streams)`

### Method Summary

All Methods Instance Methods Concrete Methods
`org.json.JSONObject` `getAllProperties()` Returns all properties defined.
`java.lang.String` `getBitrate()` Returns bitrate.
`java.lang.String` `getDuration()` Returns duration.
`java.lang.String` `getFilename()` Returns file name.
`java.lang.String` `getFormat()` Returns format.
`java.lang.String` `getLongFormat()` Returns long format.
`org.json.JSONObject` `getMediaProperties()` Returns all media properties.
`java.lang.Long` `getNumberProperty​(java.lang.String key)` Returns the media property associated with the key.
`org.json.JSONObject` `getProperties​(java.lang.String key)` Returns the media properties 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` `getStringProperty​(java.lang.String key)` Returns the media property associated with the key.
`org.json.JSONObject` `getTags()` Returns all tags.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### KEY_MEDIA_PROPERTIES

    public static final java.lang.String KEY_MEDIA_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)

### 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 milliseconds

#### 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 dictionary

#### getStreams

    public java.util.List<StreamInformation> getStreams()

Returns all streams.

Returns:
  list of streams

#### getStringProperty

    public java.lang.String getStringProperty​(java.lang.String key)

Returns the media property associated with the key.

Parameters:
  `key` - property key
Returns:
  media property as string or null if the key is not found

#### getNumberProperty

    public java.lang.Long getNumberProperty​(java.lang.String key)

Returns the media property associated with the key.

Parameters:
  `key` - property key
Returns:
  media property as Long or null if the key is not found

#### getProperties

    public org.json.JSONObject getProperties​(java.lang.String key)

Returns the media properties associated with the key.

Parameters:
  `key` - properties key
Returns:
  media properties as a JSONObject or null if the key is not found

#### getMediaProperties

    public org.json.JSONObject getMediaProperties()

Returns all media properties.

Returns:
  all media properties as a JSONObject or null if no media 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