Jump to content

New app video shows sporadic horizontal line glitching


Recommended Posts

TheShanMan
Posted

With the new app I see random horizontal lines of varying lengths near the top of the screen in video playback. I've only watched 2 shows so far with it, one a 1080p movie and one an old standard def TV show, and it was worse in the movie, leading me to believe perhaps it's related to overall bit rate. I haven't noticed any playback options I can change that I think might fix it. Being random and somewhat infrequent, I haven't tried to capture an image/video of the problem, but will do so if this isn't yet a known issue with the new app. And to be clear, the same videos have no such problem in Theater.

Do I need to tweak a setting? Is it a known bug? Do I need to get an image or video and a log file?

Posted
19 hours ago, TheShanMan said:

Do I need to tweak a setting? Is it a known bug? Do I need to get an image or video and a log file?

You are the first one to report this. I've seen no similar report. Is this in full-screen mode only or also seen in windowed mode?
Does it make a change when you adjust the video quality settings? (High auality, Balanced, Energy Efficient)

TheShanMan
Posted

I've only tried full screen. I haven't altered the video quality settings. Does that apply to direct play though?

Shall I get an image and/or video of the problem, and shall I grab the log file right after it occurs? If so, I might need a day or so.

Posted
1 hour ago, TheShanMan said:

I haven't altered the video quality settings. Does that apply to direct play though?

Yes.

1 hour ago, TheShanMan said:

Shall I get an image and/or video of the problem, and shall I grab the log file right after it occurs? If so, I might need a day or so.

Yes please, but please try the above first.

Thanks

TheShanMan
Posted

The problem isn't occurring using High Quality. However, I'm getting some occasional slight stuttering as if it can't quite process the video fast enough, which I haven't seen on Theater unless someone else is streaming at the same time. Is High Quality more resource intensive than Theater? Granted, my system is old, but since it was chugging along fine with Theater, I hope the new app won't force me to upgrade my hardware. Hopefully whatever the issue is with Balanced will get resolved and I won't have the stuttering there.

Next I'll try to get image/video/logs of the problem with Balanced.

Posted
37 minutes ago, TheShanMan said:

The problem isn't occurring using High Quality. However, I'm getting some occasional slight stuttering as if it can't quite process the video fast enough, which I haven't seen on Theater unless someone else is streaming at the same time. Is High Quality more resource intensive than Theater? Granted, my system is old, but since it was chugging along fine with Theater, I hope the new app won't force me to upgrade my hardware. Hopefully whatever the issue is with Balanced will get resolved and I won't have the stuttering there.

Next I'll try to get image/video/logs of the problem with Balanced.

High quality uses software to process the video, not your GPU. Your CPU is probably struggling and dropping frames. Having no lines would imply this is GPU related. Do you have the same issue if you use energy efficient?

TheShanMan
Posted

I'll try Energy Efficient next then and find out. I guess that's the equivalent of how Theater renders the video then? And Balanced and High Quality are essentially new features introduced by the new app?

Posted
12 minutes ago, TheShanMan said:

I'll try Energy Efficient next then and find out. I guess that's the equivalent of how Theater renders the video then? And Balanced and High Quality are essentially new features introduced by the new app?

Balanced is pretty much the same as Theater auto, but energy efficient relies on your GPU for everything. That's why I suggested it. It might point us in the right direction and rule out a few things.

TheShanMan
Posted

Energy efficient has seemed fine so far. Going back to balanced, the lines returned. You say that's the rough equivalent of Theater but as a reminder and for whatever it's worth, I didn't experience this problem there.

Picture shows a bunch of horizontal lines. Video shows the various lines appearing and disappearing. Emby app's log file for playback of this video attached as well.

vlcsnap-2025-01-11-15h55m48s145.png

mpv-20250111T154704865.txt

Posted

I think it's the scaling algorithms. Choose customize and use these options:

 image.png.f381aef05345cbf9bcbcf5c41b533b6e.png

TheShanMan
Posted

That worked. Does that mean the default settings for Balanced have a bug? Or is it just that some settings will work for a given hardware configuration and some won't? If it's the latter, I wonder if there is some way Emby can guide a new user (new installation) to these settings with suggestions (e.g. prompting after stopping playback to ask if the video played correctly)? TBH my first impression was that the new app is buggy and I'm not exactly a novice type of user. I'd hate for others to have a poor experience if tweaking these settings goes with the territory. But... hopefully it's actually a bug that'll get fixed and there's no need to worry about that "first time" experience. :)

Thanks for figuring out the optimal settings for me in the meantime!

Posted
Just now, TheShanMan said:

