# `Membrane.FFmpeg.SWResample.Converter`
[🔗](https://github.com/membraneframework/membrane_ffmpeg_swresample_plugin/blob/v0.21.0/lib/membrane_ffmpeg_swresample_plugin/converter.ex#L1)

This element performs audio conversion/resampling/channel mixing, using SWResample
module of FFmpeg library.

## Element options

Passed via struct `t:Membrane.FFmpeg.SWResample.Converter.t/0`

- `input_stream_format`  

  ```
  RawAudio.t() | nil
  ```
  
  Default value: `nil`  
  Stream format for the input pad. If set to nil (default value),
  stream format is assumed to be received through the pad. If explicitly set to some
  stream format, it cannot be changed by stream format received through the pad.

- `output_stream_format`  

  ```
  OutputFormat.t()
  ```
  
  ***Required***  
  Defines how the output stream format will be determined. If a field is set
  to `:keep`, then its value will be preserved from input stream format.

## Pads

### `:input`

Accepted formats:
```
%RawAudio{sample_format: format, channels: channels}
when format in @supported_sample_format and channels in @supported_channels
```
```
%RemoteStream{content_format: format} when format in [nil, RawAudio]
```

Direction: | `:input`
Availability: | `:always`
Flow control: | `:auto`

### `:output`

Accepted formats:
```
%RawAudio{sample_format: format, channels: channels}
when format in @supported_sample_format and channels in @supported_channels
```

Direction: | `:output`
Availability: | `:always`
Flow control: | `:auto`

# `t`

```elixir
@type t() :: %Membrane.FFmpeg.SWResample.Converter{
  input_stream_format: Membrane.RawAudio.t() | nil,
  output_stream_format: Membrane.FFmpeg.SWResample.Converter.OutputFormat.t()
}
```

Struct containing options for `Membrane.FFmpeg.SWResample.Converter`

# `options`

```elixir
@spec options() :: keyword()
```

Returns description of options available for this module

---

*Consult [api-reference.md](api-reference.md) for complete listing*
