类 StreamInformation
- java.lang.Object
-
- com.ts.lib.ffmpegkit.StreamInformation
-
public class StreamInformation extends Object
Stream information class."streams": [ { "index": 0, "codec_name": "h264", "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10", "profile": "High", "codec_type": "video", "codec_tag_string": "avc1", "codec_tag": "0x31637661", "width": 1280, "height": 720, "coded_width": 1280, "coded_height": 720, "closed_captions": 0, "has_b_frames": 2, "sample_aspect_ratio": "1:1", "display_aspect_ratio": "16:9", "pix_fmt": "yuv420p", "level": 31, "color_range": "tv", "color_space": "bt709", "color_transfer": "bt709", "color_primaries": "bt709", "chroma_location": "left", "refs": 1, "is_avc": "true", "nal_length_size": "4", "r_frame_rate": "30/1", "avg_frame_rate": "30/1", "time_base": "1/15360", "start_pts": 0, "start_time": "0.000000", "duration_ts": 104960, "duration": "6.833333", "bit_rate": "1026487", "bits_per_raw_sample": "8", "nb_frames": "205", "disposition": { "default": 1, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0, "timed_thumbnails": 0 }, "tags": { "language": "und", "handler_name": "VideoHandler", "vendor_id": "[0][0][0][0]" } }]
-
-
字段概要
字段 修饰符和类型 字段 说明 static StringKEY_AVERAGE_FRAME_RATEstatic StringKEY_BIT_RATEstatic StringKEY_CHANNEL_LAYOUTstatic StringKEY_CODECstatic StringKEY_CODEC_LONGstatic StringKEY_CODEC_TIME_BASEstatic StringKEY_DISPLAY_ASPECT_RATIOstatic StringKEY_FORMATstatic StringKEY_HEIGHTstatic StringKEY_INDEXstatic StringKEY_REAL_FRAME_RATEstatic StringKEY_SAMPLE_ASPECT_RATIOstatic StringKEY_SAMPLE_FORMATstatic StringKEY_SAMPLE_RATEstatic StringKEY_TAGSstatic StringKEY_TIME_BASEstatic StringKEY_TYPEstatic StringKEY_WIDTH
-
构造器概要
构造器 构造器 说明 StreamInformation(org.json.JSONObject jsonObject)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 org.json.JSONObjectgetAllProperties()Returns all stream properties defined.StringgetAverageFrameRate()Returns display aspect ratio.StringgetBitrate()Returns bitrate.StringgetChannelLayout()Returns channel layout.StringgetCodec()Returns stream codec.StringgetCodecLong()Returns stream codec in long format.StringgetCodecTimeBase()Returns codec time base.StringgetDisplayAspectRatio()Returns display aspect ratio.StringgetFormat()Returns stream format.LonggetHeight()Returns height.LonggetIndex()Returns stream index.LonggetNumberProperty(String key)Returns the stream property associated with the key.org.json.JSONObjectgetProperties(String key)Returns the stream properties associated with the key.StringgetRealFrameRate()Returns real frame rate.StringgetSampleAspectRatio()Returns sample aspect ratio.StringgetSampleFormat()Returns sample format.StringgetSampleRate()Returns sample rate.StringgetStringProperty(String key)Returns the stream property associated with the key.org.json.JSONObjectgetTags()Returns all tags.StringgetTimeBase()Returns time base.StringgetType()Returns stream type.LonggetWidth()Returns width.
-
-
-
方法详细资料
-
getIndex
public Long getIndex()
Returns stream index.- 返回:
- stream index, starting from zero
-
getType
public String getType()
Returns stream type.- 返回:
- stream type; audio or video
-
getCodec
public String getCodec()
Returns stream codec.- 返回:
- stream codec
-
getCodecLong
public String getCodecLong()
Returns stream codec in long format.- 返回:
- stream codec with additional profile and mode information
-
getFormat
public String getFormat()
Returns stream format.- 返回:
- stream format
-
getWidth
public Long getWidth()
Returns width.- 返回:
- width in pixels
-
getHeight
public Long getHeight()
Returns height.- 返回:
- height in pixels
-
getBitrate
public String getBitrate()
Returns bitrate.- 返回:
- bitrate in kb/s
-
getSampleRate
public String getSampleRate()
Returns sample rate.- 返回:
- sample rate in hz
-
getSampleFormat
public String getSampleFormat()
Returns sample format.- 返回:
- sample format
-
getChannelLayout
public String getChannelLayout()
Returns channel layout.- 返回:
- channel layout
-
getSampleAspectRatio
public String getSampleAspectRatio()
Returns sample aspect ratio.- 返回:
- sample aspect ratio
-
getDisplayAspectRatio
public String getDisplayAspectRatio()
Returns display aspect ratio.- 返回:
- display aspect ratio
-
getAverageFrameRate
public String getAverageFrameRate()
Returns display aspect ratio.- 返回:
- average frame rate in fps
-
getRealFrameRate
public String getRealFrameRate()
Returns real frame rate.- 返回:
- real frame rate in tbr
-
getTimeBase
public String getTimeBase()
Returns time base.- 返回:
- time base in tbn
-
getCodecTimeBase
public String getCodecTimeBase()
Returns codec time base.- 返回:
- codec time base in tbc
-
getTags
public org.json.JSONObject getTags()
Returns all tags.- 返回:
- tags object
-
getStringProperty
public String getStringProperty(String key)
Returns the stream property associated with the key.- 参数:
key- property key- 返回:
- stream property as string or null if the key is not found
-
getNumberProperty
public Long getNumberProperty(String key)
Returns the stream property associated with the key.- 参数:
key- property key- 返回:
- stream property as Long or null if the key is not found
-
getProperties
public org.json.JSONObject getProperties(String key)
Returns the stream properties associated with the key.- 参数:
key- properties key- 返回:
- stream properties as a JSONObject or null if the key is not found
-
getAllProperties
public org.json.JSONObject getAllProperties()
Returns all stream properties defined.- 返回:
- all stream properties as a JSONObject or null if no properties are defined
-
-