- Classes
- Namespaces
- Interfaces
- Traits
- Index

PHP-FFMpeg API
Class

# FFMpeg\Format\Video\X264

class X264 extends DefaultVideo

The X264 video format

## Methods

array() | getExtraParams() Returns an array of extra parameters to add to ffmpeg commandline. | from DefaultAudio
string | getAudioCodec() Returns the audio codec. | from DefaultAudio
| setAudioCodec(string $audioCodec) Sets the audio codec, Should be in the available ones, otherwise an exception is thrown. | from DefaultAudio
integer | getAudioKiloBitrate() Gets the audio kiloBitrate value. | from DefaultAudio
| setAudioKiloBitrate(integer $kiloBitrate) Sets the kiloBitrate value. | from DefaultAudio
integer | getAudioChannels() Gets the audio channels value. | from DefaultAudio
| setAudioChannels(integer $channels) Sets the channels value. | from DefaultAudio
array | createProgressListener(MediaTypeInterface $media, FFProbe $ffprobe, Integer $pass, Integer $total) Creates the progress listener. | from DefaultVideo
integer | setPasses(integer $passes) Sets the number of passes. |
integer | getPasses() Returns the number of passes. |
integer | getKiloBitrate() Gets the kiloBitrate value. | from DefaultVideo
| setKiloBitrate(integer $kiloBitrate) Sets the kiloBitrate value. | from DefaultVideo
string | getVideoCodec() Returns the video codec. | from DefaultVideo
| setVideoCodec(string $videoCodec) Sets the video codec, Should be in the available ones, otherwise an exception is thrown. | from DefaultVideo
int | getModulus() |
| __construct($audioCodec = 'libfaac', $videoCodec = 'libx264') |
Boolean | supportBFrames() Returns true if the current format supports B-Frames. |
X264 | setBFramesSupport($support $support) |
array | getAvailableAudioCodecs() Returns the list of available audio codecs for this format. |
array | getAvailableVideoCodecs() Returns the list of available video codecs for this format. |

## Details

###
in DefaultAudio at line 36
`public array() getExtraParams()`

Returns an array of extra parameters to add to ffmpeg commandline.

#### Return Value

array() |

###
in DefaultAudio at line 44
`public string getAudioCodec()`

Returns the audio codec.

#### Return Value

string |

###
in DefaultAudio at line 57
`public setAudioCodec(string $audioCodec)`

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

#### Parameters

string | $audioCodec |

#### Exceptions

InvalidArgumentException |

###
in DefaultAudio at line 74
`public integer getAudioKiloBitrate()`

Gets the audio kiloBitrate value.

#### Return Value

integer |

###
in DefaultAudio at line 85
`public setAudioKiloBitrate(integer $kiloBitrate)`

Sets the kiloBitrate value.

#### Parameters

integer | $kiloBitrate |

#### Exceptions

InvalidArgumentException |

###
in DefaultAudio at line 99
`public integer getAudioChannels()`

Gets the audio channels value.

#### Return Value

integer |

###
in DefaultAudio at line 110
`public setAudioChannels(integer $channels)`

Sets the channels value.

#### Parameters

integer | $channels |

#### Exceptions

InvalidArgumentException |

###
in DefaultVideo at line 100
`public array createProgressListener(MediaTypeInterface $media, FFProbe $ffprobe, Integer $pass, Integer $total)`

Creates the progress listener.

#### Parameters

MediaTypeInterface | $media |
FFProbe | $ffprobe |
Integer | $pass | The current pas snumber
Integer | $total | The total pass number

#### Return Value

array | An array of listeners

###
in X264 at line 68
`public integer setPasses(integer $passes)`

Sets the number of passes.

#### Parameters

integer | $passes

###
in X264 at line 79
`public integer getPasses()`

Returns the number of passes.

#### Return Value

integer |

###
in DefaultVideo at line 38
`public integer getKiloBitrate()`

Gets the kiloBitrate value.

#### Return Value

integer |

###
in DefaultVideo at line 49
`public setKiloBitrate(integer $kiloBitrate)`

Sets the kiloBitrate value.

#### Parameters

integer | $kiloBitrate |

#### Exceptions

InvalidArgumentException |

###
in DefaultVideo at line 63
`public string getVideoCodec()`

Returns the video codec.

#### Return Value

string |

###
in DefaultVideo at line 75
`public setVideoCodec(string $videoCodec)`

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

#### Parameters

string | $videoCodec |

#### Exceptions

InvalidArgumentException |

###
at line 76
`public int getModulus()`

#### Return Value

int |

###
at line 22
`public __construct($audioCodec = 'libfaac', $videoCodec = 'libx264')`

#### Parameters

| $audioCodec |
| $videoCodec |

###
at line 32
`public Boolean supportBFrames()`

Returns true if the current format supports B-Frames.

#### Return Value

Boolean |

###
at line 42
`public X264 setBFramesSupport($support $support)`

#### Parameters

$support | $support |

#### Return Value

X264 |

###
at line 52
`public array getAvailableAudioCodecs()`

Returns the list of available audio codecs for this format.

#### Return Value

array |

###
at line 60
`public array getAvailableVideoCodecs()`

Returns the list of available video codecs for this format.

#### Return Value

array |