Jump to content
  • 0

Aspect Ratio


Kevin Maude
 Share

Question

Is there a setting that controls the aspect ratio of the webrtc stream?
I have the video on the index.html page set to 1280x720.

The play.html page is set to an aspect of 1280x720 for both HLS and Webrtc player. However as soon as the stream starts it reverts back to a 640x480 stream in the center of a 16:9 video player. 

Link to comment
Share on other sites

  • Answers 7
  • Created
  • Last Reply

Top Posters For This Question

7 answers to this question

Recommended Posts

  • 0
I would be interested in the answer to this question as well

On Friday, May 22, 2020 at 5:25:01 PM UTC-7, Kevin Maude wrote:
Is there a setting that controls the aspect ratio of the webrtc stream?
I have the video on the index.html page set to 1280x720.
The play.html page is set to an aspect of 1280x720 for both HLS and Webrtc player. However as soon as the stream starts it reverts back to a 640x480 stream in the center of a 16:9 video player. 
Link to comment
Share on other sites

  • 0

Checking back to see if anybody might have some insight on controlling the aspect for the webrtc stream.

In trying to research it the thought that might need something with the webcam setting reset. Not sure however.

Any help much appreciated
Link to comment
Share on other sites

  • 0
Is this a WebRTC published stream? If yes, are you publishing at that size? Many webcams, like mine, default to 4:3 in Chrome. Search for the mediaConstraints variable on index.html and replace it with this:

var mediaConstraints = {
video : {
"width": {
"min": 1280,
"max": 1920
},
"height": {
"min": 720,
"max": 1080
}
},
audio : true
};

Note that if you try to publish after adding this change with any device that doesn't support at or above 1280x720, the browser will reject the attempt to publish and it will fail.

On Thursday, May 28, 2020 at 12:49:29 AM UTC-4, Kevin Maude wrote:
Checking back to see if anybody might have some insight on controlling the aspect for the webrtc stream.

In trying to research it the thought that might need something with the webcam setting reset. Not sure however.

Any help much appreciated

 

Link to comment
Share on other sites

  • 0
Logan,

Thank you for the response. The challenge I've had is that I can get a 16:9 image on the publish page. You can see in this image.
EmbeddedImages-40/0.jpg
But then when I view the stream on the play.html page it is squishing to 4:3. See this image.
EmbeddedImages-40/1.jpg

Trying to get the final image to be 16:9 for both the stream and record. 

Thanks,

Kevin



--
uc?export=download&id=1j2dlEedbVtQjBcLTAbqZfpTsfMZnc4fQ&revid=0B7wVWmVK0XSMeUVMODdSUGFiWVVqdHZ6ck5xMnV3ODJhVUhJPQKevin Maude
www.socialvideo.online
Want to schedule a meeting, check my availability

Link to comment
Share on other sites

  • 0

I follow the question with interest. 
It would be really helpful to comprehensively understand how to flexibly set aspect ratio and resolution in Publish and Play examples.



Il giorno venerdì 29 maggio 2020 00:16:12 UTC+2, Kevin Maude ha scritto:
Logan,

Thank you for the response. The challenge I've had is that I can get a 16:9 image on the publish page. You can see in this image.
Screenshot 2020-05-28 15.11.41.png
But then when I view the stream on the play.html page it is squishing to 4:3. See this image.
Screenshot 2020-05-28 15.12.11.png

Trying to get the final image to be 16:9 for both the stream and record. 

Thanks,

Kevin



--
KPBUlsv5edk8cuA7OShOLrOUPHT3Cdzh7TTJh4MLlJPs1yQlYjiLmPpHo-t186xsG60-0l1u2Z7UwlNuUeVU11pYP3rIgRs-XtiqgwZFVjlmil41Msjj5rNof4FOZAyAPNZx8ls-D2u_mjZ4Ll_AQcch52XhPp9SPBrgwiYbkeCFC2ONy47Q494Z5dxAHJn9Tz0kUsO_cbI0c_sSmA=w5000-h5000Kevin Maude
www.socialvideo.online
Want to schedule a meeting, check my availability

Link to comment
Share on other sites

  • 0
I have the same problem with streaming a 16:9 WebRTC screen share. When playing with HLS, I get 4:3 aspect ratio.
Am Freitag, 29. Mai 2020 00:16:12 UTC+2 schrieb Kevin Maude:
Logan,

Thank you for the response. The challenge I've had is that I can get a 16:9 image on the publish page. You can see in this image.
Screenshot 2020-05-28 15.11.41.png
But then when I view the stream on the play.html page it is squishing to 4:3. See this image.
Screenshot 2020-05-28 15.12.11.png

Trying to get the final image to be 16:9 for both the stream and record. 

Thanks,

Kevin



--
KPBUlsv5edk8cuA7OShOLrOUPHT3Cdzh7TTJh4MLlJPs1yQlYjiLmPpHo-t186xsG60-0l1u2Z7UwlNuUeVU11pYP3rIgRs-XtiqgwZFVjlmil41Msjj5rNof4FOZAyAPNZx8ls-D2u_mjZ4Ll_AQcch52XhPp9SPBrgwiYbkeCFC2ONy47Q494Z5dxAHJn9Tz0kUsO_cbI0c_sSmA=w5000-h5000Kevin Maude
www.socialvideo.online
Want to schedule a meeting, check my availability

Link to comment
Share on other sites

  • 0
In community edition this is normal. Because we set the resolution 640x480 in the following line:

So you can consider using 4:3 on the publishing side or you can edit the line as 640x360 and build it from scratch.

Link to comment
Share on other sites

 Share

×
×
  • Create New...