Jump to content
  • 0

Add watermark using plugin


Цэрэнчимэд Цэгмид
 Share

Question

20 answers to this question

Recommended Posts

  • 0

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

  • 0
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

  • 0

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 by usama
  • Thanks 1
Link to comment
Share on other sites

  • 0
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

  • Like 1
Link to comment
Share on other sites

  • 0
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

  • 0
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 by yogesh jain
Link to comment
Share on other sites

  • 0

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

 Share

×
×
  • Create New...