New to Ant.. sure this is a simple question..but

162 views
Skip to first unread message

Ant Man

unread,
Aug 25, 2021, 10:08:08 AM8/25/21
to Ant Media Server
Hi folks.  trying to get WebRTCAppEE index.html to provide a 720p encode vs 360p, plus also hard code 1500kbps vs 900kbps.  I can see in the webrtc-adaptor.js where the 900kpbs shows up, but how do i change the capture of the stream to be 720p by default and at 1.5Mbps?

for the playback of the stream, it is using play.html, so can i assume the play.html will decode the encode if the encode is 720p@ 1.5Mbps ?

Please assist when possible and thank you folks. 

AM

export class WebRTCAdaptor
{
constructor(initialValues){
this.peerconnection_config = null;
this.sdp_constraints = null;
this.remotePeerConnection = new Array();
this.remotePeerConnectionStats = new Array();
this.remoteDescriptionSet = new Array();
this.iceCandidateList = new Array();
this.roomName = null;
this.videoTrackSender = null;
this.audioTrackSender = null;
this.playStreamId = new Array();
this.currentVolume = null;
this.originalAudioTrackGainNode = null;
this.videoTrack = null;
this.audioTrack = null;
this.smallVideoTrack = null;
this.audioContext = null;
    this.soundOriginGainNode = null;
this.secondStreamGainNode = null;
this.localStream = null;
this.bandwidth = 900; //default bandwidth kbps
this.isMultiPeer = false; //used for multiple peer client
this.multiPeerStreamId = null;   //used for multiple peer client
this.webSocketAdaptor = null;
this.isPlayMode = false;
this.debug = false;
this.viewerInfo = "";
this.publishStreamId = null;
this.blackFrameTimer = null;

Cem Kılıç

unread,
Aug 25, 2021, 11:25:13 AM8/25/21
to Ant Media Server
Hello,

If the source of the stream is suitable, maybe you can try to add adaptive bitrate for your streams to lock one resolution and bandwidth.

Sorry, I might have missed a fundamental point in your question. 

Regards

Ant Man

unread,
Aug 25, 2021, 11:37:12 AM8/25/21
to Cem Kılıç, Ant Media Server
Hi Cem .. thanks for the reply.  so, i'm specifically looking at the following path as an example: https://<nameofserver>/WebAppEE/index.html which brings up a page that you can "publish" a stream.  You can select any source, and in this case, i selected my new iMac HD camera that can support up to 1080p, but it only sees the publish at 640x360.  If I send an NDI source, I get 1280x720, even with the same bandwidth of 900kbps. So, how can I hard code a minimum of 1280x720 for every source input, or change it to 1080p ?  Hope this makes sense.  Thanks SScreen Shot 2021-08-25 at 11.31.24 AM.pngScreen Shot 2021-08-25 at 11.32.09 AM.png

--
You received this message because you are subscribed to a topic in the Google Groups "Ant Media Server" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ant-media-server/_mtZCCbfZ0g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ant-media-serv...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-media-server/0882d9b1-e7df-4447-8f29-d7eb9ae5a5ean%40googlegroups.com.

Selim Emre

unread,
Aug 27, 2021, 7:20:26 PM8/27/21
to Ant Media Server
Hi,

Actually, it's related to your camera resolution capability. WebRTC choosing resolution automatically according to your camera. Btw, you can define some parameters for mediaConstraints.

var mediaConstraints = {
video: {
width: { min: 480, ideal: 1280, max: 1920 },
height: { min: 360, ideal: 720, max: 1080 }
},
audio: true
}


I hope, I could help you.

Best Regards,
Selim

Ant Man

unread,
Sep 1, 2021, 11:31:02 AM9/1/21
to Ant Media Server
Hi Selim -- thanks so much for this.  Apologies for the delay in getting back to you.
Do you know if there is a way to capture webrtc audio as AAC ? 
Again, thank you!

burak

unread,
Sep 5, 2021, 11:18:10 PM9/5/21
to Ant Media Server
Hi Antman,
Actually AAC is not supported in WebRTC. In AMS only OPUS is supported in WebRTC.
If you need AAC you can consider using HLS if you don't need to capture audio in real-time because latency will be about 10 seconds. 
Alternative you can add an RTMP endpoint to your stream and capture AAc on the endpoint side with lower latency than HLS.

1 Eylül 2021 Çarşamba tarihinde saat 18:31:02 UTC+3 itibarıyla antman...@gmail.com şunları yazdı:

Ant Man

unread,
Sep 6, 2021, 7:22:27 AM9/6/21
to burak, Ant Media Server
Thank you for your response

Will AMS support OPUS Red for WebRTC ?

Thanks again





burak

unread,
Sep 6, 2021, 2:08:10 PM9/6/21
to Ant Media Server
AMS supports OPUS in band FEC.

6 Eylül 2021 Pazartesi tarihinde saat 14:22:27 UTC+3 itibarıyla antman...@gmail.com şunları yazdı:

Ant Man

unread,
Sep 6, 2021, 3:02:08 PM9/6/21
to burak, Ant Media Server
Thanks for the answer. 

So - we have a requirement for high quality ( similar to AAC) via WebRTC - and not HLS- hence the comment about OPUS RED. 

Will AMS update their audio stack for high quality audio support?

Thanks



You received this message because you are subscribed to the Google Groups "Ant Media Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ant-media-serv...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-media-server/bd975c6d-8e7b-45f3-a9eb-e1463f953e89n%40googlegroups.com.

burak

unread,
Sep 8, 2021, 5:05:44 AM9/8/21
to Ant Media Server
Hi,
We have an issue on github:

In the content of this issue we will improve the audio quality. We can start working on it in 2 months.  You can follow it.

6 Eylül 2021 Pazartesi tarihinde saat 22:02:08 UTC+3 itibarıyla antman...@gmail.com şunları yazdı:
Reply all
Reply to author
Forward
0 new messages