PHP FFMpeg API
Class

FFMpeg\Format\Video\DefaultVideo

abstract class DefaultVideo extends DefaultAudio implements InteractiveVideo, ResamplableVideo, ResizableVideo

The abstract default Video format

Constants

RESIZEMODE_FIT

RESIZEMODE_INSET

Methods

string getExtraParams()

Returns extra parameters for the encoding

from DefaultAudio
getAudioCodec()

{@inheritdoc}

from DefaultAudio
setAudioCodec(string $audioCodec)

Set the audio codec, Should be in the available ones, otherwise an exception is thrown

from DefaultAudio
integer getAudioSampleRate()

Get the audio sample rate

from DefaultAudio
setAudioSampleRate(integer $audioSampleRate)

Set the audio sample rate

from DefaultAudio
getKiloBitrate()

{@inheritdoc}

from DefaultAudio
setKiloBitrate(int $kiloBitrate)

Set the kiloBitrate value

from DefaultAudio
integer getWidth()

Returns the width setting.

integer getHeight()

Returns the height setting The return of this method should not depend on a media file size

setDimensions(integer $width, integer $height)

Set the dimensions

array getComputedDimensions(integer $originalWidth, integer $originalHeight)

{@inheritdoc)

setResizeMode(string $mode)

Set the resize mode

string getResizeMode()

Get the current resize mode name

integer getFrameRate()

Returns the frame rate

setFrameRate(integer $frameRate)

Set the framerate

getVideoCodec()

{@inheritdoc}

setVideoCodec(string $videoCodec)

Set the video codec, Should be in the available ones, otherwise an exception is thrown

getGOPsize()

{@inheritdoc}

setGOPsize(integer $GOPsize)

Set the GOP size

Details

in DefaultAudio at line 32
public string getExtraParams()

Returns extra parameters for the encoding

Return Value

string

in DefaultAudio at line 40
public getAudioCodec()

{@inheritdoc}

in DefaultAudio at line 52
public setAudioCodec(string $audioCodec)

Set the audio codec, Should be in the available ones, otherwise an exception is thrown

Parameters

string $audioCodec

Exceptions

InvalidArgumentException

in DefaultAudio at line 69
public integer getAudioSampleRate()

Get the audio sample rate

Return Value

integer

in DefaultAudio at line 80
public setAudioSampleRate(integer $audioSampleRate)

Set the audio sample rate

Parameters

integer $audioSampleRate

Exceptions

InvalidArgumentException

in DefaultAudio at line 94
public getKiloBitrate()

{@inheritdoc}

in DefaultAudio at line 105
public setKiloBitrate(int $kiloBitrate)

Set the kiloBitrate value

Parameters

int $kiloBitrate integer $kiloBitrate

Exceptions

InvalidArgumentException

at line 38
public integer getWidth()

Returns the width setting.

The return of this method should not depend on a media file size

Return Value

integer

at line 46
public integer getHeight()

Returns the height setting The return of this method should not depend on a media file size

Return Value

integer

at line 58
public setDimensions(integer $width, integer $height)

Set the dimensions

Parameters

integer $width The heigth
integer $height The width

Exceptions

InvalidArgumentException

at line 76
public array getComputedDimensions(integer $originalWidth, integer $originalHeight)

{@inheritdoc)

Parameters

integer $originalWidth
integer $originalHeight

Return Value

array An indexed array containing the width and the height

at line 108
public setResizeMode(string $mode)

Set the resize mode

Parameters

string $mode The mode, one of the self::RESIZEMODE_* constants

Exceptions

InvalidArgumentException

at line 126
public string getResizeMode()

Get the current resize mode name

Return Value

string

at line 134
public integer getFrameRate()

Returns the frame rate

Return Value

integer

at line 146
public setFrameRate(integer $frameRate)

Set the framerate

Parameters

integer $frameRate

Exceptions

InvalidArgumentException

at line 160
public getVideoCodec()

{@inheritdoc}

at line 172
public setVideoCodec(string $videoCodec)

Set the video codec, Should be in the available ones, otherwise an exception is thrown

Parameters

string $videoCodec

Exceptions

InvalidArgumentException

at line 189
public getGOPsize()

{@inheritdoc}

at line 201
public setGOPsize(integer $GOPsize)

Set the GOP size

Parameters

integer $GOPsize

Exceptions

InvalidArgumentException