Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4K video playback laggy and stuttering. #262

Closed
KrisCris opened this issue May 11, 2020 · 29 comments · Fixed by #279 or #308
Closed

4K video playback laggy and stuttering. #262

KrisCris opened this issue May 11, 2020 · 29 comments · Fixed by #279 or #308
Labels
graphics Graphics/GPU issues

Comments

@KrisCris
Copy link

KrisCris commented May 11, 2020

Describe the bug
4K video playback stutters, lots of frame drops.

  • Quicktime player: Unable to play.
  • IINA: Delays observed.
  • VLC: "h264 4k 120-stutter.mp4" unable to play, "h265 4k 60-stutter.mp4" no much problem.

I think it's some configuration problems...

  • I can play these two videos in Windows without any problems.
  • A MBP 13 plays these smoothly.
  • And a Hackintosh build with AMD 2700x CPU and Radeon Vega II GPU can correctly hardware decode these videos OOB.

Video links:https://1drv.ms/u/s!Aj4tLSaqxvfdwjASwip9MKVr3I2o?e=sY6t90
password: hacmini
(just some random videos for testing...)

Expected behavior
Should decoding correctly and playing smoothly.

Configuration

  • HaC Mini version : 2.7
  • OSX version : 10.15.4
  • NUC model : HVK
  • Display port(s) used : MINIDP, USB-C
  • Display resolution(s) : 2K, 4K

Modifications
I tried the both AMD codec and Intel codec of the HacMini Installer, nothing changed.
It only plays these videos smoothly when HW acc is not available...(Using software decoding).

(Later, I changed my PlatformInfo to iMac18,3, which is nothing to do with this problem tho.
Btw, I saw you have talked about the iMac18,3 and USB-C DP in some Issues, but I've tested and it works fine. Would you like to consider making the iMac18,3 option available in the installer?)

@KrisCris KrisCris added the bug Something isn't working label May 11, 2020
@osy
Copy link
Owner

osy commented May 11, 2020

Is there any DRM on these videos? Btw doesn’t have to be paid content to have DRM.

@KrisCris
Copy link
Author

KrisCris commented May 11, 2020

Is there any DRM on these videos? Btw doesn’t have to be paid content to have DRM.

Hmm, these are cut from a youtube video, but I re-rendered these videos in the Adobe media encoder and other software... So

BTW, I had no problem playing the original video.

@KrisCris
Copy link
Author

KrisCris commented May 11, 2020

I've encountered this issue when playing some 1080P videos, but not many and not that severe. (I am sure those don't have DRM.)

I think it's something to do with the codec.

@goodbest
Copy link
Collaborator

goodbest commented May 11, 2020

tested on 4k screen with dp port, 10.5.4.
I chose the intel for bootargs in hac-mini installer

