Constants

CODE_V_H264

CODE_V_H264 = 'h264'

CODE_V_COPY

CODE_V_COPY = 'copy'

CODE_A_AAC

CODE_A_AAC = 'aac'

CODE_A_COPY

CODE_A_COPY = 'copy'

SAMPLE_RATE_44_1_KHZ

SAMPLE_RATE_44_1_KHZ = 44100

SAMPLE_RATE_48_KHZ

SAMPLE_RATE_48_KHZ = 48000

SAMPLE_RATE_22_05_KHZ

SAMPLE_RATE_22_05_KHZ = 22050

SAMPLE_RATE_11_025_KHZ

SAMPLE_RATE_11_025_KHZ = 11025

SAMPLE_RATE_FM

SAMPLE_RATE_FM = self::SAMPLE_RATE_22_05_KHZ

SAMPLE_RATE_CD

SAMPLE_RATE_CD = self::SAMPLE_RATE_44_1_KHZ

SAMPLE_RATE_DVD

SAMPLE_RATE_DVD = self::SAMPLE_RATE_48_KHZ

Properties

$videoCodec

$videoCodec : string

视频转码格式

Type

string

$videoKiloBitRate

$videoKiloBitRate : Integer

视频输出码率(K)

Type

Integer

$audioCodec

$audioCodec : string

音频输出转码格式

Type

string

$audioKiloBitRate

$audioKiloBitRate : integer

音频输出码率(K)

Type

integer

$audioChannels

$audioChannels : integer

音频输出通道

Type

integer

$audioSampleRate

$audioSampleRate : integer

音频采样率

Type

integer

$additionalParameters

$additionalParameters : Array

额外参数,作为补充

Type

Array

Methods

setVideoCodec()

setVideoCodec(string  $videoCodec = self::CODE_V_COPY) : $this

Parameters

string $videoCodec

Throws

\Exception

Returns

$this

setVideoKiloBitrate()

setVideoKiloBitrate(integer  $videoKiloBitRate) : $this

Parameters

integer $videoKiloBitRate

Returns

$this

setAdditionalParamaters()

setAdditionalParamaters(array  $additionalParameters) : $this

Parameters

array $additionalParameters

Returns

$this

setAudioCodec()

setAudioCodec(string  $audioCodec = self::CODE_A_COPY) : $this

Parameters

string $audioCodec

Throws

\Exception

Returns

$this

setAudioKiloBitrate()

setAudioKiloBitrate(  $audioKiloBitRate) : $this

Parameters

$audioKiloBitRate

Returns

$this

setAudioChannels()

setAudioChannels(  $audioChannels) : $this

Parameters

$audioChannels

Returns

$this

setAudioSampleRate()

setAudioSampleRate(  $audioSampleRate) : $this

Parameters

$audioSampleRate

Returns

$this

getFormats()

getFormats() : array

Returns

array

create()

create()