View Source Membrane MP3 Lame plugin

Hex.pm CircleCI

The module contains element that encodes raw audio to MPEG-1 layer 3 format.

For now, only encoding audio with 2 channels, s32le format and 44100 sample rate is supported.

It is a part of Membrane Multimedia Framework.

Installation

Add the following line to your deps in mix.exs. Then, run mix deps.get.

{:membrane_mp3_lame_plugin, "~> 0.18.2"}

This package depends on the Lame encoder library library. The precompiled builds will be pulled and linked automatically. However, should there be any problems, consider installing it manually.

MacOS

brew install lame

Ubuntu

sudo apt-get install libmp3lame-dev

Arch, Manjaro

sudo pacman -S lame

Fedora

sudo dnf install lame-devel

Usage

You can find an example in example.exs, where the MP3.Lame.Encoder element was used in a pipeline that redirects audio from default input to an MP3 file.

To run the example, you can use the following command:

iex example.exs

Copyright 2020, Software Mansion

Software Mansion

Licensed under the Apache License, Version 2.0