Jump to content

Constant freezing when playing 4K


CHA0SENG7NE
Go to solution Solved by Luke,

Recommended Posts

8 minutes ago, rbjtech said:

If I am copying a file from my NAS to my PC, then yes of course it will attempt to saturate the link - BUT, we are not talking about that here - we are talking about streaming a 4K file in Emby ?  Emby reads what it needs to read and no more - ie 100Mbit/sec for a 4K remux, probably 50Mbit/sec etc..  

Setup a monitor on your ethernet while playing files like this.
Throw in a library scan while playing back your media like this and watch what happens. It's likely not what you would expect.

Remember playing back 4K media isn't just about the ability to fetch and deliver media but about the ability to keep the buffer filled on the client and not having latency issues.
Many a client are not going to be happy with a 74Mb streaming file PERIOD as it can't keep up playing it and will stutter. At these rates depending on client a setting to do "down mixing" or some other processing may be to much for it to handle smoothly but knock of 10mb and it's quite happy.

My Shield for example will stutter at these rates with some audio settings and not with others.  Any/slightest network latency will cause massive grief at this bitrate even with just one client at this bitrate.  It's not just about the "pipe size" but the ability to CONSTANTLY deliver a smooth amount of data.

Link to comment
Share on other sites

CHA0SENG7NE

It's a point id love an actual answer. If I use the qnap emby server it plays fine as it's the media is on the same device and pretty much works as a direct stream.

The windows server setup - seems like it goes from the qnap to the windows emby server and then to the Nvidia shield. 

The Nvidia shield has a 1gbps Ethernet connection.

Link to comment
Share on other sites

Happy2Play
2 minutes ago, CHA0SENG7NE said:

The Nvidia shield has a 1gbps Ethernet connection.

That is irrelevant as the Emby client will not support media at the speed, but looking around it would appear to be a 80Mb limit.

Link to comment
Share on other sites

Happy2Play

So as cayars mentioned Emby server bandwidth in and out to play the media and if the server kicks off a scan or any other metadata related process more traffic back and forth to the NAS.  So there could be many variables.  But in the end it might be achievable but high bitrate media will always have issue in a network environment as it was designed for HDMI not network.  

I would assume a item with a lower bitrate does not have this issue correct?

  • Like 1
Link to comment
Share on other sites

CHA0SENG7NE
14 minutes ago, cayars said:

Setup a monitor on your ethernet while playing files like this.
Throw in a library scan while playing back your media like this and watch what happens. It's likely not what you would expect.

Remember playing back 4K media isn't just about the ability to fetch and deliver media but about the ability to keep the buffer filled on the client and not having latency issues.
Many a client are not going to be happy with a 74Mb streaming file PERIOD as it can't keep up playing it and will stutter. At these rates depending on client a setting to do "down mixing" or some other processing may be to much for it to handle smoothly but knock of 10mb and it's quite happy.

My Shield for example will stutter at these rates with some audio settings and not with others.  Any/slightest network latency will cause massive grief at this bitrate even with just one client at this bitrate.  It's not just about the "pipe size" but the ability to CONSTANTLY deliver a smooth amount of data.

That's a fair point. I haven't had any stuttering issues with this size file before. No issues at all to be honest. Audio is passed through to the amp to process. Only since switching to the windows server have the issues started happening

Link to comment
Share on other sites

CHA0SENG7NE
1 minute ago, Happy2Play said:

So as cayars mentioned Emby server bandwidth in and out to play the media and if the server kicks off a scan or any other metadata related process more traffic back and forth to the NAS.  So there could be many variables.  But in the end it might be achievable but high bitrate media will always have issue in a network environment as it was designed for HDMI not network.  

I would assume a item with a lower bitrate does not have this issue correct?

Yes lower bitrate doesn't have an issue. Plays smoothly. 

Link to comment
Share on other sites

rbjtech
34 minutes ago, cayars said:

Setup a monitor on your ethernet while playing files like this.
Throw in a library scan while playing back your media like this and watch what happens. It's likely not what you would expect.

My Shield for example will stutter at these rates with some audio settings and not with others.  Any/slightest network latency will cause massive grief at this bitrate even with just one client at this bitrate.  It's not just about the "pipe size" but the ability to CONSTANTLY deliver a smooth amount of data.

I'm intrigued why you think this would be so - so tomorrow I'm going to get the real-time stats out the Ubiquiti switches - but for the moment I did a quick test.

I played a 4K remux of Blade Runner - @ 65 Mbit/sec on my Shield (1 gig Ethernet) - at the same time, I copied the same file (so not only contending on network bandwidth, but also contending on disk I/O)

Both happening at the same time - I got about 105 Mbytes/sec (see below) - Shield played flawlessly, TrueHD/Atmos, the works - for a good 5 minutes.  I then stopped the film on the shield.  You can see the jump (arrowed) as my file copy then gained the extra bandwidth.  So speed of the COPY went up to 113 Mbytes/sec.

The ubiquiti grab is just from the switch port - showing ~75Mbit/sec - as I would expect.

I'll do some more experimenting tomorrow (on a new thread 😉) as this is an interesting. topic

The problem is going to be clients - as I only have one Shield/4K TV, but I can run multiple high bitrate 1080p clients as it should have the same outcome. 

Filecopy.PNG

ubiquiti1.PNG

Edited by rbjtech
Link to comment
Share on other sites

rbjtech
22 minutes ago, Happy2Play said:

That is irrelevant as the Emby client will not support media at the speed, but looking around it would appear to be a 80Mb limit.

It's 120 Mbit/sec on the Shield - as confirmed by ebr.

Link to comment
Share on other sites

Happy2Play
2 minutes ago, rbjtech said:

It's 120 Mbit/sec on the Shield - as confirmed by ebr.

Must have changed over time.

 

Link to comment
Share on other sites

jbjtech you sort of answered this yourself as you're using Ubiquiti smart switches.
Change them out to $20 best buy switches with multiple switches between you're two computers and report back. :)

You're results are what should be had by a good switch.

But to be fair this isn't what I was getting at.  It's not just bandwidth but the combination of how they're used and LATENCY that happens.  When you're streaming 75 Mbps steams you're pushing it. Don't forget the overhead of start/stop bits on that stream as well as TCP and network overhead and you're much closer to 100 Mbps which is borderline.

Shave 5 to 10 Mbps off the stream and you've got much more margin available and could likely stream NAS->PC->Client all day long smoothly.

As Happy2Play has commented a couple of times, these files weren't designed for Ethernet apps but from a dedicated device that can spin and read back a disc at high bitrates outputting to HDMI. They read sequentially very fast but random access time really sucks.  When we rip them and play them back through a network we add a lot of latency even if it doesn't sound like much.  This is latency that didn't exist in disc->HDMI output.

These ARE FRINGE speeds for sure even though it would seem like it's only 1/10th of your network bandwidth.  It's far higher when you factor in all the other latency points and delays that can happen from disc to NAS computer to NAS Ethernet to switch to network to switch to PC/Emby Server to processing to ethernet to switch to ethernet to device as the network diagram shows. :)

Does a 70 Mbps or 65 Mbps stream play ok without stutter?

  • Like 1
Link to comment
Share on other sites

CHA0SENG7NE

From a qnap emby server plays perfectly. Never stuttered once. But as you have described using a Windows server adds extra work and latency

Link to comment
Share on other sites

Happy2Play
15 minutes ago, CHA0SENG7NE said:

From a qnap emby server plays perfectly. Never stuttered once. But as you have described using a Windows server adds extra work and latency

Only other way to test would be add media to a local folder on Windows server and create a test library pointing to that folder and see if you get the same results playing that media.  But yes it would appear to be a issue with the specific layout of your network.

Link to comment
Share on other sites

sooty234

I haven't read every post, but have you guys considered that the movie is probably VBR? The bitrate value in the Android TV stats for nerds is pretty useless. If it's giving a general number of 75 Mb/s, it could be spiking up close to 90 Mb/s in scenes with lots of detail. 

