Closed FelonEkonom closed 3 weeks ago
Using Membrane.VP8.Encoder causes significant quality loss
Membrane.VP8.Encoder
Example pipeline:
defmodule TransmuxingPipeline do use Membrane.Pipeline @impl true def handle_init(_ctx, _options) do priv = "#{__DIR__}/../../priv/" |> Path.expand() mp4_path = Path.join(priv, "fixtures/bunny_without_sound.mp4") mkv_path = Path.join(priv, "outputs/bunny_without_sound.mkv") spec = [ child(:source, %Membrane.File.Source{location: mp4_path}) |> child(:mp4_demuxer, Membrane.MP4.Demuxer.ISOM) |> via_out(:output, options: [kind: :video]) |> child(:h264_parser_1, %Membrane.H264.Parser{output_stream_structure: :annexb}) |> child(:h264_decoder, Membrane.H264.FFmpeg.Decoder) |> child(:vp8_encoder, %Membrane.VP8.Encoder{encoding_deadline: 200}) |> child(:matroska_muxer, Membrane.Matroska.Muxer) |> child(:file_sink, %Membrane.File.Sink{location: mkv_path}) ] {[spec: spec], %{}} end @impl true def handle_element_end_of_stream(:file_sink, _input, _ctx, state) do {[terminate: :normal], state} end @impl true def handle_element_end_of_stream(_element, _input, _ctx, state), do: {[], state} end
https://github.com/membraneframework/membrane_vpx_plugin/pull/6 should fix that, give it a try
Using
Membrane.VP8.Encoder
causes significant quality lossExample pipeline: