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

Transcoding/conversion being forced, when it's not required (HDR and/or high bitrate) #1907

Open
Skin80 opened this issue Aug 9, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Skin80
Copy link

Skin80 commented Aug 9, 2024

Software Versions

  • Jellyfin Server Version: 10.10.0
  • Roku Client Version: 2.1.4

Describe the bug

https://github.com/jellyfin/jellyfin-roku/tree/master/source/utils/deviceCapabilities.bs forces a hardcoded bitrate limit of 40Mb/s on all video files (except h.264 codecs where the hard limit is 10Mb/s).

It also forces transcode/conversion of any file that is not "SDR" (i.e. HDR/HDR+/DoVi).

Whilst understandable from Roku, as they need to support their weakest products, it makes no sense for Jellyfin to hardcode those limitations into the app.

Jellyfin already has the ability to set a maximum bitrate by the user. Why not simply allow the Roku default to be overridden by the user?

As it stands, I have HDR video files with average bitrates of over 70mps that play on my Roku device.

However, all these files are being converted to a .ts stream, causing issues with correct recording of timestamps and resumption of video playback.

How To Reproduce

  1. Playback any video file with a video bit rate over 40mbps and/or HDR/HDR+/DoVi.

Expected behavior

Direct play/streaming of valid containers and formats, without the need for transcoding or conversion.

Logs

Relevant section of log for an HDR video file.

RemoteClientBitrateLimit: 250000000, RemoteIP: "192.168.1.207", IsInLocalNetwork: True
[2024-08-09 19:36:49.921 +01:00] [DBG] Profile: "Official Roku Client", Path: "/media/Seagate/Media/Video/Movies/5 - UHD/Out of Sight (1998) {imdb-tt0120780} - 2160p.mp4", isEligibleForDirectPlay: True, isEligibleForDirectStream: False
[2024-08-09 19:36:49.921 +01:00] [DBG] Profile: "VideoCodecProfile", DirectPlay=false. Reason="Official Roku Client".VideoRangeType Condition: EqualsAny. ConditionValue: "SDR". IsRequired: False. Path: "/media/Seagate/Media/Video/Movies/5 - UHD/Out of Sight (1998) {imdb-tt0120780} - 2160p.mp4"
[2024-08-09 19:36:49.922 +01:00] [DBG] DirectPlay Result for Profile: "Official Roku Client", Path: "/media/Seagate/Media/Video/Movies/5 - UHD/Out of Sight (1998) {imdb-tt0120780} - 2160p.mp4", PlayMethod: null, AudioStreamIndex: 1, SubtitleStreamIndex: 2, Reasons: VideoRangeTypeNotSupported
[2024-08-09 19:36:49.922 +01:00] [DBG] Transcode Result for Profile: "Official Roku Client", Path: "/media/Seagate/Media/Video/Movies/5 - UHD/Out of Sight (1998) {imdb-tt0120780} - 2160p.mp4", PlayMethod: Transcode, AudioStreamIndex: 1, SubtitleStreamIndex: 2, Reasons: VideoRangeTypeNotSupported
[2024-08-09 19:36:49.922 +01:00] [DBG] StreamBuilder.BuildVideoItem( Profile="Official Roku Client", Path="/media/Seagate/Media/Video/Movies/5 - UHD/Out of Sight (1998) {imdb-tt0120780} - 2160p.mp4", AudioStreamIndex=1, SubtitleStreamIndex=2 ) => ( PlayMethod=Transcode, TranscodeReason=VideoRangeTypeNotSupported ) "media:/videos/be33619c-8a7b-3842-0e61-6535b46da292/master.m3u8?MediaSourceId=be33619c8a7b38420e616535b46da292&VideoCodec=hevc,h264,h264,hevc&AudioCodec=aac&AudioStreamIndex=1&VideoBitrate=100000000&AudioBitrate=228677&AudioSampleRate=48000&MaxFramerate=24&api_key=&TranscodingMaxAudioChannels=8&RequireAvc=false&EnableAudioVbrEncoding=true&Tag=8e20dd0f8811466a4aa0aed6830adba7&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=False&hevc-level=150&hevc-videobitdepth=10&hevc-profile=main10&hevc-audiochannels=2&aac-profile=lc&hevc-rangetype=SDR&aac-audiochannels=6&TranscodeReasons=VideoRangeTypeNotSupported"

Relevant section of log for an HDR video file, with an average bit rate of 41.1Mb/s

