[FFmpeg-devel] [PATCHv3] add signature filter for MPEG7 video signature

Moritz Barsnick barsnick at gmx.net
Tue Jan 3 12:33:48 EET 2017


On Mon, Jan 02, 2017 at 23:52:58 +0100, Gerion Entrup wrote:
> +Calculates the MPEG-7 Video Signature. The filter could handle more than one
> +input. In this case the matching between the inputs could be calculated. The
> +filter passthrough the first input. The signature of each stream could be written
> +into a file.

"Could" means "könnte" in German (I assume that's you first language),
and that's probably not you intent here. I don't even understand what
you man. "Can" (and "could") implies optional. What does it really do?

You also need to fix some verbs. Language-wise, this could be correct,
but it still does not tell what really happens and what is optional:

  Calculates the MPEG-7 Video Signature. The filter can handle more
  than one input. In this case the matching between the inputs is
  calculated. The filter passes through the first input. The signature
  of each stream can be written into a file.

> +Calculate the mathing for the whole video and output whether the whole video
                 ^matching
> +Calculate as long as a matching is found or the video ends. Should be faster in
> +some cases.

"as long as" or "only until"? It sounds like you mean the latter.

> + at item filename
> +Set the path to which the output is written. If there is more than one input,
> +the path must be a prototype, i.e. must contain %d or %0nd (where n is a positive
> +integer), that will be replaced with the input number. If no filename is
> +specified, no output will be written. This is the default.

Question: Is this path technically (in ffmpeg terms) a URL/URI? If so,
that might need to be mentioned.

> +To detect whether two videos matches and store the signatures in XML format in
                                ^ match

> +typedef struct CourseSignature{

The English opposite of "fine" is "coarse", not "course". :)

> +typedef struct MatchingInfo{

Bracket style.

> +    int i,j,tmp_i,tmp_j,count;

Add some spaces, please.

> +    { "format",     "set output format, possible values: binary (default), xml",
                                           ^ possible values and default are
                                             automatically documented for you,
                                             see "ffmpeg -h filter=filtername".

> +    { "th_d",       "set threshold to detect one word as similar",
> +    { "th_dc",      "set threshold to detect all words as similar",
> +    { "th_xh",      "set threshold to detect frames as similar",

You can probably omit the word "set" here, that's what options are for
anyway.

> +    int x0,y0,x1,y1;

Spaces.

> +    }else if(x0-1 >= 0){
> +    }else if(y0-1 >= 0){
> +    }else{

Bracket style (spaces).

> +        /* return if unexspected error occurs in input stream */
                        ^ unexpected
> +        if (ret == AVERROR_EOF){

Bracket style.

Moritz


More information about the ffmpeg-devel mailing list