mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-24 07:30:57 +01:00
[Issue]: Jellyfin never transcodes to HEVC #4701
Labels
No labels
area:database
awaiting-feedback
backend
blocked
breaking change: web api
bug
build
ci
confirmed
discussion needed
dotnet future
downstream
duplicate
EFjellyfin.db
enhancement
feature
future
github-actions
good first issue
hdr
help wanted
invalid
investigation
librarydb
live-tv
lyrics
media playback
music
needs testing
nuget
performance
platform
pull-request
question
regression
release critical
requires-web
roadmap
security
security
stale
support
syncplay
ui & ux
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: starred/jellyfin#4701
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @njmdietrich on GitHub (Mar 8, 2023).
Please describe your bug
Since I am limited by internet bandwidth, I think transcoding to HEVC should give a better quality than transcoding to h264, assuming the client supports it. I have enabled encoding in HEVC and the Intel Low-Power HEVC hardware encoder.
However, Jellyfin only ever transcodes to h264. I tried both QuickSync and VAAPI for hardware acceleration. My CPU is a 12100 so HEVC encoding is supported with QuickSync. Direct play works fine with HEVC content on the client, so I don't understand why it doesn't transcode to HEVC.
Jellyfin Version
other
if other:
10.8.9
Environment
Jellyfin logs
No response
FFmpeg logs
Please attach any browser or client logs here
No response
Please attach any screenshots here
No response
Code of Conduct
@Gee1111 commented on GitHub (Mar 10, 2023):
ya this is annoying i also mentioned it few months ago
@nijave commented on GitHub (Mar 11, 2023):
I think this depends on the client. It works with the latest Roku app (the client provides a list of supported codecs to the server and the server, afaik, just picks the first one in the list)
@Ge082 commented on GitHub (Mar 12, 2023):
It depends on clients, Jellyfin Media Player for PC does HEVC to HEVC
@nijave commented on GitHub (Mar 12, 2023):
I looked closer at the video details, I wonder if you're hitting the same problem I hit here https://github.com/jellyfin/jellyfin/issues/8743
tldr;
Something triggers a transcode (audio codec, audio channels, bit rate, subtitles, literally anything). Transcode logic hits an HDR condition block that disables using the original video stream (even if it didn't need transcoding). Video transcoding logic picks the first video codec supplied by the client (for Roku, it was h264 but got patched to prefer h265/hevc). Server transcodes video to first codec (potentially h264) even if it didn't need to.
The conditions are:
I tried Jellyfin Media Player (I think 1.8.1) on Linux and see this (from Jellyfin server logs):
It's a 4K HEVC/HDR video where direct play failed so it triggered a transcode. I see
VideoCodec=h264...first in the list so maybe same issue I was having with Roku client@njmdietrich commented on GitHub (Mar 12, 2023):
In this case I am forcing a transcode because my internet is too slow for the original bitrate. I would just want it to prefer HEVC over h264, because presumably that should give better quality at the same bitrate.
h264 is seemingly preferred over HEVC when transcoding for Jellyfin Media Player for Linux, the Kodi plugin, Chromium, and the Android TV client.
@nijave commented on GitHub (Mar 12, 2023):
Maybe this is relevant? https://github.com/jellyfin/jellyfin-media-player/issues/319
Seems like the current JMP doesn't have an HEVC option but the next version will have one that's off by default.
Edit: Actually the option was added to
masterbranch just 6 hours ago43e068c5f7 (diff-d64c8c7d804ff56ed11130800d6f672ef2f38ae9b26d05254fd3ba75b2a0680eR184). I'm not sure how they do releases but maybe that will land in the next JMP release.@njmdietrich commented on GitHub (Mar 12, 2023):
Okay, that explains JMP. Since in the same issue it mentions that transcoding to HEVC works for the Kodi plugin, I am guessing the issue might be with the server. I will double check that hardware encoding to HEVC is actually working there (in theory it should as it is supported on my (i)GPU)
EDIT: just checked and HEVC transcoding works fine in the jellyfin docker container using jellyfin's ffmpeg.
EDIT2: I had to change the settings in Kodi to prefer transcoding to HEVC. It is now actually transcoding to HEVC for that client. So I suppose this is not an issue with the server, but with the specific clients' order of codecs. Will close this issue and open issues for the clients that don't have an option for transcoding codec preference.