From: Paul B Mahol <onemda@gmail.com> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH] frame durations for framesync Date: Mon, 30 Jan 2023 13:12:21 +0100 Message-ID: <CAPYw7P69OLo4DaM+LE_9=t-J1-ddyzLkXUHNZSVb20PDfbUmfA@mail.gmail.com> (raw) In-Reply-To: <Y9ebSkA13JPGl8UK@phare.normalesup.org> On 1/30/23, Nicolas George <george@nsup.org> wrote: > Paul B Mahol (12023-01-27): >> From b4f835c4ef6e0e0bbe6adef8235381e56f3f91df Mon Sep 17 00:00:00 2001 >> From: Paul B Mahol <onemda@gmail.com> >> Date: Fri, 27 Jan 2023 23:34:02 +0100 >> Subject: [PATCH 1/4] avfilter/framesync: calculate frame duration too >> >> Signed-off-by: Paul B Mahol <onemda@gmail.com> >> --- >> libavfilter/framesync.c | 20 ++++++++++++++++---- >> libavfilter/framesync.h | 15 +++++++++++++++ >> 2 files changed, 31 insertions(+), 4 deletions(-) > > It does not work. For example, with the following filter graph: > > testsrc2=r=1/3[a];testsrc2=r=1/5[b];[a][b]vstack > > and adding a line of debug at the beginning of process_frame() in > vf_stack.c, you get: > > got event: pts = 0, duration = 3 > got event: pts = 3, duration = 3 ← should be 2 > got event: pts = 5, duration = 5 ← should be 1 > got event: pts = 6, duration = 3 … > got event: pts = 9, duration = 3 > got event: pts = 10, duration = 5 > got event: pts = 12, duration = 3 > got event: pts = 15, duration = 3 > got event: pts = 18, duration = 3 > got event: pts = 20, duration = 5 > > I was wrong saying it cannot work, you can compute the duration of the > new frame without increasing the latency, but you have to duplicate the > whole frame synchronization logic. > > I was against adding the duration field to libavfilter, and this is a > very good illustration of the reason. The duration field is redundant > with other information, it takes a lot of code to maintain it, and we > cannot trust it anyway. It is not redundant, it describes how much frame lasts. There is no other way to derive it. > > For libavfilter, my advice would be to disregard it entirely. Let us > just clear it in buffersrc and be done with it. > I think you do not understand why frame duration is needed. > Regards, > > -- > Nicolas George > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2023-01-30 12:12 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-01-27 22:35 Paul B Mahol 2023-01-30 9:52 ` Nicolas George 2023-01-30 10:26 ` Nicolas George 2023-01-30 12:12 ` Paul B Mahol [this message] 2023-01-30 12:17 ` Nicolas George 2023-01-30 12:20 ` Paul B Mahol 2023-01-30 12:23 ` Nicolas George 2023-01-30 12:26 ` Paul B Mahol 2023-01-30 12:32 ` Nicolas George 2023-01-30 12:35 ` Paul B Mahol
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='CAPYw7P69OLo4DaM+LE_9=t-J1-ddyzLkXUHNZSVb20PDfbUmfA@mail.gmail.com' \ --to=onemda@gmail.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git