[FFmpeg-trac] #11096(undetermined:new): Chaotic escaping rules
FFmpeg
trac at avcodec.org
Wed Jul 10 14:10:22 EEST 2024
#11096: Chaotic escaping rules
-------------------------------------+-------------------------------------
Reporter: ManDay | Type:
| enhancement
Status: new | Priority: normal
Component: | Version: git-
undetermined | master
Keywords: | Blocked By:
filter_complex expression |
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Consider a filter which draws the text "early", if the time is less than
5.0 seconds and "late", otherwise. The only reasonable syntax for a
filter-chain to achieve this, with using only a single type of quotes,
would be the following:
{{{
drawtext=text='%{e:if(lt(t,5),\'early\',\'late\'}'
}}}
At the different levels of parsing, we have
...the filter complex: `drawtext=text='...'`
...the `text` argument: `%{...}`
...the expansion: `e:....`
...the `expr` parser: `if(lt(t,5),'early','late')`
Where the ellipses `...` are syntactically opaque to the respective
receiver by their notion of quotes/scoping. There is logically no need for
further escaping. In the current state of affairs, the above does not work
and requires complicated and lengthy escaping to the point where I could
not even figure out a working combination.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/11096>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list