Jump to content

Issues with high bitrate video streaming


Go to solution Solved by Carlo,

Recommended Posts

Posted

I've had this issue for a while now, and even with the latest beta, which notes SMB performance improvement, it's still happening.

Basically, I have a few very high bitrate files (200+ Mbit/s) and while I can play them back directly from the network share using VLC or Kodi, using Emby on the same devices results in buffering and stutter. When using my primary Emby device, an Nvidia Shield Pro (2019), after a few seconds of playback Emby has to pause and buffer. With Kodi 21 on the same hardware, playback is smooth and without issue. On my laptop, using the Emby Windows Store app, the experience is the same, playback for a few seconds, then buffering. VLC and Kodi, play the file fine. In all tests the same file is being played from the same network share. I'm rather stumped.

Environment

  • Emby Server 4.9.0.31 running on DS1821+ with DSM 7.2.1 Update 5
  • Sample file: https://archive.org/details/g-2020
  • Client 1: Emby Android app on Nvidia Shield Pro (2019)
  • Client 2: Emby Windows Store App (Windows 11, Dell XPS13)
  • Transcoding has been disabled to force Directplay as the DiskStation can't realtime transcode this
  • Everything is hardwired with CAT, except the laptop which is Wifi-6

embyserver (1).txt

visproduction
Posted

I looked up the max bitrate for Internet browsers.  I found references to a top rate of 16.0>
See: https://searchfox.org/mozilla-central/source/dom/html/HTMLMediaElement.cpp
https://source.chromium.org/chromium/chromium/src/+/f23e01e01c7072467e0f5eb1f299fdd0032fdc46:third_party/blink/renderer/core/html/media/html_media_element.h

Also found older forum where users ran into this limit some years ago.  I could not find the latest info.  Perhaps the browser itself limits playback.

https://stackoverflow.com/questions/30970920/html5-video-what-is-the-maximum-playback-rate

That seems plausable.  Browser brands would want to limit their product speed to what they know can work.  Otherwise, they would lose credibility.  VLC and other players have many less features and playing back media on 3rd party apps is not the same as on a browser.

Hope that helps.

Quote
public:
// Limits the range of media playback rate.
static constexpr double kMinPlaybackRate = 0.0625;
static constexpr double kMaxPlaybackRate = 16.0;

 

Posted

Hi @njiskathis is likely your issue:

5c9b141743595_Untitled.png

Please let us know if this helps. Thanks.

Posted

@LukeI understand restricting access to transcoding may cause playback issues due to unsupported formats. That's not really the issue I am concerned about. I know these are supported files. I know ExoPLayer can decode them. I know the hardware can decode them. I can say this confidently because:

  1. I only disabled transcoding as part of troubleshooting to make sure the player was trying to play the native files for consistency when testing against playing the native files on the same devices with alternative media players.
  2. If I allow Emby to transcode when it wants to, it still doesn't try to transcode the file on my Nvidia Shield Pro (2019) and the same playback problems occur until it fails over to transcoding.

Here's a video of what happens. My account is set to allow transcoding. The Emby App is set to allow a max bitrate of 1000 Mbit/sec. The client is connected to CAT6 as is the NAS the file is hosted on. Every port in the chain is a gigabit port. Following along with Stats for Nerd you can see it eventually decides to switch to transcoding due to a DirectPlay error. It honestly looks like like decoding is working fine, but the player isn't getting fed data over the network fast enough. A few times the player has just crashed.

Test with Emby: 20241111_110346.mp4

Test with Kodi: 20241111_094956.mp4embyserver (2).txt

  • Solution
Posted

Hi,

Looking at your first server log I see two different bitrate settings employed. The bitrate of the media is higher than any of these settings.
2024-11-09 08:13:29.638 Info App: Bitrate exceeds DirectPlay limit: media bitrate: 239897746, max bitrate: 110000000
2024-11-09 08:13:29.638 Info App: Bitrate exceeds DirectStream limit: media bitrate: 239897746, max bitrate: 110000000

