From 092fa906452a5e7b385cfc4fe49340e5c4c1af43 Mon Sep 17 00:00:00 2001 From: Philip Giuliani Date: Mon, 30 Sep 2024 11:59:05 +0200 Subject: [PATCH] Disbale AAC filling --- examples/rtmp.exs | 10 +++++----- lib/membrane/hls/sink_bin.ex | 24 ++++++++++++------------ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/examples/rtmp.exs b/examples/rtmp.exs index 844d8e6..e77a0cd 100644 --- a/examples/rtmp.exs +++ b/examples/rtmp.exs @@ -16,6 +16,11 @@ defmodule Pipeline do File.rm_rf("tmp") structure = [ + # Source + child(:source, %Membrane.RTMP.SourceBin{ + url: "rtmp://127.0.0.1:1935/app/stream_key" + }), + # Sink child(:sink, %Membrane.HLS.SinkBin{ manifest_uri: URI.new!("file://tmp/stream.m3u8"), @@ -24,11 +29,6 @@ defmodule Pipeline do storage: HLS.Storage.File.new() }), - # Source - child(:source, %Membrane.RTMP.SourceBin{ - url: "rtmp://127.0.0.1:1935/app/stream_key" - }), - # Audio get_child(:source) |> via_out(:audio) diff --git a/lib/membrane/hls/sink_bin.ex b/lib/membrane/hls/sink_bin.ex index e8dd174..d36e66d 100644 --- a/lib/membrane/hls/sink_bin.ex +++ b/lib/membrane/hls/sink_bin.ex @@ -108,22 +108,22 @@ defmodule Membrane.HLS.SinkBin do state ) when encoding in [:H264, :AAC] do - {max_pts, track_pts} = resume_info(state.packager_pid, track_id) + {max_pts, _track_pts} = resume_info(state.packager_pid, track_id) spec = bin_input(pad) |> then(fn spec -> - if encoding == :AAC do - spec - |> child({:filler, track_id}, %Membrane.HLS.AACFiller{duration: max_pts - track_pts}) - |> child(:fix_parser, %Membrane.AAC.Parser{ - out_encapsulation: :none, - output_config: :esds - }) - |> child({:shifter, track_id}, %Membrane.HLS.Shifter{duration: track_pts}) - else - child(spec, {:shifter, track_id}, %Membrane.HLS.Shifter{duration: max_pts}) - end + # if encoding == :AAC do + # spec + # |> child({:filler, track_id}, %Membrane.HLS.AACFiller{duration: max_pts - track_pts}) + # |> child(:fix_parser, %Membrane.AAC.Parser{ + # out_encapsulation: :none, + # output_config: :esds + # }) + # |> child({:shifter, track_id}, %Membrane.HLS.Shifter{duration: track_pts}) + # else + child(spec, {:shifter, track_id}, %Membrane.HLS.Shifter{duration: max_pts}) + # end end) |> child({:muxer, track_id}, %Membrane.MP4.Muxer.CMAF{ segment_min_duration: state.opts.min_segment_duration