Jump to content
  • 0

Max video/audio quality: Native Facebook RTMP client on mobile vs WebRTC on mobile via Ant Media


lars schwarz
 Share

Question

Hey guys,

we publish to Facebook RTMP via WebRTC in 720p using a max bitrate of 4000.

 

If we use the native Facebook app to do the same (publish to Facebook Live) the resulting video looks much "sharper" and the audio quality also seems better. 

We use H.264 and no ABR, both videos were done on the same device and with excellent bandwidth/upload speed.

Question is: is this quality difference expected or is there any setting (on the WebRTC-side or via red5-web.properties config) that allows us to improve the quality so it matches what the native FB app produces on the same device/same resolution (720p)?

Thanks
Lars
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 Lars,
Pardon me if I didn't understood your query well and feel free to correct me. But let me try to answer, the default bandwidth set for WebRTC stream in AMS is 900Kbps and FPS is at 20
You can change these parameters to suit your requirement under application settings /usr/local/antmedia/webapps/LiveApp/WEB-INF/red5-web.properties
Also, we recommend not to set bandwidth higher that 2.5Mbps in WebRTC stream so that it stays true to real time communication.
Let me know if this helps and/or if I'm missing something.

--
Cheers,
Mohit Dubey

 
Star Ant Media Server on GitHub and get a chance to win an AMS Annual Enterprise Edition License.


On Wed, 11 Aug at 10:34 PM , Lars Schwarz <lars.schwarz@gmail.com> wrote:
Hey guys,

we publish to Facebook RTMP via WebRTC in 720p using a max bitrate of 4000.

If we use the native Facebook app to do the same (publish to Facebook Live) the resulting video looks much "sharper" and the audio quality also seems better. 

We use H.264 and no ABR, both videos were done on the same device and with excellent bandwidth/upload speed.

Question is: is this quality difference expected or is there any setting (on the WebRTC-side or via red5-web.properties config) that allows us to improve the quality so it matches what the native FB app produces on the same device/same resolution (720p)?

Thanks
Lars
--
You received this message because you are subscribed to the Google Groups "Ant Media Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ant-media-server+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-media-server/2bfeb9e9-fbbd-4e5c-a038-40bbe2a972d8n%40googlegroups.com.
45578:1264838
Link to comment
Share on other sites

  • 0

Hey Mohit,

Facebook recommends a video bitrate of 1,500 to 4,000 Kbps for 720p at 30fps when using their Live API, that's why we tried a maxVideoBitrateKbps of 4000 (Bandwidth parameter on the WebRTCAdaptor connector). 

 

When we publish to Facebook RTMP via WebRTC using Ant Media (H.264, no ABR) the resulting video quality isn't as good/sharp compared to using Facebook's native app to publish a live video. 

So from our understanding we use the proper settings and even a way higher bitrate the the default one, but the quality still lacks the sharpness you get on the same device/phone when publishing via the native Facebook app. 

What other settings/configuration changes we can make to improve the quality or is this expected due to encoding differences/codec between the native Facebook app and Ant Media?

Thanks

Lars

Link to comment
Share on other sites

  • 0
Hi Lars,
​Thank you for that.
I would suggest you to change the bit-rate to something around 3Mbps and FPS to 30 in the red5-web.properties under application settings and try it.
Meanwhile I will also try to reproduce the scenarios and get back to you.
--
Best Regards,
Mohit Dubey 


 
Star Ant Media Server on GitHub and get a chance to win an AMS Annual Enterprise Edition License.


On Wed, 11 Aug at 11:02 PM , Lars Schwarz <lars.schwarz@gmail.com> wrote:
Hey Mohit,

Facebook recommends a video bitrate of 1,500 to 4,000 Kbps for 720p at 30fps when using their Live API, that's why we tried a maxVideoBitrateKbps of 4000 (Bandwidth parameter on the WebRTCAdaptor connector). 

When we publish to Facebook RTMP via WebRTC using Ant Media (H.264, no ABR) the resulting video quality isn't as good/sharp compared to using Facebook's native app to publish a live video. 

So from our understanding we use the proper settings and even a way higher bitrate the the default one, but the quality still lacks the sharpness you get on the same device/phone when publishing via the native Facebook app. 

What other settings/configuration changes we can make to improve the quality or is this expected due to encoding differences/codec between the native Facebook app and Ant Media?