2024-11-09 08:38:54.340 Info App: Bitrate exceeds DirectPlay limit: media bitrate: 239897746, max bitrate: 200000000
2024-11-09 08:38:54.340 Info App: Bitrate exceeds DirectStream limit: media bitrate: 239897746, max bitrate: 200000000

I didn't see this in the second file but did see a lot of errors you might want to take a look at.

 

You mentioned accessing your media on a NAS when direct playing in VLC and Kodi.
Is this media on your Emby Server or does Emby Server need to access it from another device?

If you have your content areas available by SMB and there is a direct correlation of
of your library path setup to your shared path

Example
F:\Media\Movies
\\MEDIA-NAS\Media\Movies
In the above "Media" was a network share. "Movies" is a top-level directory on the Media share.

If you already have this or can create a new share to match the above. You can use Direct File Play on the Shield (only the shield think)

You'll need to make a change in your library setup to enable this.
Edit any paths and fill in the optional network path similar to this:

lib.png

 

 

 

 

 

 



Now configure your shield following the instructions in this Knowledge Base article
https://emby.media/support/articles/ShieldTV-Direct-File-Access.html?q=shield

 

You mentioned you were using the Windows store version on your notebook.
Download and install the Desktop version of Emby Theater and see if this version can play with any stuttering.
The store version is in beta and a new version will be released very soon through the store.

 

Posted (edited)

The fundamental different between VLC/Kodi and the emby clients(*) - is they are playing direct via SMB, Emby is not - it is 'streaming' via HTTP via the Emby Server.

This extra 'layer' adds latency and is likely the primary cause of your stuttering - especially at those bitrates.   It's not the network capacity per se  - but it is the emby stack/network combo.

  • NAS > SMB > VLC/Kodi 
  • NAS > SMB > Emby Server > HTTP > Emby Client

This is the difference.

(*) The only clients that have the ability to play directly (via SMB) - Is the Emby Theatre - when you have setup the 'optional' SMB file path in your libraries (and have it working) OR the AndroidTV Emby Client running on an older version of Android - that allows the same Direct SMB playback. (which I use as my mainstream 4K remux playback client).

  • NAS > SMB > Emby Client (in SMB Direct File Mode)

Why Emby have removed this ability from their other mainstream clients I have no idea - but in the many years of using emby, it is the only guaranteed way to have faultness/fast responsive 4K+ high bitrate playback (100-120Mbit/sec or + if the client can handle it) imho.

Edited by rbjtech
  • Agree 1
Posted (edited)

Thanks @Carlo @rbjtech, that's the kind of detail I was looking for. Emby Server is also running on the NAS and accessing media via a local filepath, so in this case it would be Btrfs > Emby Server > HTTP > Emby client, but that's still a different protocol/stack than the SMB path and explains what I'm seeing. I can try giving direct paths a go and see how that performs. I've used the alternate path option before when playing direct using the Emby add-on for Kodi, so that should be a viable alternative. There's nothing in my media archive that the Shield can't natively decode, so losing transcoding is a fair trade off.

As for the Emby Windows Store App, I only used that to test an alternate client, my media setup is built around Nvidia Shields. Three of them in use so far. I wish a newer, more powerful Android box would exist, but alas, that remains a pipe dream.

Edited by njiska
Posted

This was a journey.

Setup Android Attached Storage as required. Apparently it resolves the hostname, so I had to update my alternate paths that were configured using the IP address.

Went to setup direct paths and discovered it requires an External Player because the Shield is running Android 11. Ok, downloaded VLC for Android. Tried to play a file and it failed immediately. Searched the forums and found someone else with this issue from 2022. Downloaded MX player and now I get a popup option to use VLC or MX Player. VLC plays the file fine as an external player.

I guess I have a solution, but this is not ideal. Part of the reason why I moved from using Kodi with the Emby Addon to using Emby directly was to simplify the experience and have an easy ability to resume playback across multiple devices. Now, at least for high bitrate files, I have to jump through hoops again. If there's a known limitation to what Emby server can stream via HTTP, than why can I set the max supported bitrate above it in the client? Similarly, if Direct File playback is the solution, then why isn't there a native option to load the file with ExoPlayer? I understand this would still require mounting as Attached Storage as ExoPLayer doesn't natively support SMB, but at least that would still be playback directly in Emby with the Emby UI.

Still, appreciate all the help. I'll probably just switch on direct paths when I need it and leave it disabled the rest of the time.

Posted
4 hours ago, njiska said:

As for the Emby Windows Store App, I only used that to test an alternate client, my media setup is built around Nvidia Shields. Three of them in use so far. I wish a newer, more powerful Android box would exist, but alas, that remains a pipe dream.

If you can get a chance to try this, please do.
When I was playing high bit media on my ShieldTV Pro I had the same issue as you.
Windows Theater Store would stutter
Windows Theater Desktop would play them
Just tried with the Windows Theater store version that will be release soon and it did not stutter either.
This was on my slowest computer as well (i5) and I wasn't using Ethernet. :)

  • Agree 1
Posted (edited)
10 hours ago, njiska said:

This was a journey.

Setup Android Attached Storage as required. Apparently it resolves the hostname, so I had to update my alternate paths that were configured using the IP address.

Went to setup direct paths and discovered it requires an External Player because the Shield is running Android 11. Ok, downloaded VLC for Android. Tried to play a file and it failed immediately. Searched the forums and found someone else with this issue from 2022. Downloaded MX player and now I get a popup option to use VLC or MX Player. VLC plays the file fine as an external player.

I guess I have a solution, but this is not ideal. Part of the reason why I moved from using Kodi with the Emby Addon to using Emby directly was to simplify the experience and have an easy ability to resume playback across multiple devices. Now, at least for high bitrate files, I have to jump through hoops again. If there's a known limitation to what Emby server can stream via HTTP, than why can I set the max supported bitrate above it in the client? Similarly, if Direct File playback is the solution, then why isn't there a native option to load the file with ExoPlayer? I understand this would still require mounting as Attached Storage as ExoPLayer doesn't natively support SMB, but at least that would still be playback directly in Emby with the Emby UI.

Still, appreciate all the help. I'll probably just switch on direct paths when I need it and leave it disabled the rest of the time.

Using the Shield / Emby AndroidTV client with it's current OS (Android 11/Shield Experience 9), Emby have made the concious decision to not allow SMB (for direct play).  They say it's because you then need to give permissions on Android to allow access and that changes what they need to say in the store... (weak excuse imo - or just have a sideload version that works..).  To get it to work, you need to downgrade the OS to Android 9/Shield Experience 8.2.2.    Then you can mount the storage and it work properly. 

When working - you will see the stream type as 'File' in SFN.

image.png.2d4ab9161ab2ced113cc00f74d1c78c6.png

