jellyfin / jellyfin-roku

The Official Roku Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
438 stars 133 forks source link

roku does not transcode #670

Closed aeg1990 closed 2 years ago

aeg1990 commented 2 years ago

Describe the bug

Attempts to direct play video instead of transcode. It does not start any sort of playback. I get An error was encountered while playing.

To Reproduce

  1. login to account with remote access
  2. play hevc movie
  3. error occurs

Expected behavior

Transcode due to remote connection

Logs

[2022-06-25 03:46:22.856 +00:00] [INF] [14] Jellyfin.Server.Implementations.Users.UserManager: Authentication request for "joan" has succeeded.
[2022-06-25 03:46:22.857 +00:00] [INF] [14] Emby.Server.Implementations.Session.SessionManager: Current/Max sessions for user "joan": 1/0
[2022-06-25 03:46:22.858 +00:00] [INF] [14] Emby.Server.Implementations.Session.SessionManager: Creating new access token for user 901a218d-10ab-44e6-b026-3041eafb0297
[2022-06-25 03:46:42.145 +00:00] [INF] [164] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "joan". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2022-06-25 03:46:42.145 +00:00] [INF] [164] Jellyfin.Api.Helpers.MediaInfoHelper: RemoteClientBitrateLimit: 4000000, RemoteIp: "0.0.0.0", IsInLocalNetwork: False
[2022-06-25 03:46:42.146 +00:00] [INF] [164] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="Anonymous Profile", Path="/media2/movies/300 (2006)/300 (2006).mkv", AudioStreamIndex=2, SubtitleStreamIndex=-1 ) => ( PlayMethod=Transcode, TranscodeReason=ContainerBitrateExceedsLimit ) "media:/videos/7e1274b8-5614-d443-d2a7-d7d25ce27d0d/master.m3u8?MediaSourceId=7e1274b85614d443d2a7d7d25ce27d0d&VideoCodec=h264,h265,hevc,hevc&AudioCodec=ac3&AudioStreamIndex=2&VideoBitrate=3552000&AudioBitrate=448000&AudioSampleRate=48000&MaxFramerate=23.976025&api_key=<token>&SubtitleMethod=Encode&TranscodingMaxAudioChannels=6&RequireAvc=false&Tag=91abfd2a23884b8c589c99ad218380bf&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&hevc-level=153&hevc-profile=main10&hevc-audiochannels=6&h264-profile=high,main,baseline,constrainedbaseline&h264-level=51&aac-audiochannels=6&TranscodeReasons=ContainerBitrateExceedsLimit"
[2022-06-25 03:46:43.780 +00:00] [INF] [67] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app "Jellyfin Roku" "1.4.12" playing "300". Stopped at "0" ms
[2022-06-25 03:46:48.940 +00:00] [INF] [25] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "joan". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2022-06-25 03:46:48.940 +00:00] [INF] [25] Jellyfin.Api.Helpers.MediaInfoHelper: RemoteClientBitrateLimit: 4000000, RemoteIp: "0.0.0.0", IsInLocalNetwork: False
[2022-06-25 03:46:48.940 +00:00] [INF] [25] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="Anonymous Profile", Path="/media2/movies/300 (2006)/300 (2006).mkv", AudioStreamIndex=2, SubtitleStreamIndex=-1 ) => ( PlayMethod=Transcode, TranscodeReason=ContainerBitrateExceedsLimit ) "media:/videos/7e1274b8-5614-d443-d2a7-d7d25ce27d0d/master.m3u8?MediaSourceId=7e1274b85614d443d2a7d7d25ce27d0d&VideoCodec=h264,h265,hevc,hevc&AudioCodec=ac3&AudioStreamIndex=2&VideoBitrate=3552000&AudioBitrate=448000&AudioSampleRate=48000&MaxFramerate=23.976025&api_key=<token>&SubtitleMethod=Encode&TranscodingMaxAudioChannels=6&RequireAvc=false&Tag=91abfd2a23884b8c589c99ad218380bf&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&hevc-level=153&hevc-profile=main10&hevc-audiochannels=6&h264-profile=high,main,baseline,constrainedbaseline&h264-level=51&aac-audiochannels=6&TranscodeReasons=ContainerBitrateExceedsLimit"

Screenshots

Additional context It works on direct lan access, and other streaming methods other than roku. It however does not play remotely. Thus why I think it is trying to direct play instead of transcode. Direct plays on lan, remote no go just outputs the error. I am not sure if it is just not transcoding or what, because roku app doesn't feature custom bit rates. I have set bit rate via admin dashboard for user and overall server to no avail.

aeg1990 commented 2 years ago

So this is a interesting update. I can play hevc via direct play but not with transcoding. It refuses to transcode. I don't have any transcoding logs for the video I attempt to play. So, it works on other applications (for remote playback + transcoding) with the exception of roku apps.

funkybunch commented 2 years ago

Having the same issue. Transcoding is working on web, but the server doesn't even attempt to transcode when using the Roku app client. I had to enable MPEG-2 direct streaming in app settings to get live TV to work via HDHR.

whiteowl3 commented 2 years ago

app versions, server versions, please, everybody. we cannot put this puzzle together without that information.

funkybunch commented 2 years ago

I tested this with 2 server/client combinations.

Combination 1:

Combination 2:

Transcoding is failing on both with nothing logged to the server. Enabling MPEG-2 support gets live TV working, but bypasses transcoding entirely.

remus-selea commented 2 years ago

How was 10.8.x even released with this major bug? My entire media library is unplayable and previous versions are not even available for download anymore on the official servers. Hopefully @neilsb fix is merged soon.

Edit: Found the previous version for windows.

funkybunch commented 2 years ago

10.7.7 is still available for Docker. I'm considering downgrading until this is resolved, but I worry some of the database updates in 10.8 are one-way. Does anyone know off the top of their head if downgrading will cause database corruption issues?

https://hub.docker.com/layers/jellyfin/jellyfin/jellyfin/10.7.7/images/sha256-c168996ea200569de1cb7be180f63812533327c46aa620e119650ae9e215db07?context=explore

aeg1990 commented 2 years ago

app versions, server versions, please, everybody. we cannot put this puzzle together without that information.

Jellyfin server version 10.8.0 and 10.8.1 (VM not docker) Roku app version 1.4 build 12

funkybunch commented 2 years ago

Interesting discovery, updating Jellyfin server to 10.8.1 breaks the workaround to get Live TV working by enabling direct MPEG-2 streaming in the settings menu.

Reverting back to 10.8.0 gets it working again.

nijave commented 2 years ago

app versions, server versions, please, everybody. we cannot put this puzzle together without that information.

Jellyfin server version 10.8.0 and 10.8.1 (VM not docker) Roku app version 1.4 build 12

I downgraded mine and it seems to work fine although I didn't thoroughly test all the functionality

funkybunch commented 2 years ago

Updated to the build 14 hot fix and that has resolved the transcoding issue for me.

cewert commented 2 years ago

Fixed by #699