Here's an example:

15409366_Screenshot2020-09-25193547.thumb.jpg.8db47e133ae4cb714ffe5847d0f35941.jpg

  • Like 1
Link to comment
Share on other sites

CHA0SENG7NE
4 hours ago, Happy2Play said:

Only other way to test would be add media to a local folder on Windows server and create a test library pointing to that folder and see if you get the same results playing that media.  But yes it would appear to be a issue with the specific layout of your network.

I have tried that and it  fixed the issue. Must be a network limitation on my side. I guess 1gig speeds arent fat enough anymore!

I will use my qnap emby server as this plays the large 4k files across the network without issue.

Link to comment
Share on other sites

CHA0SENG7NE
3 hours ago, sooty234 said:

I haven't read every post, but have you guys considered that the movie is probably VBR? The bitrate value in the Android TV stats for nerds is pretty useless. If it's giving a general number of 75 Mb/s, it could be spiking up close to 90 Mb/s in scenes with lots of detail. 

Here's an example:

15409366_Screenshot2020-09-25193547.thumb.jpg.8db47e133ae4cb714ffe5847d0f35941.jpg

Maybe it is an average Bitrate it displays? Im sure the stutters I have had are due to this. Heavy detail scenes with explosions etc. The stutter was never consistent. Playing smaller 4k files around 30gig had no problem.

Link to comment
Share on other sites

vdatanet
46 minutes ago, CHA0SENG7NE said:

Does anyone use 4k Remux files?

If so how do you have yours setup to handle these?

Yes, I can handle 3-4 streams direct playing. This is my setup:

Server and Storage are in the same machine: Ubuntu server with i5 8600 CPU, 32 Gb RAM, 1Gb M.2 NVMe for the OS and for storage, a zfs pool with 6 drives 12 Tb/each, WD Red NAS. Wired Lan 1Gb. 4 Airpot Extreme (last generation), they are a little old but perform very well. I even can play those UHD remux in my bedroom Shield and Apple TV using Wifi.

Most UHD remux I have are like this:

1251865747_Capturadepantalla2020-09-26alas9_32_26.thumb.png.e3eea5a738484444daaefdf2bedd5e35.png

 

Link to comment
Share on other sites

CHA0SENG7NE

Nice setup you have... :)

My issue is the server and storage are seperate.

Im wondering if i can attach the windows server directly to the qnap and then the qnap to the switch and rest of network as it has 4 ports

Maybe that could resolve the issue? If thats possible?

 

Link to comment
Share on other sites

vdatanet
6 minutes ago, CHA0SENG7NE said:

My issue is the server and storage are seperate

I bet that's the problem. Initially I had a Synology server and a Windows mini PC, and my bottleneck was between the PC and the NAS, so I decided to merge it all into one machine.

Link to comment
Share on other sites

CHA0SENG7NE

Well it seems like i'm 3 steps behind you.... but i have adefinitive answer to my problem now and everyone has been very helpful.

Thank you all :)

Link to comment
Share on other sites

vdatanet
2 minutes ago, sooty234 said:

I've got separate storage and server, but it's 10G. Some 1G stuff, too. But didn't you say other apps play smoothly?

What protocol does your Emby server use to fetch data from the storage server (SMB, NFS...)?

Link to comment
Share on other sites

CHA0SENG7NE

Using my original Qnap Emby Server everything played smoothly. Because its one unit sending directly to nvidia shield.

Thats a serious network setup, im sure you dont have any issues with 10g

May I ask how you have created the network map picture?

 

Link to comment
Share on other sites

rbjtech

I'll be doing the experiments today and documenting for a wiki/kb article.

Last night, I had 1 x 90 Mbit/sec 4K stream running and 5 x 30 Mbit/sec 1080p streams running (then ran out of clients), and the 1gig pipe was at ~250 Mbit/sec - so a quarter of it's capacity.  Zero issues playing on all clients ...

I'm going to then mirror without using Direct Attached Storage (ie use a NAS as Storage Only) and see if I get identical results.

Link to comment
Share on other sites

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