Jump to content

Clients transcode with default settings when connecting over Internet


Recommended Posts

Posted (edited)

I used to have nginx in front of a locally installed Emby which caused all connections, evens the one from Internet, to appear as if they came from localhost from Emby's point of view. With this setup, my Emby client never transcoded with its default settings (auto quality).

Recently, I have set it so Emby is run in a container with Traefik as the SSL termination and Emby is seeing that these connections are not from the local network (it is the exact same version, 4.8.0.21, and settings, it is the same folder that I was using before). Now, I see that the Emby client transcodes when it should not be necessary since there is more than enough bandwidth available to handle the original stream size. 

Is the auto setting more conservative when it detects that the client is connected over Internet? if so, what can I do, from the server side, to relax it so it doesn't transcode if it is not strictly necessary?

Thanks

Edited by nouboh
Happy2Play
Posted
Just now, nouboh said:

Is the auto setting more conservative when it detects that the client is connected over Internet?

Yes and usually ends up using the fallback bitrate.  Use anything but Auto if your worried about transcoding.

Only options would be setting clients to MAX quality and throttle via server "Internet streaming bitrate limit (Mbps):" setting on Network or per user.

Posted

I see, thanks. Would adding 0.0.0.0/0  to Network->LAN networks setting made it behave like before (i.e. no end up using the fallback bitrate)? It should then consider that all connections come from the local network.

Otherwise, I guess I can trick emby again into thinking that all connections come from localhost somehow with Traefik. 

Happy2Play
Posted

Never tried tricking Emby but with internet connections there is really no such thing as Auto.  It is really Direct play and transcode.  And depending on your media it is impossible direct play everything across the internet on every connection type.  I personally know everything I own would have to be transcoded on my cellular network 99% of the time.

But if you truly what Emby to think Every connection is local you can but I would still count on transcoding and or playback issues due to poor internet buffering issues trying to Direct play.

Posted

Well, I guess what I'd like is to avoid transcoding even over Internet when there is more than enough bandwidth. Right now, A 9mbps H264 stream is being transcoded to 7mpbs H264, server and client have a gigabit connection and the client can perfectly play the original file, it feels quite absurd. I do not have a very powerful computer and it would be completely fine to just Direct play this file. From what I understand, that is expected with Auto and over Internet, right?

From what you said I just need to configure the client to Max quality but is not very practical since I'll have to configure all family and friends home clients this way.

Happy2Play
Posted

You can disable per user but if transcoding is required then the stream will fail if conversion is needed for other than bitrate.

image.png.6e19044d52ae6295b6d744e34635954d.png

Just because everyone has fast connections does not mean those connections will not be throttled by ISP or have issues in the hops between point A and point B.  Auto will almost always be conservative when it comes to the internet.

Posted

Disabling transcoding entirely would be too much. I just need it to not be so conservative and to not transcode due to Auto quaility settings unless there are buffer errors. It should still transcode if the container or format is not supported by the client. In my opinion, it is too conservative.

Anyway, worst case I'll just remove all references to the source IP address removing the `X-Real-Ip` and `X-Forwarded-For` headers before sending the requests to Emby. This way will behave like before since all connections will seem local. I never had any problem with that set up.

Posted

Make sure you understand that other things such as login screen, user access and authentication rely on the distinction between LAN and remote.

- If you have local only users such as admin accounts they will be allowed to connect remotely.

- If you have passwordless or PIN access users it will open those methods to them remotely.

- If your login screen lists users locally those will be shown to remote connections.

There are likely more undesirable effects that I can't think of right now. You should follow Happy's advice.  Ask your users to set their playback bitrates to their own ISP service max and you set your server side limit to yours. Before playback the server will compare and use the lower value of the two and stream up to that rate without transcoding. There are many other reasons for which it might still transcode but your immediate problem is the Auto detection.

  • Agree 1
Posted

Good points. I'll keep that in mind if I decide to go the route I described. I'll try to make it work as you both suggest.

Thanks

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...