How to insert graphic overlays on live stream

65 views
Skip to first unread message

Gambit

unread,
Feb 10, 2021, 6:50:09 AM2/10/21
to Ant Media Server
Hi all

I'm not sure this is possible with Ant but I though I'd ask anyway.

Is it possible to insert graphic overlays to a live stream. If you how would I go about building something like this.

Thanks

Selim Emre

unread,
Feb 11, 2021, 7:13:19 PM2/11/21
to Ant Media Server
Hi Gambit,

I'm assuming you are publishing with WebRTC. Yes, you can add graphic overlay in your stream. We have some docs for this issue. Could you please check below links:

I hope, I could help you.

Best Regards,
Selim

Alex A

unread,
Mar 29, 2021, 4:03:27 AM3/29/21
to Ant Media Server
but those examples use "initWebRTCAdaptor(localStream);" which is not used in any of your example code in /webapps/. so what is the new method of doing canvas broadcast ?

Alex.

Enes Kuluk

unread,
Mar 29, 2021, 10:37:53 AM3/29/21
to Ant Media Server
You are correct, you need to add localStream variabla to webRTCAdaptor here: https://github.com/ant-media/StreamApp/blob/master/src/main/webapp/index.html#L446
You need to use localStream = {variable you are going to use} instead of localVideoId.

Like:

function initWebRTCAdaptor(publishImmediately, autoRepublishEnabled)

{

webRTCAdaptor = new WebRTCAdaptor({

websocket_url : websocketURL,

mediaConstraints : mediaConstraints,

peerconnection_config : pc_config,

sdp_constraints : sdpConstraints,

localStream : somestream,

debug:debug,

bandwidth:maxVideoBitrateKbps,
.
.
.


Best Regards,
Enes.

Alex A

unread,
Mar 30, 2021, 6:44:20 AM3/30/21
to Ant Media Server
Ah - that's awesome Enes - that is precisely what I needed - thank you!
Reply all
Reply to author
Forward
0 new messages