# Add my customized filter in OpenVidu

**URL:** <https://openvidu.discourse.group/t/add-my-customized-filter-in-openvidu/1642>\
**Category:** How to implement?\
**Tags:** v2\
**Created:** [July 28, 2020, 8:41am UTC](https://openvidu.discourse.group/t/add-my-customized-filter-in-openvidu/1642 "2020-07-28T08:41:09Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![kay](https://avatars.discourse-cdn.com/v4/letter/k/ed655f/32.png) [@kay](https://openvidu.discourse.group/u/kay)\
**Post date:** [July 28, 2020, 8:41am UTC](https://openvidu.discourse.group/t/add-my-customized-filter-in-openvidu/1642/1 "2020-07-28T08:41:09Z")

</div>

If I implemented a OpenCV type filter by my self in Kurento Media Server, Is it possible to add it to the stream in OpenVidu? I already know how to change the Kurento image. And I wonder how to invoke it from the top level.  
Thanks for your help.

---

<div class="post-metadata">

**Author:** ![CSantosM](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/csantosm/32/16_2.png) [@CSantosM](https://openvidu.discourse.group/u/CSantosM)\
**Post date:** [July 28, 2020, 1:43pm UTC](https://openvidu.discourse.group/t/add-my-customized-filter-in-openvidu/1642/2 "2020-07-28T13:43:52Z")

</div>

Have you read the specific filter section of our docs?

[https://docs.openvidu.io/en/2.15.0/advanced-features/filters/](https://docs.openvidu.io/en/2.15.0/advanced-features/filters/)

---

<div class="post-metadata">

**Author:** ![kay](https://avatars.discourse-cdn.com/v4/letter/k/ed655f/32.png) [@kay](https://openvidu.discourse.group/u/kay)\
**Post date:** [July 29, 2020, 8:23am UTC](https://openvidu.discourse.group/t/add-my-customized-filter-in-openvidu/1642/3 "2020-07-29T08:23:06Z")

</div>

Thanks a lot!  
I have read it and I successfully added a GStreamer filter based on the tutorial OpenVidu-js-java according to the document.  
But when I tried to add my own filter, it didn’t work and report no error.  
Do you have any document about how to build the OpenVidu server from source? I want to add some log to debug and I am not familiar with the compiling system of java & javascript.

---

<div class="post-metadata">

**Author:** ![CSantosM](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/csantosm/32/16_2.png) [@CSantosM](https://openvidu.discourse.group/u/CSantosM)\
**Post date:** [July 29, 2020, 9:55am UTC](https://openvidu.discourse.group/t/add-my-customized-filter-in-openvidu/1642/4 "2020-07-29T09:55:28Z")

</div>

Sure, check this [https://docs.openvidu.io/en/2.15.0/developing/#compiling-openvidu-server](https://docs.openvidu.io/en/2.15.0/developing/#compiling-openvidu-server)

---

<div class="post-metadata">

**Author:** ![micael.gallego](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/micael.gallego/32/2_2.png) [@micael.gallego](https://openvidu.discourse.group/u/micael.gallego)\
**Post date:** [July 29, 2020, 2:16pm UTC](https://openvidu.discourse.group/t/add-my-customized-filter-in-openvidu/1642/5 "2020-07-29T14:16:21Z")

</div>

Have you installed your filter in the KMS used by OpenVidu?

---

<div class="post-metadata">

**Author:** ![kay](https://avatars.discourse-cdn.com/v4/letter/k/ed655f/32.png) [@kay](https://openvidu.discourse.group/u/kay)\
**Post date:** [August 10, 2020, 7:43am UTC](https://openvidu.discourse.group/t/add-my-customized-filter-in-openvidu/1642/6 "2020-08-10T07:43:05Z")

</div>

Thank you for your help! I have successfully added my filter into the publisher stream and subscribed my callback event!  
Now I found that I can only subscribe the event triggered by local filter. Is it possible for publisher A to subscribe to events triggered by publisher B’s filter?

---

<div class="post-metadata">

**Author:** ![kay](https://avatars.discourse-cdn.com/v4/letter/k/ed655f/32.png) [@kay](https://openvidu.discourse.group/u/kay)\
**Post date:** [August 10, 2020, 7:47am UTC](https://openvidu.discourse.group/t/add-my-customized-filter-in-openvidu/1642/7 "2020-08-10T07:47:43Z")

</div>

Yes, and thanks to your help I have successfully added my filter. Would you mind taking a look at my further question？Thank you！

---

<div class="post-metadata">

**Author:** ![micael.gallego](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/micael.gallego/32/2_2.png) [@micael.gallego](https://openvidu.discourse.group/u/micael.gallego)\
**Post date:** [August 10, 2020, 9:44am UTC](https://openvidu.discourse.group/t/add-my-customized-filter-in-openvidu/1642/8 "2020-08-10T09:44:17Z")

</div>

You can use session signaling messages to send messages between participants. So you can forward any message received in one participant to any other one.

Also, participants with moderator role con subscribe to filters of other participants.

Regards

---

<div class="post-metadata">

**Author:** ![galanblancom](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/galanblancom/32/1938_2.png) [@galanblancom](https://openvidu.discourse.group/u/galanblancom)\
**Post date:** [May 31, 2022, 1:39pm UTC](https://openvidu.discourse.group/t/add-my-customized-filter-in-openvidu/1642/9 "2022-05-31T13:39:38Z")

</div>

Can anyone shed some light on incorporating a faceoverlay filter into an Android native app?.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![pabloFuente](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/pablofuente/32/2536_2.png) [@pabloFuente](https://openvidu.discourse.group/u/pabloFuente)\
**Post date:** [May 31, 2022, 2:22pm UTC](https://openvidu.discourse.group/t/add-my-customized-filter-in-openvidu/1642/10 "2022-05-31T14:22:52Z")

</div>

Sure. You must simply implement RPC methods to manage Kurento filters:

- [applyFilter](https://docs.openvidu.io/en/2.22.0/developing/rpc/#applyfilter)
- [removeFilter](https://docs.openvidu.io/en/2.22.0/developing/rpc/#removefilter)
- [execFilterMethod](https://docs.openvidu.io/en/2.22.0/developing/rpc/#execfiltermethod)
- [addFilterEventListener](https://docs.openvidu.io/en/2.22.0/developing/rpc/#addfiltereventlistener)
- [removeFilterEventListener](https://docs.openvidu.io/en/2.22.0/developing/rpc/#removefiltereventlistener)

These RPC methods are no different than the already implemented ones in [openvidu-android](https://github.com/OpenVidu/openvidu-tutorials/tree/master/openvidu-android) tutorial, specifically in [CustomWebSocket](https://github.com/OpenVidu/openvidu-tutorials/blob/master/openvidu-android/app/src/main/java/io/openvidu/openvidu_android/websocket/CustomWebSocket.java) class.