Thanks
Lars
On Wednesday, August 11, 2021 at 9:48:15 PM UTC+2 support wrote:
Hi Lars,
Pardon me if I didn't understood your query well and feel free to correct me. But let me try to answer, the default bandwidth set for WebRTC stream in AMS is 900Kbps and FPS is at 20
You can change these parameters to suit your requirement under application settings /usr/local/antmedia/webapps/LiveApp/WEB-INF/red5-web.properties
Also, we recommend not to set bandwidth higher that 2.5Mbps in WebRTC stream so that it stays true to real time communication.
Let me know if this helps and/or if I'm missing something.

--
Cheers,
Mohit Dubey

 
Star Ant Media Server on GitHub and get a chance to win an AMS Annual Enterprise Edition License.


On Wed, 11 Aug at 10:34 PM

Hey guys,

we publish to Facebook RTMP via WebRTC in 720p using a max bitrate of 4000.


If we use the native Facebook app to do the same (publish to Facebook Live) the resulting video looks much "sharper" and the audio quality also seems better. 

We use H.264 and no ABR, both videos were done on the same device and with excellent bandwidth/upload speed.

Question is: is this quality difference expected or is there any setting (on the WebRTC-side or via red5-web.properties config) that allows us to improve the quality so it matches what the native FB app produces on the same device/same resolution (720p)?

Thanks
Lars

--

You received this message because you are subscribed to the Google Groups "Ant Media Server" group.

To unsubscribe from this group and stop receiving emails from it, send an email to ant-media-serv...@googlegroups.com.

To view this discussion on the web visit
.

--
You received this message because you are subscribed to the Google Groups "Ant Media Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ant-media-server+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-media-server/423aae56-4451-4c23-a6bf-5814b0097307n%40googlegroups.com.
45578:1264838
Link to comment
Share on other sites

  • 0
Hi Mohit,

thanks. Which bit rate setting do you refer to specifically? maxBitrateAccept?
 
Our red5-web.properties config file does not seem to have any default bitrate parameter at all. 

If there is no default setting in red5-web.properties config file, does it mean it defaults to 900 even if
we specify 4000 on the WebRTC connector side?

Is changing settings.encoding.preset to "fast" or "medium" also worth a try?

Thanks
Lars




--
Lars Schwarz
Lindenallee 29
26122 Oldenburg
Germany
T +49(0)441 36110338
M +49(0)151 1727 8127

https://about.me/larsschwarz

Link to comment
Share on other sites

  • 0
Hi Lars Schwarz,
My bad. Can you please set the frame rate to 30 in settings.webRTCFrameRate. By default it is set to 20 
​You can find this under red5-web.properties 
If there is no default setting in  red5-web.properties config file, does it mean it defaults to 900 even if
we specify 4000 on the WebRTC connector side?
No it will be as per your configuration
Is changing settings.encoding.preset to "fast" or "medium" also worth a try? 
I think this is not necessary.

--
Best Regards,
Mohit Dubey
 
Star Ant Media Server on GitHub and get a chance to win an AMS Annual Enterprise Edition License.


On Wed, 11 Aug at 11:20 PM , Lars Schwarz <lars.schwarz@gmail.com> wrote:
Hi Mohit,

thanks. Which bit rate setting do you refer to specifically? maxBitrateAccept?
 
Our red5-web.properties config file does not seem to have any default bitrate parameter at all. 

If there is no default setting in red5-web.properties config file, does it mean it defaults to 900 even if
we specify 4000 on the WebRTC connector side?

Is changing settings.encoding.preset to "fast" or "medium" also worth a try?

Thanks
Lars


On Wed, Aug 11, 2021 at 10:08 PM Ant Media Support <support@antmedia.io> wrote:
Hi Lars,
​Thank you for that.
I would suggest you to change the bit-rate to something around 3Mbps and FPS to 30 in the red5-web.properties under application settings and try it.
Meanwhile I will also try to reproduce the scenarios and get back to you.
--
Best Regards,
Mohit Dubey 


 
Star Ant Media Server on GitHub and get a chance to win an AMS Annual Enterprise Edition License.


On Wed, 11 Aug at 11:02 PM
, Lars Schwarz <
> wrote:
Hey Mohit,

Facebook recommends a video bitrate of 1,500 to 4,000 Kbps for 720p at 30fps when using their Live API, that's why we tried a maxVideoBitrateKbps of 4000 (Bandwidth parameter on the WebRTCAdaptor connector). 


When we publish to Facebook RTMP via WebRTC using Ant Media (H.264, no ABR) the resulting video quality isn't as good/sharp compared to using Facebook's native app to publish a live video. 

So from our understanding we use the proper settings and even a way higher bitrate the the default one, but the quality still lacks the sharpness you get on the same device/phone when publishing via the native Facebook app. 

