uestccokey / EZFilter

A lightweight (<180KB), easy-to-extend Android filter and dynamic sticker framework for adding filters and stickers for camera, video, bitmap and view.(一个轻量级(<180KB)、易扩展的Android滤镜和动态贴纸框架,支持摄像头、视频、图片和视图添加滤镜和贴纸。)
MIT License
208 stars 57 forks source link

OffscreenVideo addFilterRender() method is not working #71

Closed Mouadabdelghafouraitali closed 2 years ago

Mouadabdelghafouraitali commented 2 years ago

Hi,

I'm trying to save a video with the user's selected filter, when I run the below code I got a really weird behavior :

OffscreenVideo offscreenVideo = new OffscreenVideo(videoInputPath);
offscreenVideo.addFilterRender(currentFilter);
offscreenVideo.save(videoOutputPath);

The output : Original video :

image

1 - For some reason, the input video change resolution and become smaller in the RenderView

Sans titre

2 - The video saved without any filter on it.

Thank you.

uestccokey commented 2 years ago

When rendering off screen, you should re create the filter and then add it, otherwise it will conflict with the filter being used in the screen

Mouadabdelghafouraitali commented 2 years ago

@uestccokey Thank you so much, that's exactly what I've done yesterday, I was just waiting for another solution, before closing this issue