[FFmpeg-trac] #8531(avutil:new): Character substitution in parameters

FFmpeg trac at avcodec.org
Thu Feb 20 13:19:23 EET 2020


#8531: Character substitution in parameters
-------------------------------------+-------------------------------------
             Reporter:  ahakon       |                     Type:
                                     |  enhancement
               Status:  new          |                 Priority:  normal
            Component:  avutil       |                  Version:  git-
             Keywords:               |  master
  av_get_token                       |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the trouble:

 A lot of filters require to use SPACES inside the configuration.
 Example: convolution
 https://ffmpeg.org/ffmpeg-filters.html#toc-Examples-49

 However, using SCRIPTS it's quite complex to work using SPACES inside
 STRINGS. So defining a "filter_complex" with these filters it's a pain.

 So, I recommend to add a third type of "Quoting and scaping":
 https://www.ffmpeg.org/ffmpeg-utils.html
 The idea is to "Quote, scape and substitute", like this example:

 {{{
 % ffmpeg -i input -filter_complex
 convolution=1\%201\%201\%201\%201\%201\%201\%201\%201:1\%201\%201\%201\%201\%201\%201\%201\%201:1\%201\%201\%201\%201\%201\%201\%201\%201:1\%201\%201\%201\%201\%201\%201\%201\%201:1/9:1/9:1/9:1/9
 output
 }}}

 Even this is hard to read for a human, it doesn't contain any space. And
 it can be parsed quite easy: After a BACKSPACE "\" the "%" indicates an
 HEX ASCII SUBSTITUTION.

 This can be included in the function "av_get_token()" that parses all
 tokens:
 https://github.com/FFmpeg/FFmpeg/blob/44a80897e86f3a8d576e8d5a14df218be767aeab/libavutil/avstring.c#L149

 I hope you want to implement this.
 Regards.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/8531>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list