From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 5887543E67 for ; Thu, 15 Sep 2022 16:42:52 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2C86B68BBC1; Thu, 15 Sep 2022 19:42:39 +0300 (EEST) Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 69DE368BBBC for ; Thu, 15 Sep 2022 19:42:32 +0300 (EEST) Received: by mail-ej1-f51.google.com with SMTP id lh5so1696910ejb.10 for ; Thu, 15 Sep 2022 09:42:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netflix.com; s=google; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date; bh=MPSBtCF1zYDTNvJIr0WYknhkxruJugJmbjMnS2tFORg=; b=WdsRMTVfnutxSWD1XstmR0WyTQI8oLqEKv4wFsAkecutApYpLCP0MdO6CK0aZh7CLh rAZOuPq9UYoA2Sb/iBrk0l3QsIP0qFeAXuhTAE7ZsjBvfUcYWSWmFm/JK0POvNgGm9E1 0KiFSmDB7px6TaMUFqw5oMKCeYaqN3zRkA3tg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date; bh=MPSBtCF1zYDTNvJIr0WYknhkxruJugJmbjMnS2tFORg=; b=dWO/NEvS2SqK6DsdWBdq8NYIbcsBxWAmLIM/wvYj7m/HsFro4s6KKEX4fT11bNkcng +trOjxbPvsMqJU+j716/H46pa6jHHmm5y1zXV8rAE4Yog1VyVYK9y9+hBQMX7UCoXalx vuWdRRCvd2hisEKGo8rJytNZaKF+yvAg1p0FfzgpfGbeZ/PM6MfeCvul3XXJxFQbuFHR ZdhOu5PUwKh12Y+/2koA/xK0pywbSVNwCOhOjxk4VmW8CKgXi2kAMDVqYX5MzptC1NdA atLK8EktoSYrVBz+qH+ug+6NF+HhRNdSGkLnLBlmoxp3GatEmAqkJUur2TJQWCGxQfrg BFAQ== X-Gm-Message-State: ACrzQf1r/N4cCFflCoOMGnTtHtMiYl/TEah6K+gXL3wo3HvCK6+nHNTU zrzWwL6HM6qV6DBk3gTn7abGxj3ysTnxIGD2iI8PaeIy73ZfyA== X-Google-Smtp-Source: AMsMyM4hn5PMB7PouJYZCITetyydJibi5UIcPC/nMJOvjHhhGCDG7y0ob0YLwEq/+nAt/TTgT6+z6w6yXvmNf206wQ8= X-Received: by 2002:a17:906:730b:b0:77f:9688:272f with SMTP id di11-20020a170906730b00b0077f9688272fmr612573ejc.282.1663260151385; Thu, 15 Sep 2022 09:42:31 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Li-Heng Chen Date: Thu, 15 Sep 2022 09:42:20 -0700 Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] libavfilter/f_select: switch to activate and properly handle EOF pts X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Thu, Sep 15, 2022 at 2:41 AM Nicolas George wrote: > > Li-Heng Chen (12022-09-14): > > Please allow me to explain again with your example. That's say we have > > an input with 20 frames (0-19), and we want to keep prime number frames > > with select filter, -vf select='eq(n\,2)+eq(n\,3)+...+eq(n\,13)+eq(n\,17)' > > > > In the activation function, select->eof_pts is updated to n at n=4, 6, > > 8, 12, 14, 18 > > However, select->eof_pts is passed into ff_outlink_set_status only at > > n=20, since > > ff_inlink_acknowledge_status returns 1. > > I understood that. And I argue it is wrong. > > > Regardless of my logic, this behavior looks weird to me. In my opinion, > > -vf select='eq(n\,24),fps=25/1' should produce the same result as just having > > -vf select='eq(n\,24)'. However, select='eq(n\,24),fps=25/1' generates > > 22 identical > > frames while select='eq(n\,24)' only outputs one frame... > > Trick question: > > testsrc=r=25:d=4,select='gte(n\,0)*gte(24\,n)+gte(n\,50)*gte(74\,n)',fps=25 > > How many frames do you expect on the output? > Played with this cmd -f lavfi -i testsrc=r=25:d=4 -vf select='gte(n\,0)*gte(24\,n)+gte(n\,50)*gte(74\,n)',fps=25/1 1) Existing ffmpeg behavior: output 100 frames - n=25-49 are duplicated from frame #24; - n=75-99 duplicated from frame #74. 2) with my patch: output 75 frames due to the EOF pts change -> n=25-49 are duplicated from frame #24. I guess your argument is that the duplication behavior should be consistent between [25,50) and [75,99)? That makes sense to me! Interestingly, however, I also tried the cmd without the fps filter -f lavfi -i testsrc=r=25:d=4 -vf select='gte(n\,0)*gte(24\,n)+gte(n\,50)*gte(74\,n)' The existing ffmpeg outputs 75 frames, where n=25-49 are duplicated from frame #24. This matches the behavior in 2) Best, Li-Heng > 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".