com.arthenica.ffmpegkit

## Class MediaInformationJsonParser

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

-     public class MediaInformationJsonParser
      extends java.lang.Object

  A parser that constructs `MediaInformation` from FFprobe's json output.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MediaInformationJsonParser()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static MediaInformation` | `from(java.lang.String ffprobeJsonOutput)` Extracts `MediaInformation` from the given FFprobe json output.
    `static MediaInformation` | `fromWithError(java.lang.String ffprobeJsonOutput)` Extracts MediaInformation from the given FFprobe json output.

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

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

- - ### Constructor Detail

    - #### MediaInformationJsonParser

          public MediaInformationJsonParser()

  - ### Method Detail

    - #### from

          public static MediaInformation from(java.lang.String ffprobeJsonOutput)

      Extracts `MediaInformation` from the given FFprobe json output. Note that this method does not throw `JSONException` as `fromWithError(String)` does and handles errors internally.
      Parameters:
        `ffprobeJsonOutput` - FFprobe json output
      Returns:
        created `MediaInformation` instance of null if a parsing error occurs

    - #### fromWithError

          public static MediaInformation fromWithError(java.lang.String ffprobeJsonOutput)
                                                throws org.json.JSONException

      Extracts MediaInformation from the given FFprobe json output.
      Parameters:
        `ffprobeJsonOutput` - ffprobe json output
      Returns:
        created `MediaInformation` instance
      Throws:
        `org.json.JSONException` - if a parsing error occurs