Jump to content
  • 0

Change the resolution of Ant Media livestream playback


Naresh
 Share

Question

We have integrated Ant Media as one of the livestream platforms in our existing system. We have used latest Enterprise version (2.4.2) of Ant Media server from AWS marketplace and using REST APIS to CRUD livestreams and integrated Ant Media player for the livestream playback. Everything is working fine so far except we cannot change the resolution of the livestream in player part. 

As per our project requirement, there will be two types of stream viewers. First are the free viewers who will watch the stream simulcasted to YouTube (RTMP) through Ant Media. Another will be the logged in ones who will watch the Ant Media(WebRTC) stream with ultra low latency. In order to reduce video delivery cost, we are trying to display the WebRTC stream in low resolution. To achieve that, we have set the mediaConstraints property of the WebRTCAdaptor and also enabled adaptive streaming in AMS with 360p and 720p options. However, the output stream is still playing at whatever resolution it is recording at. We also cannot reduce the resolution at publishing side as it will result in low resolution stream simulcasted to YouTube. Is there anyway we can reduce the resolution of webrtc player and still send the original resolution to RTMP endpoints? For images please refer to the following link.

https://flic.kr/ps/3YzNHz 

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
On 3/29/2022 at 10:51 AM, Naresh said:

We have integrated Ant Media as one of the livestream platforms in our existing system. We have used latest Enterprise version (2.4.2) of Ant Media server from AWS marketplace and using REST APIS to CRUD livestreams and integrated Ant Media player for the livestream playback. Everything is working fine so far except we cannot change the resolution of the livestream in player part. 

As per our project requirement, there will be two types of stream viewers. First are the free viewers who will watch the stream simulcasted to YouTube (RTMP) through Ant Media. Another will be the logged in ones who will watch the Ant Media(WebRTC) stream with ultra low latency. In order to reduce video delivery cost, we are trying to display the WebRTC stream in low resolution. To achieve that, we have set the mediaConstraints property of the WebRTCAdaptor and also enabled adaptive streaming in AMS with 360p and 720p options. However, the output stream is still playing at whatever resolution it is recording at. We also cannot reduce the resolution at publishing side as it will result in low resolution stream simulcasted to YouTube. Is there anyway we can reduce the resolution of webrtc player and still send the original resolution to RTMP endpoints? For images please refer to the following link.

https://flic.kr/ps/3YzNHz 

 

Hi @Naresh,

How are you!

Can you please let me know what settings you have made to the mediaConstraints of the WebRTCAdaptor!

I could think of couple of workaround solutions for your use case.

Maybe you can use two applications to meet your requirement. e.g., Using LiveApp to send the original high quality stream to YouTube RTMP endpoint and WebRTCAppEE application with Adaptive settings for the WebRTC viewers.

Alternatively, you can send the stream with higher resolution and low bitrate. This will help in reducing the cost as the bitrate is lower and the quality will be better as well with the higher resolution.

Let me know what you think and maybe we can find a solution together to help you with your use case in best way.

 

Thank you

  • Like 1
Link to comment
Share on other sites

  • 0

Hi @Mohit

Thank you for the response and apologies for the late follow up. 

You can find the mediaConstraints settings on the link included on the original post. We tried the second alternative you provided and tried streaming at higher resolution and low bitrate ( 720p@30fps with 2000 kbps bitrate). The result was, it streamed fine on rtmp endpoints(YouTube and Facebook) however, the stream was lagging constantly on webRTC player and the lagging stopped only when we increased the bitrate upto 3500-4500 kbps. But 480p@30 fps with 1500 kbps was streaming fine on both webRTC and rtmp. Could you please make us clear why this is happening with 720p and also the recommended bitrate for smooth webRTC playback.

We did not go with the first option as it requires two applications with first one sending stream to the second application with adaptive bitrate enabled. We do not want ABR to enable as it is resource heavy and we are also not sure whether sending stream from one application to another and doing the playback from the second application increases the latency (which is very important to our use case) and cost. 

Thank you again.

Link to comment
Share on other sites

 Share

×
×
  • Create New...