com.arthenica.ffmpegkit

## Class StreamInformation

- java.lang.Object
- - com.arthenica.ffmpegkit.StreamInformation

-     public class StreamInformation
      extends java.lang.Object

  Stream information class.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `KEY_AVERAGE_FRAME_RATE`
    `static java.lang.String` | `KEY_BIT_RATE`
    `static java.lang.String` | `KEY_CHANNEL_LAYOUT`
    `static java.lang.String` | `KEY_CODEC`
    `static java.lang.String` | `KEY_CODEC_LONG`
    `static java.lang.String` | `KEY_CODEC_TIME_BASE`
    `static java.lang.String` | `KEY_DISPLAY_ASPECT_RATIO`
    `static java.lang.String` | `KEY_FORMAT`
    `static java.lang.String` | `KEY_HEIGHT`
    `static java.lang.String` | `KEY_INDEX`
    `static java.lang.String` | `KEY_REAL_FRAME_RATE`
    `static java.lang.String` | `KEY_SAMPLE_ASPECT_RATIO`
    `static java.lang.String` | `KEY_SAMPLE_FORMAT`
    `static java.lang.String` | `KEY_SAMPLE_RATE`
    `static java.lang.String` | `KEY_TAGS`
    `static java.lang.String` | `KEY_TIME_BASE`
    `static java.lang.String` | `KEY_TYPE`
    `static java.lang.String` | `KEY_WIDTH`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StreamInformation(org.json.JSONObject jsonObject)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.json.JSONObject` | `getAllProperties()` Returns all stream properties defined.
    `java.lang.String` | `getAverageFrameRate()` Returns display aspect ratio.
    `java.lang.String` | `getBitrate()` Returns bitrate.
    `java.lang.String` | `getChannelLayout()` Returns channel layout.
    `java.lang.String` | `getCodec()` Returns stream codec.
    `java.lang.String` | `getCodecLong()` Returns stream codec in long format.
    `java.lang.String` | `getCodecTimeBase()` Returns codec time base.
    `java.lang.String` | `getDisplayAspectRatio()` Returns display aspect ratio.
    `java.lang.String` | `getFormat()` Returns stream format.
    `java.lang.Long` | `getHeight()` Returns height.
    `java.lang.Long` | `getIndex()` Returns stream index.
    `java.lang.Long` | `getNumberProperty(java.lang.String key)` Returns the stream property associated with the key.
    `org.json.JSONObject` | `getProperties(java.lang.String key)` Returns the stream properties associated with the key.
    `java.lang.String` | `getRealFrameRate()` Returns real frame rate.
    `java.lang.String` | `getSampleAspectRatio()` Returns sample aspect ratio.
    `java.lang.String` | `getSampleFormat()` Returns sample format.
    `java.lang.String` | `getSampleRate()` Returns sample rate.
    `java.lang.String` | `getStringProperty(java.lang.String key)` Returns the stream property associated with the key.
    `org.json.JSONObject` | `getTags()` Returns all tags.
    `java.lang.String` | `getTimeBase()` Returns time base.
    `java.lang.String` | `getType()` Returns stream type.
    `java.lang.Long` | `getWidth()` Returns width.

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

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

- - ### Field Detail

    - #### KEY_INDEX

          public static final java.lang.String KEY_INDEX

      See Also:
        Constant Field Values

    - #### KEY_TYPE

          public static final java.lang.String KEY_TYPE

      See Also:
        Constant Field Values

    - #### KEY_CODEC

          public static final java.lang.String KEY_CODEC

      See Also:
        Constant Field Values

    - #### KEY_CODEC_LONG

          public static final java.lang.String KEY_CODEC_LONG

      See Also:
        Constant Field Values

    - #### KEY_FORMAT

          public static final java.lang.String KEY_FORMAT

      See Also:
        Constant Field Values

    - #### KEY_WIDTH

          public static final java.lang.String KEY_WIDTH

      See Also:
        Constant Field Values

    - #### KEY_HEIGHT

          public static final java.lang.String KEY_HEIGHT

      See Also:
        Constant Field Values

    - #### KEY_BIT_RATE

          public static final java.lang.String KEY_BIT_RATE

      See Also:
        Constant Field Values

    - #### KEY_SAMPLE_RATE

          public static final java.lang.String KEY_SAMPLE_RATE

      See Also:
        Constant Field Values

    - #### KEY_SAMPLE_FORMAT

          public static final java.lang.String KEY_SAMPLE_FORMAT

      See Also:
        Constant Field Values

    - #### KEY_CHANNEL_LAYOUT

          public static final java.lang.String KEY_CHANNEL_LAYOUT

      See Also:
        Constant Field Values

    - #### KEY_SAMPLE_ASPECT_RATIO

          public static final java.lang.String KEY_SAMPLE_ASPECT_RATIO

      See Also:
        Constant Field Values

    - #### KEY_DISPLAY_ASPECT_RATIO

          public static final java.lang.String KEY_DISPLAY_ASPECT_RATIO

      See Also:
        Constant Field Values

    - #### KEY_AVERAGE_FRAME_RATE

          public static final java.lang.String KEY_AVERAGE_FRAME_RATE

      See Also:
        Constant Field Values

    - #### KEY_REAL_FRAME_RATE

          public static final java.lang.String KEY_REAL_FRAME_RATE

      See Also:
        Constant Field Values

    - #### KEY_TIME_BASE

          public static final java.lang.String KEY_TIME_BASE

      See Also:
        Constant Field Values

    - #### KEY_CODEC_TIME_BASE

          public static final java.lang.String KEY_CODEC_TIME_BASE

      See Also:
        Constant Field Values

    - #### KEY_TAGS

          public static final java.lang.String KEY_TAGS

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### StreamInformation

          public StreamInformation(org.json.JSONObject jsonObject)

  - ### Method Detail

    - #### getIndex

          public java.lang.Long getIndex()

      Returns stream index.
      Returns:
        stream index, starting from zero

    - #### getType

          public java.lang.String getType()

      Returns stream type.
      Returns:
        stream type; audio or video

    - #### getCodec

          public java.lang.String getCodec()

      Returns stream codec.
      Returns:
        stream codec

    - #### getCodecLong

          public java.lang.String getCodecLong()

      Returns stream codec in long format.
      Returns:
        stream codec with additional profile and mode information

    - #### getFormat

          public java.lang.String getFormat()

      Returns stream format.
      Returns:
        stream format

    - #### getWidth

          public java.lang.Long getWidth()

      Returns width.
      Returns:
        width in pixels

    - #### getHeight

          public java.lang.Long getHeight()

      Returns height.
      Returns:
        height in pixels

    - #### getBitrate

          public java.lang.String getBitrate()

      Returns bitrate.
      Returns:
        bitrate in kb/s

    - #### getSampleRate

          public java.lang.String getSampleRate()

      Returns sample rate.
      Returns:
        sample rate in hz

    - #### getSampleFormat

          public java.lang.String getSampleFormat()

      Returns sample format.
      Returns:
        sample format

    - #### getChannelLayout

          public java.lang.String getChannelLayout()

      Returns channel layout.
      Returns:
        channel layout

    - #### getSampleAspectRatio

          public java.lang.String getSampleAspectRatio()

      Returns sample aspect ratio.
      Returns:
        sample aspect ratio

    - #### getDisplayAspectRatio

          public java.lang.String getDisplayAspectRatio()

      Returns display aspect ratio.
      Returns:
        display aspect ratio

    - #### getAverageFrameRate

          public java.lang.String getAverageFrameRate()

      Returns display aspect ratio.
      Returns:
        average frame rate in fps

    - #### getRealFrameRate

          public java.lang.String getRealFrameRate()

      Returns real frame rate.
      Returns:
        real frame rate in tbr

    - #### getTimeBase

          public java.lang.String getTimeBase()

      Returns time base.
      Returns:
        time base in tbn

    - #### getCodecTimeBase

          public java.lang.String getCodecTimeBase()

      Returns codec time base.
      Returns:
        codec time base in tbc

    - #### getTags

          public org.json.JSONObject getTags()

      Returns all tags.
      Returns:
        tags dictionary

    - #### getStringProperty

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

      Returns the stream property associated with the key.
      Parameters:
        `key` - property key
      Returns:
        stream property as string or null if the key is not found

    - #### getNumberProperty

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

      Returns the stream property associated with the key.
      Parameters:
        `key` - property key
      Returns:
        stream property as Long or null if the key is not found

    - #### getProperties

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

      Returns the stream properties associated with the key.
      Parameters:
        `key` - properties key
      Returns:
        stream properties as a JSONObject or null if the key is not found

    - #### getAllProperties

          public org.json.JSONObject getAllProperties()

      Returns all stream properties defined.
      Returns:
        all stream properties as a JSONObject or null if no properties are defined