Skip to content

membraneframework/membrane_overlay_plugin

Repository files navigation

Membrane Overlay Plugin

Hex.pm API Docs CircleCI

Filter for applying overlay or text over video. Based on the Image library.

It's a part of the Membrane Framework.

Installation

The package can be installed by adding membrane_overlay_plugin to your list of dependencies in mix.exs:

def deps do
  [
    {:membrane_overlay_plugin, "~> 0.2.0"}
  ]
end

Usage

To overlay an image in the top-right corner of an H264 video, use the following spec:

child(%Membrane.File.Source{location: "input.h264"})
|> child(Membrane.H264.Parser)
|> child(Membrane.H264.FFmpeg.Decoder)
|> child(%Membrane.OverlayFilter{overlay: "image.png", x: :right, y: :top})
|> child(Membrane.H264.FFmpeg.Encoder)
|> child(%Membrane.File.Sink{location: "output.h264"})

See the example.exs file for a complete example.

Copyright and License

Copyright 2024, Software Mansion

Software Mansion

Licensed under the Apache License, Version 2.0