That worked. Does that mean the default settings for Balanced have a bug? Or is it just that some settings will work for a given hardware configuration and some won't? If it's the latter, I wonder if there is some way Emby can guide a new user (new installation) to these settings with suggestions (e.g. prompting after stopping playback to ask if the video played correctly)? TBH my first impression was that the new app is buggy and I'm not exactly a novice type of user. I'd hate for others to have a poor experience if tweaking these settings goes with the territory. But... hopefully it's actually a bug that'll get fixed and there's no need to worry about that "first time" experience. :)

Thanks for figuring out the optimal settings for me in the meantime!

No, I think it's more likely a glitch between the algorithm and your GPU/GPU driver. Those are the settings that High Quality used and Energy Efficient doesn't use them at all. Neither experienced the issue, so I had you try with what High Quality was using. Probably an edge case. 

If you wanted to, you could experiment with changing your GPU driver.

TheShanMan
Posted

I'll see if there's an update to my driver. If it's not an Emby bug even though Theater doesn't have a problem with it, perhaps it would be better to default to settings that would be more reliable and let people manually try more "advanced" settings if they're willing to experiment? Seems like that would be better than having some percentage of your users experience problems out of the box (probably a small percentage, but still).

And unless/until I get a version of the driver that works better, it sounds like I should change back to Energy Efficient so I don't get stuttering like I got with High Quality.

Thank you!

Posted (edited)
52 minutes ago, TheShanMan said:

 it sounds like I should change back to Energy Efficient so I don't get stuttering like I got with High Quality.

Just stick with what you have. The stuttering you had was because the cpu couldn't keep up. What you have now is the best of both worlds. The same scaling performed by your GPU, and also hardware decoding. So, quality with speed. Using Energy Efficient is a degradation in quality. 

Edited by generiq
Posted

Here's some information on how it works

On 10/24/2024 at 8:08 PM, softworkz said:

Technical Background

Some parts of the options logic may seem a bit confusing or even unsuitable, and that needs some explanation. Let's start by looking at a GPU with support for hardware media acceleration:

image.png.e7e58dd546fa55b8361947edffb7fbb1.png

