- Classes
- Namespaces
- Interfaces
- Index

PHP-FFMpeg API
Class

# FFMpeg\Format\Video\DefaultVideo

abstract class DefaultVideo extends DefaultAudio implements Interactive, Resamplable, Resizable

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 |
Dimension | 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 42
`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 53
`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 65
`public setDimensions(integer $width, integer $height)`

Set the dimensions

#### Parameters

integer | $width | The heigth
integer | $height | The width

#### Exceptions

InvalidArgumentException |

###
at line 83
`public Dimension getComputedDimensions(integer $originalWidth, integer $originalHeight)`

{@inheritdoc)

#### Parameters

integer | $originalWidth |
integer | $originalHeight |

#### Return Value

Dimension | A dimension

###
at line 120
`public setResizeMode(string $mode)`

Set the resize mode

#### Parameters

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

#### Exceptions

InvalidArgumentException |

###
at line 140
`public string getResizeMode()`

Get the current resize mode name

#### Return Value

string |

###
at line 148
`public integer getFrameRate()`

Returns the frame rate

#### Return Value

integer |

###
at line 160
`public setFrameRate(integer $frameRate)`

Set the framerate

#### Parameters

integer | $frameRate |

#### Exceptions

InvalidArgumentException |

###
at line 174
`public getVideoCodec()`

{@inheritdoc}

###
at line 186
`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 203
`public getGOPsize()`

{@inheritdoc}

###
at line 215
`public setGOPsize(integer $GOPsize)`

Set the GOP size

#### Parameters

integer | $GOPsize |

#### Exceptions

InvalidArgumentException |