SoGX 4 Posted May 3, 2021 Share Posted May 3, 2021 Hello all, I have a question about playing HEVC videos. I currently have a bandwidth limit of 4 Mbps. When I play a HEVC video which has a data rate of 3,7MBit the stream is played directly. This behavior is correct as far as it goes. But why does the stream need a WAN bandwidth of about 11MBit? The same problem exists if I transcode the video to say 3 MBit. Then the stream still needs a WAN bandwidth of about 9MBit/s. When playing a h264 video the problem does not exist. Is this a correct behavior? And if so, how does it happen? Regards Link to comment Share on other sites More sharing options...
Carlo 4328 Posted May 3, 2021 Share Posted May 3, 2021 Hi, not sure I follow the question. If it needs 3.7 Mb internally that's all it will need remotely as well. What could be happening however is that the file can't be direct played by the remote system and Emby Server will need to transcode it. So a 3.7Mb HEVC file could easily need 11Mb in AVC/H.264 format because of the difference in compression. 4Mbps is not a lot of upstream for a media server and I wouldn't recommend trying to serve up anything remotely unless it's strictly just for your own use and you don't mind reducing the resolution/bitrate. Might be ok for trying to watch the news or something like that but won't be enjoyable trying to watch Star Wars or anything like that as you just don't have the needed bitrate to stream with. You should set Network->Internet streaming bitrate limit (Mbps): setting to 3 or 4 and try that. That will force Emby Server to transcode any streams to UNDER that limit. Link to comment Share on other sites More sharing options...
Happy2Play 8140 Posted May 3, 2021 Share Posted May 3, 2021 Correct without a set limit Emby will double the h265 bitrate when transcoding to 264 to attempt to maintain the same quality. So a 4Mb h265 gets encoded to 8Mb h264, the you have the regular audio track bitrate also. So in theory h265 can used more bandwidth then a h264 encode if the item needs transcoding as Emby currently does not transcode with h265 at all. Link to comment Share on other sites More sharing options...
Luke 36884 Posted May 3, 2021 Share Posted May 3, 2021 Quote But why does the stream need a WAN bandwidth of about 11MBit? Hi, it doesn't. What gives you this impression? Link to comment Share on other sites More sharing options...
SoGX 4 Posted May 4, 2021 Author Share Posted May 4, 2021 Hi, thank you very much for your answers. The server has more than 4 MBit upload, but I have limited the streaming bitrate to 4 MBit/s. I have attached a few screenshots to illustrate the problem. One from Emby, one from PRTG monitoring and one from the firewall. If I transcode a h264 movie, the WAN bandwidth is also about the set bandwidth limit of 4 Mbps. It seems, as cayars and Happy2Play wrote, that the h265 stream transcoded to h264 needs much more bandwidth and the set limit is useless in this case. Link to comment Share on other sites More sharing options...
Carlo 4328 Posted May 4, 2021 Share Posted May 4, 2021 What is the outbound bitrate measuring and where is it being measured. What is your actual Internet upload bandwidth as shown at speedtest.net? Link to comment Share on other sites More sharing options...
Luke 36884 Posted May 4, 2021 Share Posted May 4, 2021 Quote and the set limit is useless in this case. No it's not. The limit still applies when converting hevc to h264. The server may increase the bitrate of the output to normalize the differences between hevc and h264, but it will still say under the limit that you've set. Does that answer your question? Link to comment Share on other sites More sharing options...
SoGX 4 Posted May 4, 2021 Author Share Posted May 4, 2021 @cayars The bottom graph shows outbound traffic measured directly at the firewall. With a measurement from speedtest.net I have an upload bandwidth of approx 52MBit/s. @Luke So that means the set limit in this case refers only to the source file (HEVC) and not to the outgoing stream (h264)? So you need more bandwidth to stream HEVC than h264 with the same streaming rate limit? So to compensate for this you would have 2 bandwidth limit settings, one for HEVC and one for h264? Link to comment Share on other sites More sharing options...
Happy2Play 8140 Posted May 4, 2021 Share Posted May 4, 2021 Set limits are not ignore. If I set a 1Mb stream limit and play a 10Mb HEVC I will get a 1Mb stream no matter what it is converted to. Ffmpeg and server log is needed for specific examples. Link to comment Share on other sites More sharing options...
Luke 36884 Posted May 4, 2021 Share Posted May 4, 2021 Quote and not to the outgoing stream It does apply to the outgoing stream. That's precisely what the limit option is for. Quote So to compensate for this you would have 2 bandwidth limit settings, one for HEVC and one for h264? No, because as I just said, the limit applies to the outgoing stream regardless of format. Link to comment Share on other sites More sharing options...
SoGX 4 Posted May 4, 2021 Author Share Posted May 4, 2021 Here are the logs, transcoded to 3MBit/s results in about 8MBit/s WAN traffic. ffmpeg-transcode-e1a291fe-5794-4e4c-93ab-0882b6f02089_1.txt embyserver.txt Link to comment Share on other sites More sharing options...
SoGX 4 Posted May 4, 2021 Author Share Posted May 4, 2021 30 minutes ago, Luke said: It does apply to the outgoing stream. That's precisely what the limit option is for. No, because as I just said, the limit applies to the outgoing stream regardless of format. @Luke OK, thanks for the clarification. Then it's either a problem or a display error. Although the traffic is displayed correctly for an h264 stream. Maybe it also helps to know that a HAproxy is still in use. Link to comment Share on other sites More sharing options...
Carlo 4328 Posted May 4, 2021 Share Posted May 4, 2021 The ffmpeg log is showing "c:a:0 copy -metadata:s:a:0 language=ger" so the German audio track is copied from the original. "-maxrate:v:0 2616000" so the video max rate is set for 2,616,000 or 2.6Mbit. Together the audio and video are going to be your 3Mbit. What you see at your router out isn't from this one stream in Emby but could be your proxy trying to delivery this as fast as possible to the client if you haven't set any limits there. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now