[FFmpeg-devel] [PATCH v3 2/2] avformat/{http, tls}: enable tcp_nodelay

Aman Gupta aman at tmm1.net
Wed Nov 15 07:34:08 EET 2017


On Tue, Nov 14, 2017 at 9:28 PM, Jeyapal, Karthick <kjeyapal at akamai.com>
wrote:

>
> >On 11/15/17, 10:32 AM, "Aman Gupta" <ffmpeg at tmm1.net> wrote:
> >
> >From: Aman Gupta <aman at tmm1.net>
> >
> >Signed-off-by: Aman Gupta <aman at tmm1.net>
> >---
> > libavformat/http.c | 1 +
> > libavformat/tls.c  | 1 +
> > 2 files changed, 2 insertions(+)
>
> Again, do want to hardcode tcp_nodelay at http and tls level? Because
> there could be other muxers
> that send data in very small chunks where setting this option would
> actually increase the tcp overhead
> severely for such use-cases.
>
> I thought it would be better if the http plugin exposed this as an option
> and hls or dash muxers enable it,
> after we make sure that the relevant TS and MOV muxers used in hls and
> dash plugins writes data as
> big chunks(atleast one frame at a time or some kind of size limit). I
> think movenc already handles it with
> dynbuf avio and pushes it only at the end of the segment. But same can’t
> be said about the mpd file or
> m3u8 file posts. I think we need to examine the tcpdump logs(or wireshark)
> to make sure that the number
> of tcp packets doesn’t increase unexpectedly after this change.
>
> I am only saying this from muxer point of view. Similarly, we need think
> from demuxer point of view and
> make sure that enabling this doesn’t add any unnecessary tcp overhead
> there as well.
>
> My suggestion is to add tcp_nodelay as an option for http and tls and push
> this change.
> Later we can modify the hls and dash plugins separately to enable this
> optimization.
>

Hmm, I guess if we want this to propagate down we need to add the option to
the tls protocol as well, then pass it down when it instantiates the tcp
protocol. Then add the same option to hls/dash, and again propagate it down
to tls or tcp.

This is turning into a much bigger change than I anticipated, and I don't
really care enough about it to continue. If someone else wants to take over
this patchset, they are more than welcome to it.

Aman


>
> Thanks and regards,
> Karthick
>
>


More information about the ffmpeg-devel mailing list