[FFmpeg-devel] [PATCH] libavfilter/f_select: switch to activate and properly handle EOF pts

Nicolas George george at nsup.org
Thu Sep 15 12:41:32 EEST 2022


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?

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20220915/c5fe1e9f/attachment.sig>


More information about the ffmpeg-devel mailing list