Text animation on Video

We are trying to create a text animation like Transition and Zoom on the Video.

We are not able to get Smooth transition and the effect is so jerky. Then we understood sub pixel rendering is not possible in android. What alternatives can we think of? Can we solve this problem in OpenGL?

Ok... I would like to add more to my question....We are actually trying to implement text animations on top of a video which is played by a native player on a surface view. We tried to achieve the text animations using the android Canvas APIs to scale, translate etc and draw the text. This works but the output is not so smooth. We have verified that its not a performance issue. Even if we refresh the frames at more than 30fps, the jerkiness is seen.

Then, we tried to use android Views to get these animations and observed that the animations are buttery smooth when Hardware acceleration is turned on. But even the android View system animation fails to give good quality scale animations when hardware acceleration is turned OFF. This again is not a performance issue since we have tried to dump each frame into a bitmap and checked each frame on PC.

So, it seems that SKIA graphics library used to draw on Canvas when hardware acceleration is turned off, is not capable of sub pixel rendering or something of that sort. For example, when i am running a slow scale animation (a scale of about 0.15 in about 6 seconds), the scale updates happen by 1 pixel in around 3 frames. But if the same animation is run on a hardware accelerated view, each frames updates a fraction of a pixel and the scale animation looks very smooth.

I can sure use the view animations while previewing. But I need to get these animation buffers and encode them along with the video. Any inputs on getting these buffers, with hardware acceleration turned ON would help. I have tried Drawing cache, but that seems to be drawn using software rendering pipeline and not hardware.


Smooth transistions and jerky animations have nothing to do with subpixel rendering.

The problem sounds like you're not correctly timing your rendering function. Do not use a interval timer to trigger rendering of a frame. You should put the rendering and animation into your programs event loop idle handler and measure the time it takes to render a frame. Then advance the animation by that time.

链接地址: http://www.djcxy.com/p/41234.html

上一篇: 为什么从FuncAnimation保存的视频是重叠的地块?

下一篇: 视频上的文本动画