Considering AndroidTV will soon be unsupported anyway - being replaced by the currently functionally inferior Android Client (with No SMB support full stop), then the choice of using Emby Clients (and ultimately Emby itself) for high end playback will be coming to an end.  :(

 

Edited by rbjtech
Posted (edited)
7 hours ago, Carlo said:

If you can get a chance to try this, please do.
When I was playing high bit media on my ShieldTV Pro I had the same issue as you.
Windows Theater Store would stutter
Windows Theater Desktop would play them
Just tried with the Windows Theater store version that will be release soon and it did not stutter either.
This was on my slowest computer as well (i5) and I wasn't using Ethernet. :)

Windows Theater (desktop) has always worked via SMB - unfortunately it doesn't say that on SFN (I have no idea why not..) but you can tell where it's coming from as you'll have a direct file access on the file system from the account used to play Emby Theater rather than the Emby Server itself.

Using Windows Computer Manager for example - see the 'Accessed By' column ..

image.png.b440770c1a57fa4c105808fe0b2ccda2.png

 

 

Edited by rbjtech
Posted
14 hours ago, Carlo said:

If you can get a chance to try this, please do.
When I was playing high bit media on my ShieldTV Pro I had the same issue as you.
Windows Theater Store would stutter
Windows Theater Desktop would play them
Just tried with the Windows Theater store version that will be release soon and it did not stutter either.
This was on my slowest computer as well (i5) and I wasn't using Ethernet. :)

Sure. I'll give it a try after work and report back.

Posted
7 hours ago, rbjtech said:

Using the Shield / Emby AndroidTV client with it's current OS (Android 11/Shield Experience 9), Emby have made the concious decision to not allow SMB (for direct play).  They say it's because you then need to give permissions on Android to allow access and that changes what they need to say in the store... (weak excuse imo - or just have a sideload version that works..).  To get it to work, you need to downgrade the OS to Android 9/Shield Experience 8.2.2.    Then you can mount the storage and it work properly. 

When working - you will see the stream type as 'File' in SFN.

image.png.2d4ab9161ab2ced113cc00f74d1c78c6.png

Considering AndroidTV will soon be unsupported anyway - being replaced by the currently functionally inferior Android Client (with No SMB support full stop), then the choice of using Emby Clients (and ultimately Emby itself) for high end playback will be coming to an end.  :(

 

I'd say it might be time to bite the bullet and invest in a NUC and the Linux app, but that would mean losing Dolby Vision support. It's quite absurd that it's this hard to have a set-top option with both Dolby Vision and TrueHD

Posted

Downgraded Shield Pro works perfectly for me and has done for years - Direct SMB File Access, all DV/HDR10 profiles and THD/DTS-HD Audio via my Denon AVR.

pünktchen
Posted

What is the common denominator for those who have problems with high bitrate media? Are they all running Emby on a Synology?

Posted
20 hours ago, Carlo said:

If you can get a chance to try this, please do.
When I was playing high bit media on my ShieldTV Pro I had the same issue as you.
Windows Theater Store would stutter
Windows Theater Desktop would play them
Just tried with the Windows Theater store version that will be release soon and it did not stutter either.
This was on my slowest computer as well (i5) and I wasn't using Ethernet. :)

OK, so some additional details.

Downloaded and installed Emby Theatre directly. Emby Theatre will not let you set a supported bitrate above 200 Mbit/s. Even Auto caps at 200. I tried playing the file and as expected it tries to transcode it. Here's the interesting part, if I restrict transcoding on my account, Emby Desktop will play the file via direct play (according to stats for nerds), doesn't transcode it, and doesn't have any stuttering or performance issues. Per the stats page it was decoding at roughly 239 Mbit/s (file is VBR).

I haven't used the Windows Desktop App extensively, but this looks promising if it eventually can support Dolby Vision. Replacing my Shields with NUCs will be pricy, but would be a better experience if I can just natively play my media I've invested a lot of time in curating. I don't put a lot of effort into obtaining high quality files just to transcode them.

Posted
On 11/12/2024 at 5:14 PM, njiska said:

OK, so some additional details.

Downloaded and installed Emby Theatre directly. Emby Theatre will not let you set a supported bitrate above 200 Mbit/s. Even Auto caps at 200. I tried playing the file and as expected it tries to transcode it. Here's the interesting part, if I restrict transcoding on my account, Emby Desktop will play the file via direct play (according to stats for nerds), doesn't transcode it, and doesn't have any stuttering or performance issues. Per the stats page it was decoding at roughly 239 Mbit/s (file is VBR).

I haven't used the Windows Desktop App extensively, but this looks promising if it eventually can support Dolby Vision. Replacing my Shields with NUCs will be pricy, but would be a better experience if I can just natively play my media I've invested a lot of time in curating. I don't put a lot of effort into obtaining high quality files just to transcode them.

Hi, yes stay tuned for the new Windows app that is soon to launch !

  • Like 1

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...