What other settings/configuration changes we can make to improve the quality or is this expected due to encoding differences/codec between the native Facebook app and Ant Media?

Thanks

Lars
On Wednesday, August 11, 2021 at 9:48:15 PM UTC+2 support wrote:

Hi Lars,

Pardon me if I didn't understood your query well and feel free to correct me. But let me try to answer, the default bandwidth set for WebRTC stream in AMS is 900Kbps and FPS is at 20
You can change these parameters to suit your requirement under
application settings
/usr/local/antmedia/webapps/LiveApp/WEB-INF/red5-web.properties

Also, we recommend not to set bandwidth higher that 2.5Mbps in WebRTC stream so that it stays true to real time communication.
Let me know if this helps and/or if I'm missing something.

--
Cheers,
Mohit Dubey


 
Star 
 and get a chance to win an 
AMS Annual Enterprise Edition License
.


On Wed, 11 Aug at 10:34 PM

Hey guys,

we publish to Facebook RTMP via WebRTC in 720p using a max bitrate of 4000.


If we use the native Facebook app to do the same (publish to Facebook Live) the resulting video looks much "sharper" and the audio quality also seems better. 

We use H.264 and no ABR, both videos were done on the same device and with excellent bandwidth/upload speed.

Question is: is this quality difference expected or is there any setting (on the WebRTC-side or via red5-web.properties config) that allows us to improve the quality so it matches what the native FB app produces on the same device/same resolution (720p)?

Thanks
Lars

--

You received this message because you are subscribed to the Google Groups "Ant Media Server" group.

To unsubscribe from this group and stop receiving emails from it, send an email to
.

To view this discussion on the web visit
.

--

You received this message because you are subscribed to the Google Groups "Ant Media Server" group.

To unsubscribe from this group and stop receiving emails from it, send an email to
.

To view this discussion on the web visit
.



--
Lars Schwarz
Lindenallee 29
26122 Oldenburg
Germany
T +49(0)441 36110338
M +49(0)151 1727 8127

https://about.me/larsschwarz

45578:1264838
Link to comment
Share on other sites

  • 0
Hi Lars Schwarz,
Did you try by changing the FPS!
Also, Encoder's preset value in adaptive bitrate Libx264 presets are there https://trac.ffmpeg.org/wiki/Encode/H.264 Ant Media Server uses "veryfast" by default 
I think changing it to medium will increase the load on the CPU but you can change it and let us know how it goes.
Looking forward to hear from you.
--
Best Regards,
Mohit Dubey


 
Star Ant Media Server on GitHub and get a chance to win an AMS Annual Enterprise Edition License.


On Thu, 12 Aug at 12:29 PM , Lars Schwarz <lars.schwarz@gmail.com> wrote:
Hi Mohit,

so settings.encoding.preset is only relevant when using ABR? 

We will change the framerate and follow up here afterwards. 

Thanks
Lars

On Thursday, August 12, 2021 at 10:23:04 AM UTC+2 support wrote:
Hi Lars Schwarz,
My bad. Can you please set the frame rate to 30 in settings.webRTCFrameRate. By default it is set to 20 
​You can find this under red5-web.properties 
If there is no default setting in  red5-web.properties config file, does it mean it defaults to 900 even if
we specify 4000 on the WebRTC connector side?
No it will be as per your configuration
Is changing settings.encoding.preset to "fast" or "medium" also worth a try? 
I think this is not necessary.

--
Best Regards,
Mohit Dubey
 
Star Ant Media Server on GitHub and get a chance to win an AMS Annual Enterprise Edition License.

On Wed, 11 Aug at 11:20 PM

, Lars Schwarz <lars.s...@gmail.com> wrote:

On Wed, Aug 11, 2021 at 10:08 PM Ant Media Support <sup...@antmedia.io> wrote:

Hi Lars,

​Thank you for that.
I would suggest you to change the bit-rate to something around 3Mbps and FPS to 30 in the red5-web.properties under application settings and try it.
Meanwhile I will also try to reproduce the scenarios and get back to you.
--
Best Regards,
Mohit Dubey 



 
Star 
 and get a chance to win an 
AMS Annual Enterprise Edition License
.


On Wed, 11 Aug at 11:02 PM
, Lars Schwarz <lars.s...@gmail.com> wrote:
Hey Mohit,

Facebook recommends a video bitrate of 1,500 to 4,000 Kbps for 720p at 30fps when using their Live API, that's why we tried a maxVideoBitrateKbps of 4000 (Bandwidth parameter on the WebRTCAdaptor connector). 


