Jump to content

Server stuttering on playback after upgrade


sciphi

Recommended Posts

I recently move my emby server from my old home server (i5, 8gb ram, desktop) to a new server (i7, 16gb, laptop, onboard nvidia card) and now some videos are stuttering badly during playback. My assumption is this is somehow transcoding related as it doesn't happen on all videos. From a very cursory investigation I noticed H264 videos are stuttering while H265 ones are not, but this is from a sample size of 4 videos. Both machines were running ubuntu 22.04. The new machine does have the nvidia drivers and container add ons installed. 

I've tried a few different things to remedy this situation. The biggest change from my old setup was I took emby from being directly installed to running in a docker, the one from the folks and linuxserver.io. I configured the docker with nvidia support. It did have the hardware decoding and encoding options available and I turned all of those on. The servers data was initially installed to an external usb3 5200rpm hard drive. 

If you pause a stuttering show for a few minutes and then resume it the show will run for a while before stuttering again. This is what makes me think transcoding is the culprit. 

So far to remedy the situtation I have disabled all of the hardware encoders and decoders and I moved the data drive from the external drive onto the root drive of the machine, the NVME hard drive inside the machine. I will attempt to recreate the docker image without the nvidia options enabled to see if that makes any difference. I'd like to avoid having to stop using the docker version if possible as it makes management easier but if this is a known issue it wouldn't be the end of the world. 

Its all very confusing and any insights anybody can offer would be greatly appreciated. 

BTW, props to the devs, backing up my install on one machine, moving the data drives, installing emby and then restoring from backup was really seamless and just work beautifully. 

Edited by sciphi
forgot something
Link to comment
Share on other sites

Q-Droid

What spec is the laptop, like which i7 CPU? If new enough it would be better to use the Intel iGPU than the nvidia GPU.

There are additional steps needed for HW accel in Docker, which you seem to have done for nvidia support. Did you do the same for Intel?

Moving the Emby data (done?) AND the transcoding temp paths to the internal NVME drive should be your first steps.

 

  • Like 1
Link to comment
Share on other sites

Thanks Q droid. It is an 9th gen Intel i7 I think..mobile version with 12 cores. In a dell laptop. I will have to look the brand up in the morning. 

Removing NVIDIA support from the docker and restarting did nothing to solve the problem. 

Yeah moved the install off the external drive and the transcoding directory is whatever the default location is, I didn't bind a path so I'm working on the assumption that will be on the main drive. 

The video files are all in the same icybox jbod array they were in before and running as 1 large volume via merger fs. But that is the same as the old setup. 

Ah, one thing I left out they are stuttering on my chrome cast. I havent noticed this problem streaming to my desktop in a browser window. But I haven't tried the problem files either. Will test tomorrow (10pm here) 

Link to comment
Share on other sites

Just tried a known problem file to my android phone, plays fine. So I'm leaning towards something related to the chrome cast being the culprit. 

But is it possible to adjust those settings?

Link to comment
Share on other sites

Q-Droid

Yes. Starting with the basics you can make sure that Transcoding Throttling is enabled. For the next one you might have to install the Diagnostics Plugin. Then under Advanced Transcoding change Throttling Method to "by Streambuffer Size". This takes care of known issues with streaming to Chromecast.

After the above you still want to get HW accel working for your Intel iGPU. The 9th gen is definitely the preferred and easier way to handle transcoding.

 

  • Like 1
Link to comment
Share on other sites

I was googling around and I ended up turning the streaming speed for the android to Chromecast down to 1.5mb on 720p and it ran smoothly. I'm guessing it can run faster and I will need to experiment with it but that seems to have done the trick. 

I will try out those suggestions Qdroid 

 

Link to comment
Share on other sites

Q-Droid, I rebuilt the docker with nvidia support on again. Under Transcoding options, when set to advanced, I have the option of VAAPI and Quicksync. I gather VAAPI is the nvidia hardware and Quicksync the intel hardware? 

Do I just want to tick all the boxes? Use one over the other? Additionally it has an ordering option, currently what I assume are the nvidia devices are first in the list. Sorry fro all the question. 

I couldn't find the throttling method you mentioned so i'll install the diagnostics plugin and see if that enables it. 

Link to comment
Share on other sites

Q-Droid

You shouldn't have to guess. Quicksync is Intel, VAAPI is open API and NVIDIA would be NVDEC/NVENC. In the Advanced view it would be clear which is which. Such as Quicksync  for CoffeeLake UHD Graphics 630 and/or VAAPI for CoffeeLake UHD Graphics 630, etc. Similar for Nvidia.

For your case put Intel at the top for each codec, preferably QuickSync. It's fine to also have VAAPI enabled but I would not bother with Nvidia unless you want to try it. If it's not showing up then you haven't quite gotten the nvidia support docker working yet.

I think you're far along enough to try again and see if it still stutters with Intel HW enabled. Still consider changing the throttling for the Chromecast playback. You can see what it's doing from the User Sessions console view. If it looks like the transcoding position is going well past the play position, like to the end, and the transcoding buffer getting bigger than a couple of minutes then you know it's not throttling like it should.

 

Link to comment
Share on other sites

Thanks for the tips. I'll play around with it some more. I did get the diagnostics plugin and changed the transcoding to stream buffer as suggested. I'll fiddle with it more this evening. 

Is the nvidia worse than the built in intel stuff? Would have thought it would be better. 

Edit: Oh I just found the User Sessions pane and it shows whats playing, how it is transcading, the buffer etc. Is that the diagnostics plugin? That will make it much easier to work out what is going on. 

Edited by sciphi
Link to comment
Share on other sites

Q-Droid

Chances are the Intel HW is slightly better for media while the Nvidia GPU is much better for gaming. Can't be certain without knowing the exact models and specs. Intel has the advantage in power usage and built-in Emby support. Gaming GPUs are power hungry and run hot, especially in laptops.

The diagnostics plugin adds quite a few good features for tweaking and monitoring the transcoding activity.

Which Chromecast are you using? Depending on the age/gen and your network this could also be a factor in the stuttering. But it's better to get your system optimized as a starting point then tackle the problem clients.

 

Link to comment
Share on other sites

Well that is weird. I tried a problem episode after making the changes and auto as the chromecast setting in the android app. Stutter stutter. 

I set the stream setting to 1080 4mb and it runs fine. The thing is the file is 720p 3mb and is direct playing in both cases. 

Link to comment
Share on other sites

Not sure of the age of the chromecast. ~3 years, it is a chromecast not a chromecast ultra which doesn't play well with my tv. 

Sounds like getting the nvidia stuff to work probably isn't worth the bother. 

Link to comment
Share on other sites

4 hours ago, survivorhosting said:

It's on almost everything it will be fixed once yall update 

Hi, what does that mean exactly?

Link to comment
Share on other sites

22 minutes ago, survivorhosting said:

Whenever you push the next server update it will be fixed  this happend on a previous update also

Can't fix something if we don't know what the problem is :)

 

Link to comment
Share on other sites

survivorhosting

There's multiple reports 

I'm not the only one

It's slow to load when playing something 

Click on playback correction and it fixs it .

Link to comment
Share on other sites

3 minutes ago, survivorhosting said:

Started the next day after doing the server upgrade 

Can you please provide an example using the information that I've requested? Thanks.

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