[FFmpeg-trac] #3253(avfilter:closed): drawtext filter: problems with text expansions
FFmpeg
trac at avcodec.org
Tue Dec 31 03:41:41 CET 2013
#3253: drawtext filter: problems with text expansions
-------------------------------------+------------------------------------
Reporter: Krieger | Owner:
Type: defect | Status: closed
Priority: normal | Component: avfilter
Version: unspecified | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 1
Analyzed by developer: 0 |
-------------------------------------+------------------------------------
Changes (by beastd):
* status: new => closed
Comment:
Replying to [comment:7 Cigaes]:
> Replying to [comment:4 beastd]:
> > I cannot exactly explain how all this works together, but it seems
that you need to deal with another layer of escaping or in other words add
another \ . Then it works as expected here.
>
> You escape once for the {{{drawtext=...}}} option and the parsing until
the comma, and a second time for the {{{text=...}}} value and the parsing
until the colon before fontfile.
Yes, that should be correct.
So it can be concluded that drawtext function evaluation has nothing to do
with this.
To examine this exact example:
The single quotes take the shell out of the game (assuming you use a
POSIX-ish shell; I do).
So I will omit them and the additional parameters below.
Now we have this:
{{{
drawtext=text=%{expr:t},
}}}
It won't work because the drawtext filter's arguments are parsed and the
colon will
be seen as delimiter.
{{{
drawtext=text=%{expr\:t},
}}}
This looks like it would do the trick and escape the colon, but it fails
because the
backslash is removed on the first pass. The second pass again interprets
the colon as
a delimiter and things go wrong.
{{{
drawtext=text=%{expr\\:t},
}}}
works because at the first pass the double backslash is substituted with a
single
backslash and that single backslash escapes the colon on the second pass
which parses
the drawtext filter's arguments.
Therefore I close this ticket now. Please re-open if suggested solution
does not work
for you.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/3253#comment:8>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list