h264 4k 120fps:laggy on quicktime,fine on iina 1.0.4 (hw decode set to auto or disable
h265 4k 60fps:both fine

So I think the issue is related to either quicktime or the video itself.

For the 4k 120fps video, as your video file is variable frame-rate (vfr), maybe there is some bug in the timecodes that quicktime cannot play correctly (with hw/sw)?

@KrisCris
Copy link
Author

Software decoding works fine for both videos. So I think this issue only happens when using HW decode.

h264 4k 120fps:laggy on quicktime,fine on iina 1.0.4 (hw decode set to auto or disable
h265 4k 60fps:both fine

When iina decode is set to auto, both video laggy:
The sound and image are out of sync when the cube jumping.
Screen Shot 2020-05-11 at 10 20 32 PM

So I think the issue is related to either quicktime or the video itself.

I agree that these videos are not good examples.

But both two can play smoothly on a real MacBook Pro, and my friend had no problem decoding them using a mac supported AMD card.

And I do have experienced stutters playing some other 1080P BDRIPs (10bit HEVC videos from https://vcb-s.com/), but they're just not that severe.

For the 4k 120fps video, as your video file is variable frame-rate (vfr), maybe there is some bug in the timecodes that quicktime cannot play correctly (with hw/sw)?

As I mentioned, the AMD Radeon VII had no issue decoding them using whatever players.
I know that Radeon VII is way better than our card, but I think our card is not that bad.

@KrisCris
Copy link
Author

Nvm if this is hard to fix since I can always turn off HW decode. :)

@goodbest
Copy link
Collaborator

goodbest commented May 12, 2020

Software decoding works fine for both videos. So I think this issue only happens when using HW decode.

h264 4k 120fps:laggy on quicktime,fine on iina 1.0.4 (hw decode set to auto or disable
h265 4k 60fps:both fine

When iina decode is set to auto, both video laggy:
The sound and image are out of sync when the cube jumping.
Screen Shot 2020-05-11 at 10 20 32 PM

So I think the issue is related to either quicktime or the video itself.

I agree that these videos are not good examples.

But both two can play smoothly on a real MacBook Pro, and my friend had no problem decoding them using a mac supported AMD card.

And I do have experienced stutters playing some other 1080P BDRIPs (10bit HEVC videos from https://vcb-s.com/), but they're just not that severe.

For the 4k 120fps video, as your video file is variable frame-rate (vfr), maybe there is some bug in the timecodes that quicktime cannot play correctly (with hw/sw)?

As I mentioned, the AMD Radeon VII had no issue decoding them using whatever players.
I know that Radeon VII is way better than our card, but I think our card is not that bad.

According to your phenomenon, I suppose there might be some issue with hw decoding.
However, we need more tests to decide whether:

  • it's a general issue for a Hackintosh (then there may be some config param to be set, or a weg bug)
  • or, it's just a hac-mini specified issue (as Hac-mini spoof the amd gpu to load with old kexts, etc.)
  • or, the file is missing some part( maybe timecodes) for standard hw decoding, so hw decoding performance varies on different machines and software. It's common in the old days.

I tried with a hackintosh laptop running 10.15.3, with kabylake cpu and intel hd620.
h264 4k 120fps:

  • laggy on quicktime
  • fine on iina 1.0.4 (software decode)
  • laggy on iina (hw set to auto, cpu % is not high, so maybe it's using hw decode)

@osy osy added graphics Graphics/GPU issues and removed bug Something isn't working labels May 25, 2020
@Malumen
Copy link

Malumen commented Jun 3, 2020

Is this instantaneous? Or over time? I have an issue where the system stutters (audio + video) after being powered on for more than a day.

@KrisCris
Copy link
Author

KrisCris commented Jun 5, 2020

Is this instantaneous? Or over time? I have an issue where the system stutters (audio + video) after being powered on for more than a day.

Yes, it happens instantaneously.

I have also experienced similar problems you described, and I found this happens immediately when I launch some games like Minecraft, which I believe should not be that resource-demanding...

@osy
Copy link
Owner

osy commented Jun 16, 2020

I am able to get the video to play correctly using AMD Codec (be sure to also check reset boot-args when switching codec).

@KrisCris
Copy link
Author

Thanks! I will have it a try and feedback here.

Btw, can I use this driver update with Intel codec? Cuz I really want the sidecar working.

@osy
Copy link
Owner

osy commented Jun 17, 2020

I think the problem is in the Intel encoder. Does sidecar not work for AMD codec? I haven’t tested it but maybe it works in the new drivers?

@KrisCris
Copy link
Author

KrisCris commented Jun 17, 2020

Tested, and it works.

Does sidecar not work for AMD codec? I haven’t tested it but maybe it works in the new drivers?

It's not working with AMD codec, and it only shows a black screen.
It seems all the Mac supporting sidecar either with an iGPU or the T2 chip. Some people have made it work with AMD cards by adding shiki-id and shikigva to the boot-args... I tried that before, but it looks terrible, the image is heavily compressed.

@Good0007
Copy link

Describe the bug
4K video playback stutters, lots of frame drops.

  • Quicktime player: Unable to play.
  • IINA: Delays observed.
  • VLC: "h264 4k 120-stutter.mp4" unable to play, "h265 4k 60-stutter.mp4" no much problem.

I think it's some configuration problems...

  • I can play these two videos in Windows without any problems.
  • A MBP 13 plays these smoothly.
  • And a Hackintosh build with AMD 2700x CPU and Radeon Vega II GPU can correctly hardware decode these videos OOB.

Video links:https://1drv.ms/u/s!Aj4tLSaqxvfdwjASwip9MKVr3I2o?e=sY6t90
password: hacmini
(just some random videos for testing...)

Expected behavior
Should decoding correctly and playing smoothly.

Configuration

  • HaC Mini version : 2.7
  • OSX version : 10.15.4
  • NUC model : HVK
  • Display port(s) used : MINIDP, USB-C
  • Display resolution(s) : 2K, 4K

Modifications
I tried the both AMD codec and Intel codec of the HacMini Installer, nothing changed.
It only plays these videos smoothly when HW acc is not available...(Using software decoding).

(Later, I changed my PlatformInfo to iMac18,3, which is nothing to do with this problem tho.
Btw, I saw you have talked about the iMac18,3 and USB-C DP in some Issues, but I've tested and it works fine. Would you like to consider making the iMac18,3 option available in the installer?)

I think the problem is in the Intel encoder. Does sidecar not work for AMD codec? I haven’t tested it but maybe it works in the new drivers?

The reason seems to be that the maximum frequency of HD630 is only 0.5Ghz. I tried to use the boot-args parameter 'igfxfw=2' to load AppleGuC but it didn't work.
test video : jellyfish-400-mbps-4k-uhd-hevc-10bit.mkv

@osy
Copy link
Owner

osy commented Jun 19, 2020

The reason seems to be that the maximum frequency of HD630 is only 0.5Ghz

Ah, good point. I’ve seen this as well.

Btw I’ve tried loading GuC before and this is as far as I’ve gotten acidanthera/bugtracker#586 (comment)

Does igfxfw=1 do anything? EDIT: It crashes due to fw not loading.

@osy
Copy link
Owner

osy commented Jun 26, 2020

Reopening pending proper fix in acidanthera/WhateverGreen#47

@osy osy reopened this Jun 26, 2020
@osy osy closed this as completed in #308 Aug 21, 2020
@13months
Copy link

I Used Hacmini2.11,and it is Splash screen(Screen flash) on my LG 4K Display.

I have to use Intel Codec(form Hacmini2.10) to fix it. Reboot and use The QuickTime Fix,It is ok now.

HaC Mini version : 2.11
OSX version : 10.15.6
NUC model : NUC8i7HVK
Display port(s) used : MINIDP
Display resolution(s) : 2K+4K

@osy
Copy link
Owner

osy commented Aug 22, 2020

You don’t need QuickTime fix on 2.11

@13months
Copy link

You don’t need QuickTime fix on 2.11

but when I setup Hacmini2.11,boot and come in 10.15.6,the screen flash and flash agian,i can not to use.

but put com.apple.AppleGVA to the Library
and QuickTime Fix

Reboot again.

The screen is not flash. It is fine

@osy
Copy link
Owner

osy commented Aug 22, 2020

I don’t think that’s related. You need to install the screen flicking workaround. QuickTime Fix only affects video playback. The flickering problem is a macos issue.

@13months
Copy link

I don’t think that’s related. You need to install the screen flicking workaround. QuickTime Fix only affects video playback. The flickering problem is a macos issue.

But I do not know the reason.i use the Quicktime fix,it never flick again.

May I ask how to install the screen flicking workaround?

@osy
Copy link
Owner

osy commented Aug 23, 2020

It’s an option in the hac mini installer. QuickTime fix does nothing on latest release and has been released.

@13months
Copy link

Since the last setting,
No problem for daily use,

But every time the system sleeps or wakes up from hibernation,
The 4k screen starts to flicker,

Is there a way to fix it? ? ?

Flash Screen 2020-08-24 23_35_03

@osy
Copy link
Owner

osy commented Aug 24, 2020

I see then it seems like the problem is still not fixed :(

I’ll port the workaround.

@KrisCris
Copy link
Author

I see then it seems like the problem is still not fixed :(

You said it seems to be fixed in Big Sur while he's running Catalina.

@osy
Copy link
Owner

osy commented Aug 24, 2020

Oh in that case, are you sure it’s installed properly? Can you see if there’s a file called SLForceFPS in /usr/local/bin ?

@13months
Copy link

Oh in that case, are you sure it’s installed properly? Can you see if there’s a file called SLForceFPS in /usr/local/bin ?

No,it is not here.

But I log off my account again or restart the computer,
Re-enter the system, the 4k screen will not flash.

Excuse me, see if I can solve this problem,

Thank you very much for your labor.

截屏2020-08-24 23 56 26

Flash Screen 2020-08-24 23_35_03

@osy
Copy link
Owner

osy commented Aug 24, 2020

Then you didn’t install the workaround. Maybe a Chinese user can help you figure it out.

@KrisCris
Copy link
Author

@13months Customize -> Workarounds -> check Reduce screen flickering

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
graphics Graphics/GPU issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants