[FFmpeg-trac] #2769(FFmpeg:new): drawtext: draw expression on a range on frames
FFmpeg
trac at avcodec.org
Wed Jul 10 15:16:23 CEST 2013
#2769: drawtext: draw expression on a range on frames
-------------------------------------+-------------------------------------
Reporter: Charlie | Type:
Status: new | enhancement
Component: FFmpeg | Priority: normal
Keywords: drawtext | Version: 0.8.14
fraw expression range frame | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
Hi, drawtext option has a 'draw' expression that specifies if the text
should be drawn.
http://www.ffmpeg.org/ffmpeg-filters.html#drawtext-1
I figured out we could use the following expressions to write on, before,
or after a specific frame: :draw='eq(n,42)', :draw='lt(n,42)',
:draw='gt(n,42)'
Do you know how to combine two expressions to write text, for instance, on
every frame between frames 10 and 42 ?
I couldn't find doc or examples for combining expressions, and the
following don't work:
:draw='gt(n,10)&<(n,42)' -> crash
:draw='gt(n,10);lt(n,42)' -> only applies second expression
:draw='gt(n,10)':draw='lt(n,42)' -> only applies second expression
Thanks in advance
How to reproduce:
{{{
% ffmpeg -i test.mov -vf
"[in]drawtext=fontsize=40:fontcolor=White:fontfile='/usr/share/fonts/truetype
/ttf-
dejavu/DejaVuSans.ttf':draw='gt(n,10)':draw='lt(n,42)':text='test':x=50:y=35"
-vframes 60 -qscale 0 -preset medium -vcodec libx264 -pix_fmt yuv420p
-strict experimental -y test.mp4
ffmpeg version 0.8.6-4:0.8.6-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the
Libav developers
built on Apr 2 2013 17:02:36 with gcc 4.6.3
}}}
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2769>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list