Jump to content
  • 0

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


Ant Man
 Share

Question

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;
Link to comment
Share on other sites

  • Answers 9
  • Created
  • Last Reply

Top Posters For This Question

9 answers to this question

Recommended Posts

  • 0
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 SEmbeddedImages-172/0.jpgEmbeddedImages-172/1.jpg

Link to comment
Share on other sites

  • 0

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

Link to comment
Share on other sites

  • 0

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.

 

Link to comment
Share on other sites

 Share

×
×
  • Create New...