[FFmpeg-devel] [PATCH] libavformat/mpegtsenc: new interlaced mux mode

Andreas Håkon andreas.hakon at protonmail.com
Tue Jun 11 14:21:27 EEST 2019


Hi,
An additional comment on the matter...

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Monday, 10 de June de 2019 19:29, Andreas Håkon <andreas.hakon at protonmail.com> wrote:

> Hi,
>
> ---
>
> ---
> From aa02575cc11bed0fd2ae2a01368c8673ad48e64b Mon Sep 17 00:00:00 2001
>
> From: Andreas Hakon <
> andreas.hakon at protonmail.com
>>
>
> Date: Mon, 10 Jun 2019 18:14:56 +0100
> Subject: [PATCH] libavformat/mpegtsenc: new interlaced mux mode
>
> This patch implements a new optional "parallel muxing mode" in the MPEGTS muxer.
> The strategy that implements the current mux (selected by default) is based on
> writing full PES packages sequentially. This mode can be problematic when using
> with DTV broadcasts, as some large video PES packets can delay the writing of
> other elementary streams.
> The new optional parameter "-mpegts_extra_mux 1" enables a different strategy.
> Instead of writing all PES packets sequentially, the first TS packet of each PES
> packet is written when the PES packet is started. But the rest of the PES data
> will be written later, and interlaced between all the mux streams.
> This new (optional) behavior has clear advantages when multiplexing multiple
> programs with several video streams. And although this does not turn the
> current implementation into a professional muxer, it brings the result closer
> to what professional equipment does.
>
> Signed-off-by: Andreas Hakon <
> andreas.hakon at protonmail.com
>>
>
> ---
>  libavformat/mpegtsenc.c |  305 ++++++++++++++++++++++++++++++++++++-----------
>  1 file changed, 233 insertions(+), 72 deletions(-)

This patch line's old!
+/* NOTE: The return value is negative when the onlyone flag generates the exit. */
Please, remove it.

Other than this, the rest of the patch is valid. We've tested it for weeks and see no issues.

Regards.
A.H.

---


More information about the ffmpeg-devel mailing list