Jellyfin Forum
H.264 and H.265 unwatchable in browser and Jellyfin Media Player on my Mac - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: H.264 and H.265 unwatchable in browser and Jellyfin Media Player on my Mac (/t-h-264-and-h-265-unwatchable-in-browser-and-jellyfin-media-player-on-my-mac)

Pages: 1 2


RE: H.264 and H.265 unwatchable in browser and Jellyfin Media Player on my Mac - dekomoon - 2023-07-13

(2023-07-13, 03:13 PM)TheDreadPirate Wrote: It sounds like something with the M1's decoder since it played back fine on the 3060.  I'm assuming "flawlessly" also meant the quality was good in addition to it playing smoothly.  I've heard mixed things about video quality from the M1.

Jellyfin Media Player is using my CPU to decode whether it is a AVC, HEVC or AV1 video (also Videotoolkit does not support AV1 hardware decoding, only AVC and HEVC).

I tested one of my HEVC videos on my Mac's MPV with --hwdec flag (to enable hardware decoding) and it worked flawlessly. Quality was good and most importantly, there was no stutter or lag. it played smoothly. The same HEVC video stuttered and lagged on the Jellyfin Media Player.


(2023-07-13, 03:13 PM)TheDreadPirate Wrote: In Windows, the task manager (or HWInfo64) breaks down what parts of the GPU are being used.  3D, encode, decode, etc.  Does MacOS has an equivalent?  I'm curious if it is decoding in software and not hardware.  If it is decoding in software, that would be an appropriate issue to submit to the server git since the web UI is part of the server code.

The web version is smooth when my Mac decode AVC so I am assuming it is using Videotoolkit hardware decoder. Only major problem is that the color is flushed out for 10-bit videos (plus quality sucks as it is only 35mpbs). It seems like there are problems with both client front-facing interfaces on M1 Macs...

I am not sure if such a software exists and would love to check it out if anyone knows of a software like that Smiling-face

(2023-07-13, 03:13 PM)TheDreadPirate Wrote: As for the version of ffmpeg.  Jellyfin does not use an old version, but there are newer versions that will be packaged with Jellyfin when 10.9.0 is released.  You can manually install the latest version and Jellyfin 10.8.10 should not care.  But since that is on the server side, and we already determined that is transcodes ok when you played content in Ubuntu, upgrading ffmpeg probably won't make a difference.  But it can't hurt to try.

My apologies. I meant the FFmpeg on the client-side, or the desktop application. Both MPV and Jellyfin Media Player have FFmpeg decoders (correct me if I am wrong). MPV is more up to date on AV1 decoder than Jellyfin Media Player so the performance difference is understandable. For an issue like this, I will have to probably compile Jellyfin Media Player from source for the latest dav1d software decoder (assuming the desktop app have been updated for that already). The bigger problem is that not only does Jellyfin Media Player not use my GPU, it also doesn't take advantage of my CPU either. It seems to be single-threaded as it only ever uses 50% of a core (M1 has 8 cores) no matter if I am playing HEVC or AV1... so I am assuming this is the reason why Jellyfin Media Player always stutters and lags no matter what codec I use.

(edit: It could also be that the Jellyfin Media Player is using the GPU for decode, but just doing it poorly because it is super unoptimized. I am not sure if there is a way to check if the desktop app is using CPU or GPU, but MPV works well with either CPU or GPU)


RE: H.264 and H.265 unwatchable in browser and Jellyfin Media Player on my Mac - JellyJim - 2024-03-10

Hello there!
(copied from my answer in https://www.reddit.com/r/techsupport/comments/n548fs/screen_tearing_in_full_screen_in_chrome_with/)

I've been having this issue for 3 months (started november 2023) and it drove me MAD.

Note For the impatient: final solution is at the bottom, the rest is a list of all the things I tried which have helped other people before, so worth keeping in mind



My system uses:
- an AMD ryzen 5 3600
- Nvidia Geforce RTX2070
- Viewsonic VP3256-4K monitor
- 5m 8K Hdmi cable
(Note: you can also find your bios version by pressing win+R -> type "cmd" to open console-> type "systeminfo" + press enter )



I tried: (grouped as "Hardware", "windows", "nvidia", "chrome")

Hardware

- changing HDMI cables -> for long ones like 3M+ I recommend going for a "higher-end" 8K cable (mine was like 20£) and that solved a LOT of issues, but not specific to chrome.

- changing settings on the monitor to enable "adaptive sync" (helped a LOT with games, but not chrome issue).
for those without adaptive sync, try looking for options like "Low input lag" (set to "ON") and "response time" (set to "ultra fast" or whatever your quickest one is). the "tradeoff" is like a few exta watts (maybe 5-30 at most given modern monitors dont use much power anyway) but the user experience is worth it.
- changing to a spare monitor (jussst in case), issue persisted for me, so thats ruled out.

- turned off PC, opened the PC, made sure graphics card was still connected ok (4 years since i built it lol)



WINDOWS

- disabling HDR on windows display settings (which helped with other things)
- in start menu typed "systempropertiesadvanced" -> went to system properties -> "advanced" tab -> "performance" -> "Settings" -> disabled smooth scrolling



NVIDIA

NOTE: performing a "custom/advanced" install -> "perform clean installation" DID help once or twice, but
- updated nvidia drivers to latest "game ready" version
- updated nvidia drivers to latest "studio" version (which is just the "stable" version of the drivers, otherwise no difference)
- updated nvidia driers to "october 2023" ("before my issues") "studio" version (look here for legacy drivers: https://www.nvidia.com/download/find.aspx#)

- nvidia control panel -> "change resolution" -> "use NVIDIA colour settings" (this one DID help A LOT, but was not the "final fix")
- nvidia control panel -> Manage 3d settings -> Vertical sync: tried "on", "off", "adaptive" and "fast" (the latter I just left there as it was recommended in another reddit post)



CHROME
- changing hardware acceleration in Chrome settings (I dont recommend because it makes things like scrolling and UI interactios sluggish)
- excluding some web pages from the "performance -> memory saver" section in Chrome settings
- changing hardware decoding/encoding in chrome://flags
- disabling "live captions" in chrome://flags
- deleting browser history, cookies, cache in chrome (did nothing, leave as last resort if you are a hoarder like me)



All of which did NOT "solve" the issue per se, only some of them helped a bit.



For The "final" fix, while searching I stubled across the following:

https://www.youtube.com/watch?v=HXn7rhj3Sg8

https://www.reddit.com/r/chrome/comments/16e1mv2/to_anyone_experiencing_artifacting_only_in_chrome/



Basically (for nvidia cards at least, in other devices with intel/amd embedded graphics it wasnt so bad) you need to:

- go to chrome://flags- type "Choose ANGLE graphics backend" in the search bar- change from "default" to either "OpenGL" OR "D3D9" (the rest are the problematic ones)- restart chrome, hopefully it will be fixed!