Package com.arthenica.ffmpegkit
Class MediaInformationJsonParser
- java.lang.Object
-
- com.arthenica.ffmpegkit.MediaInformationJsonParser
-
public class MediaInformationJsonParser extends java.lang.Object
A parser that constructsMediaInformation
from FFprobe's json output.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
KEY_CHAPTERS
static java.lang.String
KEY_STREAMS
-
Constructor Summary
Constructors Constructor Description MediaInformationJsonParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MediaInformation
from(java.lang.String ffprobeJsonOutput)
ExtractsMediaInformation
from the given FFprobe json output.static MediaInformation
fromWithError(java.lang.String ffprobeJsonOutput)
Extracts MediaInformation from the given FFprobe json output.
-
-
-
Field Detail
-
KEY_STREAMS
public static final java.lang.String KEY_STREAMS
- See Also:
- Constant Field Values
-
KEY_CHAPTERS
public static final java.lang.String KEY_CHAPTERS
- See Also:
- Constant Field Values
-
-
Method Detail
-
from
public static MediaInformation from(java.lang.String ffprobeJsonOutput)
ExtractsMediaInformation
from the given FFprobe json output. Note that this method does not throwJSONException
asfromWithError(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
-
-