On Mon, 16 Nov 2015, Stefano Sabatini wrote:

+@item concatdec_select
+The concat demuxer can set the @var{lavf.concat.start_time} and the
+@var{lavf.concat.duration} packet metadata values which are also present in the
+decoded frames.
+

+The @var{concatdec_select} variable is -1 if the frame pts is at least
+start_time and either the duration metadata is missing or the frame pts is less
+than start_time + duration, 0 otherwise, and NaN if the start_time metadata is
+missing.

Add also a single explanation, like this:

That means that an input frame is selected if its pts is within the
interval set by the concat demuxer.

Ok, will do.


I wonder if it would make sense to export the input index
(lavf.concat.index), and use it here in place of -1.


Maybe, but we should probably provide this as separate variable, because you cannot use 0 for the first segent, only -1 etc... And maybe there will be a time when the expression evaluation code will be able to access all fields and metadata of an AVFrame...

Anyway, can be added later.

+@item
+Select useful frames from an ffconcat file which is using inpoints and
+outpoints but where the source files are not intra frame only.
+@example
+ffmpeg -copyts -vsync 0 -segment_time_metadata 1 -i input.ffconcat -vf 
select=concatdec_select -af aselect=concatdec_select output.avi
+@end example

I guess that the lavf.concat metadata is set so that start_time and
duration corresponds to the inpoint and outpoint interval, right?

Yes, only inpoint and outpoint in the concat file are timestamps of the
source files referenced by the concat file, start_time and duration metadata are timestamps of the "output" from the concat demuxer.

 @end itemize

 @section selectivecolor
diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c
index 2b926e1..14a23d2 100644
--- a/libavfilter/f_select.c
+++ b/libavfilter/f_select.c
@@ -82,6 +82,8 @@ static const char *const var_names[] = {

     "scene",

+    "concatdec_select",  ///< frame usefulness based on pts and frame metadata 
originating from the concat demuxer

probably you can give a more explicative description ("useful" is
pretty generic)

Ok.

Will send a new version soon.

Regards,
Marton
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to