Open iosdev-republicofapps opened 7 years ago
Since (i suppose) this LFLiveKit is using FFmpeg the watermarks are just some filters which get overlayed over the video. So each time you set the watermark view the last overlay-filter gets removed and the new one gets added. See doc for overlay filter here: https://ffmpeg.org/ffmpeg-filters.html#overlay-1
So basically i think its not possible (with this library) what you want to achieve. Maybe you could implement some kind of listener if the overlay view changed and then reset the watermark view. Nevertheless this would only be a dirty workaround.
I didn't do any research in the code base of LFLiveKit, if they are really using FFmpeg. This is just a guess.
Hi,
Thanks for LFLiveKit, it is great! :-) I really appreciate all of the work you do on this great library.
I noticed that if the WatermarkView redraws itself after it has been set on the LFLiveSession, then it does not get updated in the video. The WatermarkView only seems to get drawn once, when it is added to the LiveSession, and changes to the appearance of the WatermarkView after that do not propagate.
Any idea how to fix this @chenliming777 ?
For example:
The only way I can see to get the watermark view to update in the video is to keep invoking
LFLiveSession.setWartermarkView
over and over each time my watermark view changes. That feels really inefficient because every time I set the watermark view, theLFVideoCapture.reloadFilter
is invoked and that sets up a bunch of things that might be cpu or memory expensive.If I know that the size of the video dimension and the size of the watermark view are not changing, just their contents are, is there any way to make this more efficient?
Thanks! :-)