[FFmpeg-devel] [PATCH 5/5] lavfi/select: add support for concatdec_select option

Marton Balint cus at passwd.hu
Mon Nov 16 19:12:31 CET 2015


On Mon, 16 Nov 2015, Nicolas George wrote:

> Le quartidi 24 brumaire, an CCXXIV, Marton Balint a écrit :
>> No, this is deliberately -1. This is the case where the duration metadata is
>> missing (because it is unkown), but this also means that the outpoint was
>> not set in the file segment, therefore we need to select every frame after
>> start_time until the segment ends.
>
> Then I do not understand the reason for the -. I suspected you implemented
> the same logic than a comparison function: <0 means that pts is before the
> selected interval, 0 that pts is inside and >0 that pts is after. Apparently
> this is not it.

No, the reason behind the return value is based on how the select filter 
works which is:
- negative or NaN - frame is sent to the first output
- zero - frame is discarded
- positive - frame is sent to the output with index ceil(val)-1

Therefore the user can simply write -vf select=concatdec_select and such, 
and in this case, as Stefano summerized it an input frame is selected if 
its pts is within the interval set by the concat demuxer. (or if the 
concat metadata is missing, but this just means that you can use this 
filter for non-concatdec input as well, and it will do nothing).

Regards,
Marton


More information about the ffmpeg-devel mailing list