- Classes
- Namespaces
- Interfaces
- Traits
- Index

PHP-FFMpeg API
Class

# FFMpeg\Media\Audio

class Audio extends AbstractStreamableMedia

## Methods

| __construct($pathfile, FFMpegDriver $driver, FFProbe $ffprobe) | from AbstractMediaType
FFMpegDriver | getFFMpegDriver() | from AbstractMediaType
MediaTypeInterface | setFFMpegDriver(FFMpegDriver $driver) | from AbstractMediaType
FFProbe | getFFProbe() | from AbstractMediaType
MediaTypeInterface | setFFProbe(FFProbe $ffprobe) | from AbstractMediaType
string | getPathfile() | from AbstractMediaType
MediaTypeInterface | setFiltersCollection(FiltersCollection $filters) | from AbstractMediaType
MediaTypeInterface | getFiltersCollection() | from AbstractMediaType
StreamCollection | getStreams() | from AbstractStreamableMedia
Stream | getFormat() | from AbstractStreamableMedia
AudioFilters | filters() Returns the available filters. |
Audio | addFilter(FilterInterface $filter) {@inheritdoc} |
Audio | save(FormatInterface $format, string $outputPathfile) Exports the audio in the desired format, applies registered filters. |
Audio | waveform(integer $width, integer $height) Generates an image file representing the waveform of the audio file. |

## Details

###
in AbstractMediaType at line 29
`public __construct($pathfile, FFMpegDriver $driver, FFProbe $ffprobe)`

#### Parameters

| $pathfile |
FFMpegDriver | $driver |
FFProbe | $ffprobe |

###
in AbstractMediaType at line 40
`public FFMpegDriver getFFMpegDriver()`

#### Return Value

FFMpegDriver |

###
in AbstractMediaType at line 50
`public MediaTypeInterface setFFMpegDriver(FFMpegDriver $driver)`

#### Parameters

FFMpegDriver | $driver |

#### Return Value

MediaTypeInterface |

###
in AbstractMediaType at line 60
`public FFProbe getFFProbe()`

#### Return Value

FFProbe |

###
in AbstractMediaType at line 70
`public MediaTypeInterface setFFProbe(FFProbe $ffprobe)`

#### Parameters

FFProbe | $ffprobe |

#### Return Value

MediaTypeInterface |

###
in AbstractMediaType at line 80
`public string getPathfile()`

#### Return Value

string |

###
in AbstractMediaType at line 90
`public MediaTypeInterface setFiltersCollection(FiltersCollection $filters)`

#### Parameters

FiltersCollection | $filters |

#### Return Value

MediaTypeInterface |

###
in AbstractMediaType at line 100
`public MediaTypeInterface getFiltersCollection()`

#### Return Value

MediaTypeInterface |

###
in AbstractStreamableMedia at line 24
`public StreamCollection getStreams()`

#### Return Value

StreamCollection |

###
in AbstractStreamableMedia at line 36
`public Stream getFormat()`

#### Return Value

Stream |

###
at line 31
`public AudioFilters filters()`

Returns the available filters.

#### Return Value

AudioFilters |

###
at line 41
`public Audio addFilter(FilterInterface $filter)`

{@inheritdoc}

#### Parameters

FilterInterface | $filter |

#### Return Value

Audio |

###
at line 62
`public Audio save(FormatInterface $format, string $outputPathfile)`

Exports the audio in the desired format, applies registered filters.

#### Parameters

FormatInterface | $format |
string | $outputPathfile |

#### Return Value

Audio |

#### Exceptions

RuntimeException |

###
at line 113
`public Audio save(FormatInterface $format, string $outputPathfile)`

Exports the audio in the desired format, applies registered filters.

#### Parameters

FormatInterface | $format |
string | $outputPathfile |

#### Return Value

Audio |

#### Exceptions

RuntimeException |