When we publish to Facebook RTMP via WebRTC using Ant Media (H.264, no ABR) the resulting video quality isn't as good/sharp compared to using Facebook's native app to publish a live video. 

So from our understanding we use the proper settings and even a way higher bitrate the the default one, but the quality still lacks the sharpness you get on the same device/phone when publishing via the native Facebook app. 

What other settings/configuration changes we can make to improve the quality or is this expected due to encoding differences/codec between the native Facebook app and Ant Media?

Thanks

Lars
On Wednesday, August 11, 2021 at 9:48:15 PM UTC+2 support wrote:

Hi Lars,

Pardon me if I didn't understood your query well and feel free to correct me. But let me try to answer, the default bandwidth set for WebRTC stream in AMS is 900Kbps and FPS is at 20
You can change these parameters to suit your requirement under
application settings
/usr/local/antmedia/webapps/LiveApp/WEB-INF/red5-web.properties

Also, we recommend not to set bandwidth higher that 2.5Mbps in WebRTC stream so that it stays true to real time communication.
Let me know if this helps and/or if I'm missing something.

--
Cheers,
Mohit Dubey


 
Star 
 and get a chance to win an 
AMS Annual Enterprise Edition License
.


On Wed, 11 Aug at 10:34 PM

Hey guys,

we publish to Facebook RTMP via WebRTC in 720p using a max bitrate of 4000.


If we use the native Facebook app to do the same (publish to Facebook Live) the resulting video looks much "sharper" and the audio quality also seems better. 

We use H.264 and no ABR, both videos were done on the same device and with excellent bandwidth/upload speed.

Question is: is this quality difference expected or is there any setting (on the WebRTC-side or via red5-web.properties config) that allows us to improve the quality so it matches what the native FB app produces on the same device/same resolution (720p)?

Thanks
Lars

--

You received this message because you are subscribed to the Google Groups "Ant Media Server" group.

To unsubscribe from this group and stop receiving emails from it, send an email to
.

To view this discussion on the web visit
.

--

You received this message because you are subscribed to the Google Groups "Ant Media Server" group.

To unsubscribe from this group and stop receiving emails from it, send an email to ant-media-serv...@googlegroups.com.

To view this discussion on the web visit
.



--

Lars Schwarz

Lindenallee 29

26122 Oldenburg

Germany

T

M +49(0)151 1727 8127


https
//


--
You received this message because you are subscribed to the Google Groups "Ant Media Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ant-media-server+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-media-server/a626c3b2-8f4b-4cd2-b2c1-1c01aa4faa2cn%40googlegroups.com.
45578:1264838
Link to comment
Share on other sites

  • 0
Hi Mohit, 

We did change the framerate, but haven't tested/compared results yet.

Still unsure about the 'veryfast' encoder preset, because according to the docs it seems this is only used if Ant Media is configured to use
the Adaptive Bitrate? We also didn't find any usage reference in the source? Can you confirm that this is still used, even if we don't use
ABR?

Thanks: Lars



--
Lars Schwarz
Lindenallee 29
26122 Oldenburg
Germany
T +49(0)441 36110338
M +49(0)151 1727 8127

https://about.me/larsschwarz

Link to comment
Share on other sites

  • 0
Hi Lars Schwarz,
Yes, settings.encoding.preset  is only valid for ABR when the transcoding takes place in ABR.

--
Best Regards,
Mohit Dubey
 
Star Ant Media Server on GitHub and get a chance to win an AMS Annual Enterprise Edition License.


On Mon, 16 Aug at 9:56 PM , Lars Schwarz <lars.schwarz@gmail.com> wrote:
Hi Mohit, 

We did change the framerate, but haven't tested/compared results yet.

Still unsure about the 'veryfast' encoder preset, because according to the docs it seems this is only used if Ant Media is configured to use
the Adaptive Bitrate? We also didn't find any usage reference in the source? Can you confirm that this is still used, even if we don't use
ABR?

Thanks: Lars

On Mon, Aug 16, 2021 at 8:39 PM Ant Media Support <support@antmedia.io> wrote:
Hi Lars Schwarz,
Did you try by changing the FPS!
Also, Encoder's preset value in adaptive bitrate Libx264 presets are there https://trac.ffmpeg.org/wiki/Encode/H.264 Ant Media Server uses "veryfast" by default 
I think changing it to medium will increase the load on the CPU but you can change it and let us know how it goes.
Looking forward to hear from you.
--
Best Regards,
Mohit Dubey


 
Star Ant Media Server on GitHub and get a chance to win an AMS Annual Enterprise Edition License.


