Jellyfin Forum
Inconsistent playback of 4k UHD across devices and apps - 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: Inconsistent playback of 4k UHD across devices and apps (/t-inconsistent-playback-of-4k-uhd-across-devices-and-apps)

Pages: 1 2


Inconsistent playback of 4k UHD across devices and apps - fuelraccoon12 - 2025-01-10

Having trouble playing back 4k UHD Blu-ray rip (MKV) of Friends across multiple devices. I mention the series as I believe the source files are pretty loaded with content (raw, 4k, HDR, 10-bit, etc). Tested specifically against a single file to minimize variables but seeing same behavior across the series. Some devices / apps playback clean while others are stuttering at predictable spots / intervals - 5 seconds, 7 seconds, 36 seconds, etc. Playback info when available usually shows dropped frames at those times. After collating my troubleshooting it appears anything 'Direct Streaming' is stuttering. What is that telling me? 

Since I don't know what all of my clients may be capable of, I'd like for my Jellyfin server to do the heavy lifting. Expectation is that any (most) devices / apps will be able to play media, whether it's native (raw) or transcoded server-side -- or get as close to that as possible. Happy to throw more resources at the server if needed, although I think I'm looking at incorrect (transcoding) settings. I don't want to go to each of my client devices and use unique settings or troubleshoot every app for the right setup.

My process is to use MakeMKV, first to backup the disc to SSD, then make MKV against the local file. I've re-ripped the file from the disc and have made an MKV from the local backup, straight from disc, and from the new rip. All have the same hash (mkvextract'd track from container) so source data is good / consistent.

Pertinent info / settings below. What am I missing or how should my expectations be reset?

Jellyfin Server Info:
Windows Install
Server version - 10.10.3
Web version - 10.10.3
Build version - 10.10.3

Windows 10 Pro 22H2 OS Build 19045.5247
CPU: AMD Ryzen 5 3600
RAM : 16gb
GPU: RTX 2060 Super 8GB VRAM
Jellyfin App, Cache, Metadata, Transcode Storage: Samsung 970 EVO Plus
Storage: MS Storage Spaces - 2 Way Mirror
2x WD Red Pro 6tb

NVIDIA Driver: 566.36
NVIDIA CUDA Driver: 12.7.33

Media Info:
Audio
Title: Surround 5.1 - English - DTS-HD MA - Default
Language: eng
Codec: DTS
AVC: No
Profile: DTS-HD MA
Layout: 5.1
Channels: 6 ch
Bitrate: 2368 kbps
Sample rate: 48000 Hz
Bit depth: 16 bit
Default: Yes
Forced: No
External: No

Video
Title: 4K HEVC Dolby Vision Profile 7.6 (HDR10)
Codec: HEVC
AVC: No
Profile: Main 10
Level: 153
Resolution: 3840x2160
Aspect ratio: 16:9
Anamorphic: No
Interlaced: No
Framerate: 23.976025
Bitrate: 45659 kbps
Bit depth: 10 bit
Video range: HDR
Video range type: HDR10
DV title: Dolby Vision Profile 7.6 (HDR10)
DV version major: 1
DV version minor: 0
DV profile: 7
DV level: 6
DV rpu preset flag: 1
DV el preset flag: 1
DV bl preset flag: 1
DV bl signal compatibility id: 6
Color space: bt2020nc
Color transfer: smpte2084
Color primaries: bt2020
Pixel format: yuv420p10le
Ref frames: 1

Devices / Apps Not Impacted
PC - Jellyfin Media Player - Direct Playing
PC - Firefox - Transcoding
iPhone 15 Pro - Swiftfin Player - Direct Playing
AppleTV 4k (A1842) - Infuse Pro - Direct Playing
AppleTV 4k (A2843) - Swiftfin - Direct Playing (Transcode server side log)
AppleTV 4k (A2843) - Infuse Pro - Direct Playing

Devices / Apps Impacted
PC - Brave - Direct Streaming
PC - Chrome - Direct Streaming
iPhone 15 Pro - Jellyfin Mobile (iOS) - Direct Streaming
iPhone 15 Pro - Jellyfin Mobile (iOS), Native Player - Direct Streaming
iPhone 15 Pro - Swiftfin Native Player - Direct streaming

Video Failure
AppleTV 4k (A1842) - Swiftfin - Direct Playing (Expected, 720p plasma)

These are all the same clients (PC, iPhone, AppleTV x2). Different apps, different experiences.


RE: Inconsistent playback of 4k UHD across devices and apps - TheDreadPirate - 2025-01-10

Can you try remuxing one of these files with this ffmpeg command?

Open a command prompt

Code:
cd C:\Program Files\Jellyfin
ffmpeg.exe -fflags +genpts+igndts -i "C:\path\to\video.mkv" -map 0 -codec copy -max_muxing_queue_size 2048 -max_interleave_delta 0 -avoid_negative_ts disabled newFile.mkv



