After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 757565 - rtpmp2tpay: Add property to aggregate multiple TS packets or not
rtpmp2tpay: Add property to aggregate multiple TS packets or not
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
unspecified
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-11-04 06:27 UTC by YeJinCho
Modified: 2018-11-03 15:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch file for adding "aggregate" property to rtpmp2tspay (5.31 KB, application/mbox)
2015-11-04 06:27 UTC, YeJinCho
  Details
rtpmp2tpay: Add property to aggregate multiple TS packets or not (5.36 KB, patch)
2015-11-04 06:32 UTC, YeJinCho
none Details | Review

Description YeJinCho 2015-11-04 06:27:14 UTC
Created attachment 314786 [details]
patch file for adding "aggregate" property to rtpmp2tspay

Sometimes one TS packet is made of one video frame.
In that case rtpmp2tpay waits for next TS packets to fill the payload.
Most other RTP payloaders do not mix up the seperated video frames in one RTP packet.
That's more resistant to packet lost and could reduce latency.

That's why adding the "aggregate" property.

If the aggregate property is set as false,rtpmp2tpay fills the RTP payload without aggregating next TS packets.
If true, rtpmp2tpay fills the payload not until exceed the MTU size just as now.
Comment 1 YeJinCho 2015-11-04 06:32:39 UTC
Created attachment 314787 [details] [review]
rtpmp2tpay: Add property to aggregate multiple TS packets or
 not

I add the bugzilla url in this patch
Comment 2 Sebastian Dröge (slomo) 2015-11-04 07:33:26 UTC
Related see https://bugzilla.gnome.org/show_bug.cgi?id=757567


Also you probably want to make the aggregate property an integer for the number of packets, and probably also have a possibility to define a time (i.e. never aggregate more than 200ms of packets) to not unnecessarily increase latency (note: this requires using the clock for correct implementation).
Comment 3 Jan Schmidt 2015-11-04 09:18:46 UTC
What kind of silly MTU would allow aggregation of 200ms of packets? At most you're talking about aggregating 7-8 MPEG-TS packets, right?
Comment 4 Tim-Philipp Müller 2015-11-04 10:36:57 UTC
I think we should just not aggregate, to minimise latency, which is usually the desired behaviour for RTP.

Anyone who wants to make sure output buffers are always full can just chunk the input accordingly.

The aggregation may have been required previously because mpegtsmux at some point used to push every single mpeg-ts packet as individual buffer to downstream (now it at least pushes a buffer list of one-buffer-per-packet buffers ;-))

Anyway: should check that approach works with what tsmux outputs I guess.
Comment 5 Tim-Philipp Müller 2015-11-04 10:37:27 UTC
and tsparse.
Comment 6 YeJinCho 2015-11-05 00:57:22 UTC
As now, mpegtsmux ouput could be multiple TS packets.. it depends on the input of the mpegtsmux.
For example, video I frame input is muxed to more than 7 TS packets.

Actually RTP is designed for low latency streaming which is via UDP.
So aggregation is not good for latency.
But some application could think RTP header is overhead.
Those application could want to aggregate the TS packets for reducing the RTP header overhead.

I think aggregate property is good for supporting both case.
What's your opinion on this issue?
Comment 7 YeJinCho 2015-11-09 07:04:39 UTC
Is there anyone who wanna share the thoughts?
Comment 8 Nicolas Dufresne (ndufresne) 2015-11-09 13:51:41 UTC
Tim, another way is to port this muxer to aggregator base class. With the internal queues and the configurable latency, it would be easy to give back control over the aggregation, and in general, we'd be aggregating the entire queue, so even without latency, having a certain queue size could help performance, without adding any latency. It's also a good candidate as it's resides in -bad.
Comment 9 Tim-Philipp Müller 2015-11-09 14:21:28 UTC
Nicolas, I think perhaps you misunderstood the purpose of my comment. I don't disagree with anything you say, and I do think we should port all muxers over at some point, but I don't think it's related to this issue really (the performance is bad because of the way the code is structured, that's all).

I was arguing that instead of making this a property in the payloader we should just never aggregate in the payloader. This raises the question why it was done like this in the payloader in the first place. My comment about how mpegtsmux used to work was supposed to provide a possible explanation why this was added in the first place.

So in short: I think we should just never aggregate in the payloader and double-check that mpegtsmux and tsparse do the right thing these days.
Comment 10 Nicolas Dufresne (ndufresne) 2015-11-09 14:31:15 UTC
Ah, it aggregates in the payloader, sorry, indeed I missed it.
Comment 11 YeJinCho 2015-11-10 00:34:01 UTC
Need to modify the rtpmp2tpay not to agrregate the TS packets?
Comment 12 GStreamer system administrator 2018-11-03 15:05:26 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/233.