Jump to content
  • 0

WebRTC to RTMP: Is it possible to have webcam better fill the video window?


portl13
 Share

Question

First, I am loving Antmedia!

Second I am testing streaming from Webrtc to custom RTMP ingest on Cloudflare Stream and other RTMP servers, but the webcam image from my iMac does not fill the frame.  Is the webrtc ratio different than standard streaming shape (16/9).   If so is there a way to adjust this or fill the frame in some way with the video?  Any help is appreciated.

-E

Screen Shot 2022-10-21 at 12.15.36 AM.png

  • Like 1
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

There are 2 things involved here.

 

1. Pulling up the proper resolution of the camera -  To cover the video object properly you need to obtain a suitable resolution by aspect ratio. See this and this. there are many constraint values available to play with in this regards through getUserMedia

2. Fitting the video renderer window - The second part if to add the video track to the video object that will render it. There are several CSS tricks that can help you with this way.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...