[Bug 766618] mpegtsmux, high overhead for a small aac bitrate

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Jun 2 08:09:48 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=766618

--- Comment #1 from Vincent GĂ©nieux <vincent.genieux at startigen.fr> ---

As I understand how the muxer works in ffmpeg, we must fill the PES payload
with an aggregation of full audio frames.

I am able to do it in an element upstream, but I don't really understand how to
do it inside the mpegtsmux. Any advice about this point ?


static GstFlowReturn
gst_audio_pes_assembler_chain (GstPad * pad, GstObject * parent, GstBuffer *
buf)
{
  GstAudioPesAssembler *filter = GST_AUDIOPESASSEMBLER (parent);
  GstFlowReturn ret = GST_FLOW_OK;
  GstBuffer* out;
  gsize avail;

  avail = gst_adapter_available(filter->adapter);
  if (avail + gst_buffer_get_size(buf) > 2930)
    {
      out = gst_adapter_take_buffer_fast(filter->adapter, avail);
      ret = gst_pad_push (filter->srcpad, out);
    }

  gst_adapter_push(filter->adapter, buf);

  return ret;
}

--
vincent.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list