On Thu, 12 Aug at 12:29 PM
, Lars Schwarz <
> wrote:
Hi Mohit,

so 
settings.encoding.preset
is only relevant when using ABR? 

We will change the framerate and follow up here afterwards. 

Thanks
Lars


On Thursday, August 12, 2021 at 10:23:04 AM UTC+2 support wrote:

Hi Lars Schwarz,

My bad. Can you please set the frame rate to 30 in settings.webRTCFrameRate. By default it is set to 20 
​You can find this under 
red5-web.properties
 
If there is no default setting in  red5-web.properties config file, does it mean it defaults to 900 even if
we specify 4000 on the WebRTC connector side?
No it will be as per your configuration
Is changing settings.encoding.preset to "fast" or "medium" also worth a try?
 
I think this is not necessary.

--
Best Regards,
Mohit Dubey

 
Star 
 and get a chance to win an 
AMS Annual Enterprise Edition License
.

, Lars Schwarz <
> wrote:

On Wed, Aug 11, 2021 at 10:08 PM Ant Media Support <
> wrote:

Hi Lars,

​Thank you for that.
I would suggest you to change the bit-rate to something around 3Mbps and FPS to 30 in the red5-web.properties under application settings and try it.
Meanwhile I will also try to reproduce the scenarios and get back to you.
--
Best Regards,
Mohit Dubey 



 
Star 
 and get a chance to win an 
AMS Annual Enterprise Edition License
.


On Wed, 11 Aug at 11:02 PM
, Lars Schwarz <
> wrote:
Hey Mohit,

Facebook recommends a video bitrate of 1,500 to 4,000 Kbps for 720p at 30fps when using their Live API, that's why we tried a maxVideoBitrateKbps of 4000 (Bandwidth parameter on the WebRTCAdaptor connector). 


When we publish to Facebook RTMP via WebRTC using Ant Media (H.264, no ABR) the resulting video quality isn't as good/sharp compared to using Facebook's native app to publish a live video. 

So from our understanding we use the proper settings and even a way higher bitrate the the default one, but the quality still lacks the sharpness you get on the same device/phone when publishing via the native Facebook app. 

What other settings/configuration changes we can make to improve the quality or is this expected due to encoding differences/codec between the native Facebook app and Ant Media?

Thanks

Lars
On Wednesday, August 11, 2021 at 9:48:15 PM UTC+2 support wrote:

Hi Lars,

Pardon me if I didn't understood your query well and feel free to correct me. But let me try to answer, the default bandwidth set for WebRTC stream in AMS is 900Kbps and FPS is at 20
You can change these parameters to suit your requirement under
application settings
/usr/local/antmedia/webapps/LiveApp/WEB-INF/red5-web.properties

Also, we recommend not to set bandwidth higher that 2.5Mbps in WebRTC stream so that it stays true to real time communication.
Let me know if this helps and/or if I'm missing something.

--
Cheers,
Mohit Dubey


 
Star 
 and get a chance to win an 
AMS Annual Enterprise Edition License
.


On Wed, 11 Aug at 10:34 PM

Hey guys,

we publish to Facebook RTMP via WebRTC in 720p using a max bitrate of 4000.


If we use the native Facebook app to do the same (publish to Facebook Live) the resulting video looks much "sharper" and the audio quality also seems better. 

We use H.264 and no ABR, both videos were done on the same device and with excellent bandwidth/upload speed.

Question is: is this quality difference expected or is there any setting (on the WebRTC-side or via red5-web.properties config) that allows us to improve the quality so it matches what the native FB app produces on the same device/same resolution (720p)?

Thanks
Lars

--

You received this message because you are subscribed to the Google Groups "Ant Media Server" group.

To unsubscribe from this group and stop receiving emails from it, send an email to
.

To view this discussion on the web visit
.

--

You received this message because you are subscribed to the Google Groups "Ant Media Server" group.

To unsubscribe from this group and stop receiving emails from it, send an email to
.

To view this discussion on the web visit
.



--

Lars Schwarz

Lindenallee 29

26122 Oldenburg

Germany

T

M +49(0)151 1727 8127


https
//


--
You received this message because you are subscribed to the Google Groups "Ant Media Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ant-media-server+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-media-server/a626c3b2-8f4b-4cd2-b2c1-1c01aa4faa2cn%40googlegroups.com.


--
Lars Schwarz
Lindenallee 29
26122 Oldenburg
Germany
T +49(0)441 36110338
M +49(0)151 1727 8127

https://about.me/larsschwarz

45578:1264838
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...