类 MediaInformation
- java.lang.Object
-
- com.ts.lib.ffmpegkit.MediaInformation
-
public class MediaInformation extends Object
Media information class."format": { "filename": "E:\\temp4\\8.2\\xx.mp4", "nb_streams": 2, "nb_programs": 0, "format_name": "mov,mp4,m4a,3gp,3g2,mj2", "format_long_name": "QuickTime / MOV", "start_time": "0.000000", "duration": "6.834000", "size": "994532", "bit_rate": "1164216", "probe_score": 100, "tags": { "major_brand": "isom", "minor_version": "512", "compatible_brands": "isomiso2avc1mp41", "encoder": "Lavf58.76.100", "comment": "vid:v0d00fg10000cai2s7bc77ucdoekmv40" } }
-
-
字段概要
字段 修饰符和类型 字段 说明 static StringKEY_BIT_RATEstatic StringKEY_DURATIONstatic StringKEY_FILENAMEstatic StringKEY_FORMATstatic StringKEY_FORMAT_LONGstatic StringKEY_MEDIA_PROPERTIESstatic StringKEY_SIZEstatic StringKEY_START_TIMEstatic StringKEY_TAGS
-
构造器概要
构造器 构造器 说明 MediaInformation(org.json.JSONObject jsonObject, List<StreamInformation> streams, List<Chapter> chapters)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 org.json.JSONObjectgetAllProperties()Returns all properties defined.StringgetBitrate()Returns avg bitrate.List<Chapter>getChapters()Returns all chapters.StringgetDuration()Returns duration.doublegetDurationMs()Returns duration.StringgetFilename()Returns file name.StringgetFormat()Returns format.StringgetLongFormat()Returns long format.org.json.JSONObjectgetMediaProperties()Returns all media properties.LonggetNumberProperty(String key)Returns the media property associated with the key.org.json.JSONObjectgetProperties(String key)Returns the media properties associated with the key.StringgetSize()Returns total size.StringgetStartTime()Returns start time.List<StreamInformation>getStreams()Returns all streams.StringgetStringProperty(String key)Returns the media property associated with the key.org.json.JSONObjectgetTags()Returns all tags.
-
-
-
构造器详细资料
-
MediaInformation
public MediaInformation(org.json.JSONObject jsonObject, List<StreamInformation> streams, List<Chapter> chapters)
-
-
方法详细资料
-
getFilename
public String getFilename()
Returns file name.- 返回:
- media file name
-
getFormat
public String getFormat()
Returns format.- 返回:
- media format
-
getLongFormat
public String getLongFormat()
Returns long format.- 返回:
- media long format
-
getDuration
public String getDuration()
Returns duration.- 返回:
- media duration in seconds(秒)
-
getDurationMs
public double getDurationMs()
Returns duration.- 返回:
- media duration in milliseconds (毫秒)
-
getStartTime
public String getStartTime()
Returns start time.- 返回:
- media start time in milliseconds
-
getSize
public String getSize()
Returns total size.- 返回:
- media size in bytes
-
getBitrate
public String getBitrate()
Returns avg bitrate.- 返回:
- media bitrate in kb/s
-
getTags
public org.json.JSONObject getTags()
Returns all tags.- 返回:
- tags dictionary
-
getStreams
public List<StreamInformation> getStreams()
Returns all streams.- 返回:
- list of streams
-
getStringProperty
public String getStringProperty(String key)
Returns the media property associated with the key.- 参数:
key- property key- 返回:
- media property as string or null if the key is not found
-
getNumberProperty
public Long getNumberProperty(String key)
Returns the media property associated with the key.- 参数:
key- property key- 返回:
- media property as Long or null if the key is not found
-
getProperties
public org.json.JSONObject getProperties(String key)
Returns the media properties associated with the key.- 参数:
key- properties key- 返回:
- media properties as a JSONObject or null if the key is not found
-
getMediaProperties
public org.json.JSONObject getMediaProperties()
Returns all media properties.- 返回:
- all media properties as a JSONObject or null if no media properties are defined
-
getAllProperties
public org.json.JSONObject getAllProperties()
Returns all properties defined.- 返回:
- all properties as a JSONObject or null if no properties are defined
-
-