ask for help : branch56 without VideoConstraints.

37 views
Skip to first unread message

dc_neo

unread,
Mar 30, 2017, 6:54:12 AM3/30/17
to discuss-webrtc
hi , webrtc developers:
      we use webrtc for a long time , from branch 50 to branch 56.During this time , webrtc has improved lots of features, such as changing resolution of video source.
      In branch 50, we can create video source  like this : peerConnectionFactory.createVideoSource(capture,videoConstraints), videoConstraints is  derived class, its' base class is MediaConstraints. And in branch 50, we create videoConstraints with options videoConstraints.mandatory.add(new MediaConstraints.KeyValuePair(
    MIN_VIDEO_FPS_CONSTRAINT, Integer.toString(MIN_VIDEO_FPS))); // this will set the min fps send to the other side
videoConstraints.
mandatory.add(new MediaConstraints.KeyValuePair(
MAX_VIDEO_FPS_CONSTRAINT, Integer.toString(MAX_VIDEO_FPS))); //
this will set the min fps send to the other side
   But while we update our code to branch to 56, video source is created like this :peerConnectionFactory.createVideoSource(capture).
   so how can we constraint video source like what we have done in branch 50? please help .

Sami Kalliomäki

unread,
Mar 30, 2017, 7:31:24 AM3/30/17
to discuss-webrtc
In the new API, you have to call startCapture manually. You specify the resolution and fps when calling this method.

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/e0e50192-1cb1-4541-b0a2-3a39f99f6522%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

dc_neo

unread,
Apr 4, 2017, 3:13:54 AM4/4/17
to discuss-webrtc
yeah, i have tried this method ,it works.but I still have some dobuts:  when network is not so good to transport high quality video frame,will webrtc decrease the quality of video stream ? or drop frame ?,

在 2017年3月30日星期四 UTC+8下午7:31:24,Sami Kalliomäki写道:
In the new API, you have to call startCapture manually. You specify the resolution and fps when calling this method.
On Thu, Mar 30, 2017 at 9:15 AM, dc_neo <neot...@gmail.com> wrote:
hi , webrtc developers:
      we use webrtc for a long time , from branch 50 to branch 56.During this time , webrtc has improved lots of features, such as changing resolution of video source.
      In branch 50, we can create video source  like this : peerConnectionFactory.createVideoSource(capture,videoConstraints), videoConstraints is  derived class, its' base class is MediaConstraints. And in branch 50, we create videoConstraints with options videoConstraints.mandatory.add(new MediaConstraints.KeyValuePair(
    MIN_VIDEO_FPS_CONSTRAINT, Integer.toString(MIN_VIDEO_FPS))); // this will set the min fps send to the other side
videoConstraints.
mandatory.add(new MediaConstraints.KeyValuePair(
MAX_VIDEO_FPS_CONSTRAINT, Integer.toString(MAX_VIDEO_FPS))); //
this will set the min fps send to the other side
   But while we update our code to branch to 56, video source is created like this :peerConnectionFactory.createVideoSource(capture).
   so how can we constraint video source like what we have done in branch 50? please help .

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.

Sami Kalliomäki

unread,
Apr 4, 2017, 3:17:00 AM4/4/17
to discuss-webrtc
The constraints have always specified the resolution for the camera. They have no effect on scaling further down the pipeline. When on limited bandwidth, WebRTC scales down the video.

To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/24a640db-ad66-4d5b-84eb-e0276331465d%40googlegroups.com.

dc_neo

unread,
Apr 4, 2017, 3:34:58 AM4/4/17
to discuss-webrtc
scales down the video ? did you mean that webrtc will decrease the frame rate per second ?

在 2017年4月4日星期二 UTC+8下午3:17:00,Sami Kalliomäki写道:

Sami Kalliomäki

unread,
Apr 4, 2017, 3:46:52 AM4/4/17
to discuss-webrtc
It does both, decreases the resolution and the framerate.

To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/00daf6f3-cd0b-481e-87b5-eaf51556db2e%40googlegroups.com.

dc_neo

unread,
Apr 4, 2017, 4:22:17 AM4/4/17
to discuss-webrtc
ok, i got it , thank you  !
Recently , i have tried to read source code of webrtc project, and i  want to know more about the mechanism how video  transport when networks is not good. To be specific, how it decreases resolution and framerate when networks is not sufficient to transport hight quality video stream. would you like give more tips about functions or variables that conerned?  thanks a lot.

在 2017年4月4日星期二 UTC+8下午3:46:52,Sami Kalliomäki写道:
Reply all
Reply to author
Forward
0 new messages