[FFmpeg-devel] [PATCH] lavfi/drawtext: add the reload option.

Nicolas George nicolas.george at normalesup.org
Tue Dec 4 11:22:16 CET 2012

Le duodi 12 frimaire, an CCXXI, Stefano Sabatini a écrit :
> My only concern is that reloading a file for each frame (thus possibly
> several times in a second) doesn't sound very good.

You mean performance-wise, I suppose? There is an overhead, of course, but I
believe you overestimate it. We are talking of 4 syscalls, 1 malloc and 1
memcpy per frame. The text expansion and glyph blending is much more
expensive than that, and any network or capture input will make quite a few
syscalls per frame on its own (ALSA input does 6000 ioctls per second on my
hardware, for example).

(It may happen that mmap() is much more expensive than another syscall, I am
not sure, but it could be replaced by a simple read, with a few benefits

Also, note that it is optional. And the implementation is quite trivial.

> But again, I'm not conceptually opposed to this patch, but we should
> start to think about a more flexible (and efficient) solution.

I agree.

I will push this shortly.


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121204/5319a415/attachment.asc>

More information about the ffmpeg-devel mailing list