MasayukiSuda / GPUVideo-android

This library apply video filter on generate an Mp4 and on ExoPlayer video and Video Recording with Camera2.
MIT License
658 stars 179 forks source link

Bitmap overlay filter is filickering in Camera Preview while recording #68

Closed patolax closed 4 years ago

patolax commented 4 years ago

Reproduce Steps

  1. Go to Camera Record

  2. Select portrait

  3. Select Bitmap overlay filter at the very bottom

  4. Record the vid

The flickering starts to happen in a few seconds and keep on going throughout the recording. However, that effect is not recorded in the recorded video file. That is its just a preview related artifact which will really spook the user.

jianinz commented 4 years ago

Hey @patolax are you still experiencing the flickering or is it solved arealdy?

patolax commented 4 years ago

I was able to get rid of it. It looks fine now. But I have a bigger issue.

The time difference between each onFrameAvailable call is around 150-200 milliseconds. So that when I try to draw some animation on SurfaceTexture, FPS is super low. Is there a way to improve this time lag.

jianinz commented 4 years ago

are you drawing the animation in the preview renderer?

btw: how did you solve the flickering issue? would you mind sharing it?

patolax commented 4 years ago

I am drawing it using Gloverlayfilter class. preview renderer calls that filter. The issues is that time between onFrameAvailable call is super big so animation is slow. Have you experienced anything like that?

I think it went away when I stopped subclassing Gloverlayfilter. That is I did not use bimapfiler or watermarkfilter.