Цэрэнчимэд Цэгмид Posted October 26, 2021 Share Posted October 26, 2021 Hello. I am trying to add watermark on RTMP stream on Ant media EE. I know there is no built in feature on that and i want to accomplish using plugins. Is it possible? And is there any guide about using plugin. I checked sample plugin, but that code is not clear. Link to comment Share on other sites More sharing options...
0 Burak Posted October 26, 2021 Share Posted October 26, 2021 Hi, Actually you can do it with built-in filter plugin in v2.4.0.2 You should do followings: 1. Add an adaptive bitrate setting 2. Copy the logo image somewhere in server 3. Call Create filter REST method as: curl -i -X POST -H "Accept: Application/json" -H "Content-Type: application/json" "https://your_domain:5443/APP_NAME/rest/v2/filters/create" -d '{"inputStreams":["stream_name"],"outputStreams":["stream_name"],"videoFilter":"movie=/path/to/your/image.png,scale=100:100[logo];[in0][logo]overlay[out0]","audioFilter":"[in0]acopy[out0]","videoEnabled":"true","audioEnabled":"true","type":"synchronous"}' Then the logo will be added your stream. Link to comment Share on other sites More sharing options...
0 Цэрэнчимэд Цэгмид Posted November 1, 2021 Author Share Posted November 1, 2021 Thank you for your answer. is There any documentation of this plugin? I could not find anything. Can i remove Filter after created. Where can i find all parameters of this rest api Link to comment Share on other sites More sharing options...
0 Burak Posted November 1, 2021 Share Posted November 1, 2021 You may check this: https://github.com/ant-media/Plugins/tree/master/FilterPlugin#filter-usage But the documentation isn't mature yet. You may also check from source: https://github.com/ant-media/Plugins/blob/master/FilterPlugin/src/main/java/io/antmedia/rest/FilterRestService.java Link to comment Share on other sites More sharing options...
0 robertosamayoa Posted March 11 Share Posted March 11 On 10/26/2021 at 4:02 PM, Burak said: Hi, Actually you can do it with built-in filter plugin in v2.4.0.2 You should do followings: 1. Add an adaptive bitrate setting 2. Copy the logo image somewhere in server 3. Call Create filter REST method as: curl -i -X POST -H "Accept: Application/json" -H "Content-Type: application/json" "https://your_domain:5443/APP_NAME/rest/v2/filters/create" -d '{"inputStreams":["stream_name"],"outputStreams":["stream_name"],"videoFilter":"movie=/path/to/your/image.png,scale=100:100[logo];[in0][logo]overlay[out0]","audioFilter":"[in0]acopy[out0]","videoEnabled":"true","audioEnabled":"true","type":"synchronous"}' Then the logo will be added your stream. Hi, if adding logo and restreaming logo will display on other networks or just on ams. Link to comment Share on other sites More sharing options...
0 Connessione Posted March 11 Share Posted March 11 Watermarks are usually composited into the video and not just superficially overlayed. So the output should contains the logo irrespective of where it is transmitted to and should also appear on recordings. 1 Link to comment Share on other sites More sharing options...
0 yogesh jain Posted April 5 Share Posted April 5 (edited) @Connessione@Burak @Yashcan you please guide me how to give path "movie=/path/to/your/image.png,scale=100:100[logo];[in0][logo]overlay[out0]" like in put my image on antmedia what is my path Edited April 5 by yogesh jain Link to comment Share on other sites More sharing options...
0 yogesh jain Posted April 5 Share Posted April 5 @Burak@Connessione Can You Please tell me how can we achieved to display user uploaded watermark on their streaming or can we set watermark position Link to comment Share on other sites More sharing options...
0 usama Posted April 5 Share Posted April 5 yes you can archive it using filter plugin please take a look at https://antmedia.io/discover-the-filter-plugin/ search for Movie Filter and Adding Logo. But please keep in mind that this is CPU hungry task 1 Link to comment Share on other sites More sharing options...
0 yogesh jain Posted April 5 Share Posted April 5 @usama where is any option for set logo position because it shown left-top corner i want right-bottom corner. Link to comment Share on other sites More sharing options...
0 yogesh jain Posted April 5 Share Posted April 5 or is there any solution which does not affect cpu. Link to comment Share on other sites More sharing options...
0 usama Posted April 5 Share Posted April 5 (edited) can you please check if this helps curl -i -X POST -H "Accept: Application/json" -H "Content-Type: application/json" "http://localhost:5080/WebRTCAppEE/rest/v2/filters/create" -d '{"filterId":"logodemo","inputStreams":["stream1"],"outputStreams":["test"],"videoFilter":"movie=/home/burak/antmedia.png[logo];[in0][logo]overlay=main_w-overlay_w-10:main_h-overlay_h-10[out0]","audioFilter":"[in0]acopy[out0]","videoEnabled":"true","audioEnabled":"true","type":"asynchronous"}' Edited April 5 by usama 1 Link to comment Share on other sites More sharing options...
0 usama Posted April 5 Share Posted April 5 If your viewers are on web , you can do it on client side as well.then it would not take any cpu usage on server side. Link to comment Share on other sites More sharing options...
0 yogesh jain Posted April 5 Share Posted April 5 @usama let me check Link to comment Share on other sites More sharing options...
0 yogesh jain Posted April 5 Share Posted April 5 No our user on social media platform so client side not work for me Link to comment Share on other sites More sharing options...
0 yogesh jain Posted April 5 Share Posted April 5 16 minutes ago, usama said: can you please check if this helps curl -i -X POST -H "Accept: Application/json" -H "Content-Type: application/json" "http://localhost:5080/WebRTCAppEE/rest/v2/filters/create" -d '{"filterId":"logodemo","inputStreams":["stream1"],"outputStreams":["test"],"videoFilter":"movie=/home/burak/antmedia.png[logo];[in0][logo]overlay=main_w-overlay_w-10:main_h-overlay_h-10[out0]","audioFilter":"[in0]acopy[out0]","videoEnabled":"true","audioEnabled":"true","type":"asynchronous"}' @usama Thanks that works for me but can we add url place of path 1 Link to comment Share on other sites More sharing options...
0 usama Posted April 5 Share Posted April 5 (edited) If your publisher are on we then also you can archive this on client side Edited April 5 by usama Link to comment Share on other sites More sharing options...
0 usama Posted April 5 Share Posted April 5 9 minutes ago, yogesh jain said: @usama Thanks that works for me but can we add url place of path I am glad it worked can you please clarify what do you mean by url place of path. Link to comment Share on other sites More sharing options...
0 yogesh jain Posted April 5 Share Posted April 5 (edited) 1 hour ago, usama said: I am glad it worked can you please clarify what do you mean by url place of path. @usama when we call this post api we pass image path can we pass url in replace of path. so we add custom watermark from users. because how to upload user watermark on our ant media server Edited April 5 by yogesh jain Link to comment Share on other sites More sharing options...
0 usama Posted April 5 Share Posted April 5 I think you will have to develop a image file uploading service on your back end and upload the file to your server and save it in a directory. because ant media does not have any API to upload a image file Link to comment Share on other sites More sharing options...
0 Connessione Posted April 8 Share Posted April 8 (edited) Ah sorry , I saw this post too late. You go @usama!! 👍 Edited April 8 by Connessione Link to comment Share on other sites More sharing options...
Question
Цэрэнчимэд Цэгмид
Hello. I am trying to add watermark on RTMP stream on Ant media EE.
Link to comment
Share on other sites
Top Posters For This Question
8
6
2
2
Popular Days
Apr 5
14
Oct 26
2
Nov 1
2
Mar 11
2
Top Posters For This Question
yogesh jain 8 posts
usama 6 posts
Burak 2 posts
Цэрэнчимэд Цэгмид 2 posts
Popular Days
Apr 5 2023
14 posts
Oct 26 2021
2 posts
Nov 1 2021
2 posts
Mar 11 2023
2 posts
Popular Posts
Connessione
Watermarks are usually composited into the video and not just superficially overlayed. So the output should contains the logo irrespective of where it is transmitted to and should also appear on reco
usama
yes you can archive it using filter plugin please take a look at https://antmedia.io/discover-the-filter-plugin/ search for Movie Filter and Adding Logo. But please keep in mind that this is CP
usama
can you please check if this helps curl -i -X POST -H "Accept: Application/json" -H "Content-Type: application/json" "http://localhost:5080/WebRTCAppEE/rest/v2/filters/create" -d '{"filterId":"lo
Posted Images
20 answers to this question
Recommended Posts