RE: Inconsistent playback of 4k UHD across devices and apps - gnattu - 2025-01-10

If your friends are not on WAN which might have issues with such high bitrate files, did you put your transcode cache on a slow disk where it will suffer when huge IO writes?

Also, the server will update databases during the playback for status updating, which means the jellyfin database should be put on an SSD at best. Hanging in IO thread could also cause what you described.

Your symptoms mostly look like an IO hang to me and that is usually caused by too slow disks.


RE: Inconsistent playback of 4k UHD across devices and apps - fuelraccoon12 - 2025-01-10

(2025-01-10, 07:23 PM)TheDreadPirate Wrote: Can you try remuxing one of these files with this ffmpeg command?

Open a command prompt

Code:
cd C:\Program Files\Jellyfin
ffmpeg.exe -fflags +genpts+igndts -i "C:\path\to\video.mkv" -map 0 -codec copy -max_muxing_queue_size 2048 -max_interleave_delta 0 -avoid_negative_ts disabled newFile.mkv

Much appreciated. Ran that and reviewing the file now and will follow up. Can you tell me what we're doing with this?

(2025-01-10, 07:26 PM)gnattu Wrote: If your friends are not on WAN which might have issues with such high bitrate files, did you put your transcode cache on a slow disk where it will suffer when huge IO writes?

Also, the server will update databases during the playback for status updating, which means the jellyfin database should be put on an SSD at best. Hanging in IO thread could also cause what you described.

Your symptoms mostly look like an IO hang to me and that is usually caused by too slow disks.

Should have included that information in the original post. Everything is LAN local, wired connection. Jellyfin, database, and transcoding directories on SSD, Samsung 970 Evo Plus. The actual video track is on the aforementioned Storage Spaces array, spinning disks.

(2025-01-10, 07:23 PM)TheDreadPirate Wrote: Can you try remuxing one of these files with this ffmpeg command?

Open a command prompt

Code:
cd C:\Program Files\Jellyfin
ffmpeg.exe -fflags +genpts+igndts -i "C:\path\to\video.mkv" -map 0 -codec copy -max_muxing_queue_size 2048 -max_interleave_delta 0 -avoid_negative_ts disabled newFile.mkv

Same behavior on my PC, playing in Brave web browser, Direct Streaming. Stuttering at same spot. File size did change, increased about 2100 KB. Is this test enough or should I look at other playback?


RE: Inconsistent playback of 4k UHD across devices and apps - fuelraccoon12 - 2025-01-10

I've updated my original post to include SSD for app, metadata, cache, as well as noting that I'm getting different experiences on different apps on the same devices. Said another way, I've only run 1 iPhone 15 Pro, not 4, albeit with different apps or settings (players).

More things to follow up on. Log files linked below (Not of most recent test with genpts/igndts). I appreciate the help thus far. Thanks.

Brave Log - Impacted
https://pastebin.com/hhsmkkxD

Firefox Log - Not Impacted
https://pastebin.com/M6uBBNuL

Jellyfin iOS Log - Impacted
https://pastebin.com/cvQAVsm9

Jellyfin iOS - Native Player - Log
https://pastebin.com/ZKRT5Yri


RE: Inconsistent playback of 4k UHD across devices and apps - TheDreadPirate - 2025-01-10

Shouldn't all of these clients be requesting a full transcode for DV7.6


RE: Inconsistent playback of 4k UHD across devices and apps - fuelraccoon12 - 2025-01-10

I hadn't thought of that but from my limited knowledge that would make sense for most the devices. This is a new Jellyfin install and I'm brand new to hosting and serving my own video media. Any direction on next places to review or troubleshoot? Client settings?


RE: Inconsistent playback of 4k UHD across devices and apps - gnattu - 2025-01-10

From the log I suspect you are encountering an FFMpeg bug in the ffmpeg shipped with 10.10.3.

Can you try download this version instead and replace the ffmpeg in Jellyfin install folder?

https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v7.0.2-8/jellyfin-ffmpeg_7.0.2-8_portable_win64-clang-gpl.zip


RE: Inconsistent playback of 4k UHD across devices and apps - fuelraccoon12 - 2025-01-10

(2025-01-10, 10:49 PM)gnattu Wrote: From the log I suspect you are encountering an FFMpeg bug in the ffmpeg shipped with 10.10.3.

Can you try download this version instead and replace the ffmpeg in Jellyfin install folder?

https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v7.0.2-8/jellyfin-ffmpeg_7.0.2-8_portable_win64-clang-gpl.zip

On it. Will report back. Thank you.


RE: Inconsistent playback of 4k UHD across devices and apps - gnattu - 2025-01-10

(2025-01-10, 09:58 PM)TheDreadPirate Wrote: Shouldn't all of these clients be requesting a full transcode for DV7.6

No. The current server treat them as HDR10 files and will remux for all clients claiming HDR10 support. This is going to be changed in future version with more precise metadata handling.