Obviously, this is insanely simplified, but just right for what we need to know. GPUs primarily implement media acceleration features by placing "fixed-function" blocks on their GPU dies, some kind of "asics", which means that they have a fixed logic which cannot be changed or re-programmed and provide certain sets of functionaliies which they can perform with maximum efficiency and low power consumption. 
Typically there's one or more encoder blocks and one or more decoder blocks. Some (like Intel) also have special units for video processing (Nvidia only has fixed-function deinterlacing and scaling, but that's built into the decoder chips. For all other processing, you need to use CUDA - and CUDA in turn uses the primary compute resources of a GPU - those for which we are all buying them (traditionally 3D applications and games.
This is just scratching the surface, but it's all we need to know by know.

 

What's special about MPV Player?

What an average simple video player with HWA would do is similar to this:

  • Feed the source video data into the DEC unit for decoding
  • Use video processing (scaling, deinterlacing, color conversion) from the VP block (or elsewhere)
  • And now the video frames are already done and just need to be copied (or ideally blended) onto the the desktop window hierarchy

MPV has a variety of video output modules, but we focus on the primary ones: gpu and gpu-next. 
A leading narrative among MPV developers and enthusiasts is that the video quality of scaled video using GPU fixed-function (hardware acceleration)  would be horribly bad and that's one of the reasons why shader-based scaling is the nonplusultra way to do it.

So, what does that mean, "shader based scaling"? In contrast to the example above, processing is done right at the place where video is being rendered to the screen. Various stages of processing are applied at this stage, most importantly: Scaling and tone mapping or color adaption. All this is done via shader kernels which are mini-programs, running on some or all of the thousands of units the GPU has - which means that it is using the GPU's 3d resources, and that's a whole different dimension when comparing to fixed-function scaling which has close-to-zero cost. So MPV is going for quality rather than saving energy.

The Filter Modes

A recent discusion and internal tests brought the conclusion that it would be desirable to also have an energy-efficient mode which can be used when running on batteries or energy consumption is crucial for other reasons. MPV doesn't provide such mode, so we needed to create it. As a result, we have three filter modes now, which also map to the three primary presets.

Hardware-Only

This mode is intended to provide the best efficiency, least power consumption. The concept is to eliminate what is conisuming the most energy: Shader-based scaling at the video output.
So, in this mode we are disabling scaling at the output stage and instead, we are inserting a hardware scaling filter. The video size and the video window size is being observed continuously. On changes, these values are used to calculate a new scale factor for updating the hardware scaling filter.

In this mode, not all aspect ratio options are available. The dynamic cropping feature does not work here, because its need software filtering while this mode aims to do everything in hardware. Fit, Cover and 100% are still available, but are processed by custom logic in this mode rather than getting applied to mpv.

image.png.a11c4749ec510830d2817c328cdac9ad.png

Mixed Mode

The purpose of this mode is to do as much as possible in hardware but still be able to use software filers. From the image below, it can also be seen that it's possible to use two different GPU's (blue boxes) - so there are always two possible stages which can be hardware-accelerated.

In this mode, pre-scaling is performed via hw accelerated scaling. Pre-scaling only gets active in case when the width or height of the video is more than 20% larger than the monitor (not the window) resolution on whch the Emby app is displayed on playback start. It scales down then video in those cases but leaves it still 10% larger than the monitor, so the final scaling is always done by the video output (shader-based scaling).

 

image.png.02cf75f8bd3cc5c09a71b3e1631d3fd9.png

Software Mode

Enthusiasts often want the best possible filter implementations, which can usually be rather found as software implementations. They will typically also prefer to have all scaling be performed by the video output, using shader-based scaling, so there's no need for a hardware (fixed-fnuction} filter. 

There's no hw decoding in this preset, because that's not efficient. Experience has led to the following rule of thumb: Don't use hw decoding unless you are doing something with that data (deinterlacing, scaling, etc.). For a 4k video for example, hw decoding makes sense  if you also process or downscale the frame. But just for decoding, the data transfer has usually a worse impact than the benefit of hw accelerated decoding (which is generally small) - especially when uploading fromes to hardware again later, like in our case

 

image.png.e1221516e684e613f953e1252f348d8a.png

 

 

Posted
14 hours ago, TheShanMan said:

That worked. Does that mean the default settings for Balanced have a bug? Or is it just that some settings will work for a given hardware configuration and some won't? If it's the latter, I wonder if there is some way Emby can guide a new user (new installation) to these settings with suggestions (e.g. prompting after stopping playback to ask if the video played correctly)? TBH my first impression was that the new app is buggy and I'm not exactly a novice type of user. I'd hate for others to have a poor experience if tweaking these settings goes with the territory. But... hopefully it's actually a bug that'll get fixed and there's no need to worry about that "first time" experience. :)

This is the first time I'm seeing such issue, we'll have to watch out and observe whether more users will see the same.

Thanks

TheShanMan
Posted

I double checked and there isn't a newer version of the video driver. I'm not surprised because this is an old motherboard. Hoping these settings won't be more resource intensive than Theater and I can get away without upgrading hardware for the time being.

Thanks everyone.

Posted
7 minutes ago, TheShanMan said:

I double checked and there isn't a newer version of the video driver. I'm not surprised because this is an old motherboard. Hoping these settings won't be more resource intensive than Theater and I can get away without upgrading hardware for the time being.

Thanks everyone.

Which CPU do you have?

Posted
14 minutes ago, TheShanMan said:

I double checked and there isn't a newer version of the video driver. I'm not surprised because this is an old motherboard. Hoping these settings won't be more resource intensive than Theater and I can get away without upgrading hardware for the time being.

Thanks everyone.

If you aren't dropping any frames, you should be fine. You can always try the other upscale options :-  Hermite, Mitchell etc. Personally, I use Mitchell. Also, try setting downscale to to bilinear,  and see what happens. I only made my suggestion because we knew it didn't present the issue. Feel free to test the different options and let us know your findings. 

Posted
4 minutes ago, generiq said:

If you aren't dropping any frames,...

Thanks, that's nice but more or less pointless.

He needs to install the latest driver from the Intel Website and all will be fine!
(not from the Mainboard manufacturer; same applies in case of AMD)

TheShanMan
Posted

The motherboard is too old. I had to go on the wayback just to find what used to be on the Intel site for my mobo. They don't even have a Windows 10 compatible video driver, so I'm stuck with the driver supplied by Windows. The cpu is an i5-2500 fwiw.

Posted
8 minutes ago, TheShanMan said:

The motherboard is too old. I had to go on the wayback just to find what used to be on the Intel site for my mobo. They don't even have a Windows 10 compatible video driver, so I'm stuck with the driver supplied by Windows. The cpu is an i5-2500 fwiw.

Woahh - Sandy bridge? Okay, that's a lost case then. 

Can this even do any hw acceleration? Can't even imagine..

TheShanMan
Posted

Yeah I said it was old. Pretty sure it's doing hardware acceleration, and it's been running fine all these years so there's been no need to upgrade. I know I'll have to eventually, but for now, why upgrade when it's working fine, right?

Posted

Back to what I said then. If you have smooth playback and no other issues, you should be fine. No use trying to fix something that isn't broken. But you have other settings to try.

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