[2024-08-09 17:24:58.860 +01:00] [DBG] Profile: "Official Roku Client", Path: "/media/Seagate/Media/Video/Movies/5 - UHD/Air Force One (1997) {imdb-tt0118571} - 2160p.mp4", isEligibleForDirectPlay: True, isEligibleForDirectStream: False
[2024-08-09 17:24:58.860 +01:00] [DBG] Profile: "VideoCodecProfile", DirectPlay=false. Reason="Official Roku Client".VideoRangeType Condition: EqualsAny. ConditionValue: "SDR". IsRequired: False. Path: "/media/Seagate/Media/Video/Movies/5 - UHD/Air Force One (1997) {imdb-tt0118571} - 2160p.mp4"
[2024-08-09 17:24:58.860 +01:00] [DBG] Profile: "VideoCodecProfile", DirectPlay=false. Reason="Official Roku Client".VideoBitrate Condition: LessThanEqual. ConditionValue: "40000000". IsRequired: True. Path: "/media/Seagate/Media/Video/Movies/5 - UHD/Air Force One (1997) {imdb-tt0118571} - 2160p.mp4"
[2024-08-09 17:24:58.861 +01:00] [DBG] DirectPlay Result for Profile: "Official Roku Client", Path: "/media/Seagate/Media/Video/Movies/5 - UHD/Air Force One (1997) {imdb-tt0118571} - 2160p.mp4", PlayMethod: null, AudioStreamIndex: 1, SubtitleStreamIndex: -2, Reasons: VideoBitrateNotSupported, VideoRangeTypeNotSupported
[2024-08-09 17:24:58.862 +01:00] [DBG] Transcode Result for Profile: "Official Roku Client", Path: "/media/Seagate/Media/Video/Movies/5 - UHD/Air Force One (1997) {imdb-tt0118571} - 2160p.mp4", PlayMethod: Transcode, AudioStreamIndex: 1, SubtitleStreamIndex: -2, Reasons: VideoBitrateNotSupported, VideoRangeTypeNotSupported
[2024-08-09 17:24:58.862 +01:00] [DBG] StreamBuilder.BuildVideoItem( Profile="Official Roku Client", Path="/media/Seagate/Media/Video/Movies/5 - UHD/Air Force One (1997) {imdb-tt0118571} - 2160p.mp4", AudioStreamIndex=1, SubtitleStreamIndex=-2 ) => ( PlayMethod=Transcode, TranscodeReason=VideoBitrateNotSupported, VideoRangeTypeNotSupported ) "media:/videos/540e520a-6bd1-f3e2-acac-d9dc77e30ed6/master.m3u8?MediaSourceId=540e520a6bd1f3e2acacd9dc77e30ed6&VideoCodec=hevc,h264,h264,hevc&AudioCodec=aac&AudioStreamIndex=1&SubtitleStreamIndex=-2&VideoBitrate=40000000&AudioBitrate=226796&AudioSampleRate=48000&MaxFramerate=23.976025&MaxWidth=3840&MaxHeight=2160&api_key=&SubtitleMethod=Encode&TranscodingMaxAudioChannels=8&RequireAvc=false&EnableAudioVbrEncoding=true&Tag=ef04e09a768838e1f8cbb68c40d6e6aa&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=False&hevc-level=150&hevc-videobitdepth=10&hevc-profile=main10&hevc-audiochannels=2&aac-profile=lc&hevc-rangetype=SDR&aac-audiochannels=6&TranscodeReasons=VideoBitrateNotSupported,%20VideoRangeTypeNotSupported"

Screenshots

Connection Information

Local server, over HTTP

Additional context

Why aren't device profiles open? I can edit DLNA profiles, but not the profiles of devices "officially" supported by the app, why?
The average user won't touch them, but making "advanced" users build their own version of the app in order to make simple profile adjustments is an odd choice.

@Skin80 Skin80 added the bug Something isn't working label Aug 9, 2024
@jimdogx
Copy link
Contributor

jimdogx commented Aug 9, 2024

Have you tried disabling the "Bitrate Limit" setting on the client? If I disable that setting, I'm able to play HDR videos (the TV shows the HDR logo at the start).

@cewert
Copy link
Member

cewert commented Sep 28, 2024

What if we automatically remove all bitrate limits if we detect the server is local? Looks like we have the data already m.global.session.server.localURL and m.global.session.server.url

edit: Jimi suggested we disable this feature by default and I agree.

@jimdogx
Copy link
Contributor

jimdogx commented Sep 28, 2024

I don't think we need to check for local vs remote server as the Bitrate limit setting can already be toggled on/off. Never heard back from @Skin80 on whether or not this worked for them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants