Re: [FFmpeg-devel] [PATCH v2] libavformat/mpegtsenc.c: correctly re-emit extradata ahead of IDR pictures

2023-02-18 Thread John Coiner
On Thu, Feb 16, 2023 at 7:36 PM Marton Balint wrote: > > > > On Sun, 12 Feb 2023, John Coiner wrote: > > > This is v2 of the patch for https://trac.ffmpeg.org/ticket/10148. > > > > It implements the handling described at > > http://ffmpeg.org/pipermail

[FFmpeg-devel] [PATCH v2] libavformat/mpegtsenc.c: correctly re-emit extradata ahead of IDR pictures

2023-02-12 Thread John Coiner
This is v2 of the patch for https://trac.ffmpeg.org/ticket/10148. It implements the handling described at http://ffmpeg.org/pipermail/ffmpeg-devel/2023-February/306542.html, that is: * If we receive [AUD][IDR], we emit [AUD][SPS][PPS][IDR] * If we receive [SEI][AUD][IDR], we emit [AUD][SPS][P

Re: [FFmpeg-devel] [PATCH] libavformat/mpegtsenc.c -- correctly re-emit extradata ahead of IDR pictures

2023-02-11 Thread John Coiner
On Sun, Feb 5, 2023 at 6:33 PM Marton Balint wrote: > Your code duplicates AUD-s if they are already present and sps is also > added: > > if original packet had > [AUD][IDR] > it will become > [AUD][SPS][PPS][AUD][IDR]. > > Regards, > Marton Hi Marton, You're right, this is not compliant. The H.

Re: [FFmpeg-devel] [PATCH] libavformat/mpegtsenc.c -- correctly re-emit extradata ahead of IDR pictures

2023-02-02 Thread John Coiner
On Mon, Jan 30, 2023 at 4:12 PM Marton Balint wrote: > > For normal mpegts it also makes sense to include SPS/PPS before IDR-s, so > I'd say it is better if it is fixed in mpegtsenc. > > But it is mandatory to insert AUD NAL-s for every frame, and your patch > breaks that, because it only inserts

[FFmpeg-devel] [PATCH] libavformat/mpegtsenc.c -- correctly re-emit extradata ahead of IDR pictures

2023-01-31 Thread John Coiner
This replaces and obsoletes the earlier version of this patch, which had a bug. Thanks to Marton Balint for spotting it. This fixes https://trac.ffmpeg.org/ticket/10148, it ensures that each IDR frame is prefixed with SPS/PPS. Tested manually, with inputs containing AUDs (x264's aud=1 mode) and

Re: [FFmpeg-devel] [PATCH] libavformat/mpegtsenc.c -- correctly re-emit extradata ahead of IDR pictures

2023-01-30 Thread John Coiner
Marton Balint wrote: > This does not look right, because AFAIK you always want to insert an AUD > unless it is already there. I guess that is why current code works as it > is, it assumes if an AUD is already present, then IDR-s are already > prefixed with SPS/PPS, and no magic is needed. I'm not

[FFmpeg-devel] [PATCH] libavformat/mpegtsenc.c -- correctly re-emit extradata ahead of IDR pictures

2023-01-30 Thread John Coiner
Hi Marton, Thanks for pointing out https://patchwork.ffmpeg.org/project/ffmpeg/patch/tencent_ee0e40de9a569fe5ab454e6e700a2da79...@qq.com/ Adding prints to h264_mp4toannexb_bsf.c shows that it's not reached in the sequence that reproduces bug 10148 so it seems to be unrelated. I found a simpler p

[FFmpeg-devel] [PATCH] libavformat/mpegtsenc.c -- correctly re-emit extradata ahead of IDR pictures

2023-01-27 Thread John Coiner
From: John Coiner This is the proposed fix for https://trac.ffmpeg.org/ticket/10148 Very sorry to send the same patch 3 times; this time with `git send-email' so it should be legal :) --- libavformat/mpegtsenc.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-)

[FFmpeg-devel] [PATCH] libavformat/mpegtsenc.c -- correctly re-emit extradata ahead of IDR pictures

2023-01-26 Thread John Coiner
Trying again to upload the same patch, this time inline: >From 09c4bbd3d4ef6fbcb1558fce5cff4d15d7839526 Mon Sep 17 00:00:00 2001 From: John Coiner Date: Thu, 26 Jan 2023 13:34:24 -0500 Subject: [PATCH] Proposed fix for https://trac.ffmpeg.org/ticket/10148 --- libavformat/mpegtsenc.c |

[FFmpeg-devel] [PATCH] libavformat/mpegtsenc.c -- correctly re-emit extradata ahead of IDR pictures

2023-01-26 Thread John Coiner
A proposed fix for https://trac.ffmpeg.org/attachment/ticket/10148 is attached to the bug, here: https://trac.ffmpeg.org/attachment/ticket/10148/0001-Proposed-fix-for-https-trac.ffmpeg.org-ticket-10148.patch ___ ffmpeg-devel mailing list ffmpeg-devel@ffm