Package com.arthenica.ffmpegkit
Class MediaInformationJsonParser
- java.lang.Object
-
- com.arthenica.ffmpegkit.MediaInformationJsonParser
-
public class MediaInformationJsonParser extends java.lang.ObjectA parser that constructsMediaInformationfrom FFprobe's json output.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringKEY_CHAPTERSstatic java.lang.StringKEY_STREAMS
-
Constructor Summary
Constructors Constructor Description MediaInformationJsonParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MediaInformationfrom(java.lang.String ffprobeJsonOutput)ExtractsMediaInformationfrom the given FFprobe json output.static MediaInformationfromWithError(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)
ExtractsMediaInformationfrom the given FFprobe json output. Note that this method does not throwJSONExceptionasfromWithError(String)does and handles errors internally.- Parameters:
ffprobeJsonOutput- FFprobe json output- Returns:
- created
MediaInformationinstance 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
MediaInformationinstance - Throws:
org.json.JSONException- if a parsing error occurs
-
-