jellyfin / jellyfin-webos

WebOS Client for Jellyfin
https://jellyfin.org
Mozilla Public License 2.0
623 stars 60 forks source link

This client isn't compatible with the media and the server isn't sending a compatible media format #166

Open Litarvan opened 11 months ago

Litarvan commented 11 months ago

I am using an old LG TV (55EC930V) with webOS 1.4. I managed to make everything work (though it was pretty hard) but I'm stuck at video playback.

Though I have transcoding enabled (which works well on a regular PC using a browser), when trying to play any media (x246, HEVC, ...) on my TV using the webOS application, it tries out for a moment then tells me that this client isn't compatible with the media.

Client-side logs show that several media are tried without success:

...
Requesting url without automatic networking: https://.../Items/7c34c915ee53066551d051b70acbff5f/PlaybackInfo?UserId=ca12f604961645ac9bb3e4e4eb51d21b&StartTimeTicks=0&IsPlayback=true&AutoOpenLiveStream=true&AudioStreamIndex=1&SubtitleStreamIndex=3&MediaSourceId=7c34c915ee53066551d051b70acbff5f&MaxStreamingBitrate=140000000
playing url: https://.../videos/7c34c915-ee53-0665-51d0-51b70acbff5f/master.m3u8?DeviceId=...&MediaSourceId=7c34c915ee53066551d051b70acbff5f&VideoCodec=h264,hevc,hevc&AudioCodec=ac3&AudioStreamIndex=1&VideoBitrate=139360000&AudioBitrate=640000&AudioSampleRate=48000&MaxFramerate=23.976025&PlaySessionId=1227012e47934449adbf28e424b42f09&api_key=...&TranscodingMaxAudioChannels=6&RequireAvc=false&Tag=52549855dcaa59d541c58a35446717c6&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=False&hevc-level=153&hevc-videobitdepth=10&hevc-profile=main10&hevc-audiochannels=5&hevc-rangetype=SDR,HDR10,HLG,DOVI&TranscodeReasons=VideoCodecNotSupported
Active player: {"name":"Html Video Player","id":"htmlvideoplayer","playerName":"Html Video Player","playableMediaTypes":[false,true,false,false],"isLocalPlayer":true,"supportedCommands":["GoHome","GoToSettings","VolumeUp","VolumeDown","Mute","Unmute","ToggleMute","SetVolume","SetAudioStreamIndex","SetSubtitleStreamIndex","SetMaxStreamingBitrate","DisplayContent","GoToSearch","DisplayMessage","SetRepeatMode","SetShuffleQueue","PlayMediaSource","PlayTrailers","AirPlay","SetBrightness","SetAspectRatio","PlaybackRate"]} 
SyncPlay WrapperFactory getWrapper: htmlvideoplayer
Requesting url without automatic networking: https://.../Sessions/Playing
Requesting url without automatic networking: https://.../Sessions/Playing/Progress
media element error: 4
playbackmanager playback error type: medianotsupported
Requesting url without automatic networking: https://.../Items/7c34c915ee53066551d051b70acbff5f/PlaybackInfo?UserId=ca12f604961645ac9bb3e4e4eb51d21b&StartTimeTicks=0&IsPlayback=true&AutoOpenLiveStream=true&AudioStreamIndex=1&SubtitleStreamIndex=3&EnableDirectPlay=false&EnableDirectStream=false&AllowVideoStreamCopy=false&MediaSourceId=7c34c915ee53066551d051b70acbff5f&MaxStreamingBitrate=140000000
Requesting url without automatic networking: https://.../Videos/ActiveEncodings?deviceId=...&PlaySessionId=1227012e47934449adbf28e424b42f09
playing url: https://.../videos/7c34c915-ee53-0665-51d0-51b70acbff5f/master.m3u8?DeviceId=...&MediaSourceId=7c34c915ee53066551d051b70acbff5f&VideoCodec=h264,hevc,hevc&AudioCodec=ac3&AudioStreamIndex=1&VideoBitrate=139360000&AudioBitrate=640000&AudioSampleRate=48000&MaxFramerate=23.976025&PlaySessionId=0de6a908ddf94b43abb9cefd6c0e5ef2&api_key=....&TranscodingMaxAudioChannels=6&RequireAvc=false&Tag=52549855dcaa59d541c58a35446717c6&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=False&hevc-level=153&hevc-videobitdepth=10&hevc-profile=main10&hevc-audiochannels=5&hevc-rangetype=SDR,HDR10,HLG,DOVI&TranscodeReasons=VideoCodecNotSupported&allowVideoStreamCopy=false
Requesting url without automatic networking: https://.../Videos/ActiveEncodings?deviceId=...&PlaySessionId=1227012e47934449adbf28e424b42f09
Requesting url without automatic networking: https://.../Sessions/Playing/Progress 
Requesting url without automatic networking: https://.../Sessions/Playing/Progress 
media element error: 4
playbackmanager playback error type: medianotsupported 
Requesting url without automatic networking: https://.../Items/7c34c915ee53066551d051b70acbff5f/PlaybackInfo?UserId=ca12f604961645ac9bb3e4e4eb51d21b&StartTimeTicks=0&IsPlayback=true&AutoOpenLiveStream=true&AudioStreamIndex=1&SubtitleStreamIndex=3&EnableDirectPlay=false&EnableDirectStream=false&AllowVideoStreamCopy=false&AllowAudioStreamCopy=false&MediaSourceId=7c34c915ee53066551d051b70acbff5f&MaxStreamingBitrate=140000000
Requesting url without automatic networking: https://.../Videos/ActiveEncodings?deviceId=...&PlaySessionId=0de6a908ddf94b43abb9cefd6c0e5ef2
playing url: https://.../videos/7c34c915-ee53-0665-51d0-51b70acbff5f/master.m3u8?DeviceId=...&MediaSourceId=7c34c915ee53066551d051b70acbff5f&VideoCodec=h264,hevc,hevc&AudioCodec=ac3&AudioStreamIndex=1&VideoBitrate=139360000&AudioBitrate=640000&AudioSampleRate=48000&MaxFramerate=23.976025&PlaySessionId=e28093bc34984d1e84edc45a83ca10db&api_key=...&TranscodingMaxAudioChannels=6&RequireAvc=false&Tag=52549855dcaa59d541c58a35446717c6&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=False&hevc-level=153&hevc-videobitdepth=10&hevc-profile=main10&hevc-audiochannels=5&hevc-rangetype=SDR,HDR10,HLG,DOVI&TranscodeReasons=VideoCodecNotSupported&allowVideoStreamCopy=false&allowAudioStreamCopy=false
Requesting url without automatic networking: https://.../Videos/ActiveEncodings?deviceId=...&PlaySessionId=0de6a908ddf94b43abb9cefd6c0e5ef2
Requesting url without automatic networking: ...
media element error: 4  
playbackmanager playback error type: medianotsupported 
Requesting url without automatic networking: https://.../Sessions/Playing/Stopped

And for the server-side ones:

[17:04:12] [INF] [113] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for tv. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[17:04:12] [INF] [113] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile=Anonymous Profile, Path=/data/movies/Shutter Island (2010)/Shutter Island (2010) Bluray-2160p.mkv, AudioStreamIndex=1, SubtitleStreamIndex=3 ) => ( PlayMethod=Transcode, TranscodeReason=VideoCodecNotSupported ) media:/videos/7c34c915-ee53-0665-51d0-51b70acbff5f/master.m3u8?MediaSourceId=7c34c915ee53066551d051b70acbff5f&VideoCodec=h264,hevc,hevc&AudioCodec=ac3&AudioStreamIndex=1&VideoBitrate=139360000&AudioBitrate=640000&AudioSampleRate=48000&MaxFramerate=23.976025&api_key=<token>&TranscodingMaxAudioChannels=6&RequireAvc=false&Tag=52549855dcaa59d541c58a35446717c6&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=False&hevc-level=153&hevc-videobitdepth=10&hevc-profile=main10&hevc-audiochannels=5&hevc-rangetype=SDR,HDR10,HLG,DOVI&TranscodeReasons=VideoCodecNotSupported
[17:04:37] [INF] [129] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for tv. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[17:04:37] [INF] [129] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile=Anonymous Profile, Path=/data/movies/Shutter Island (2010)/Shutter Island (2010) Bluray-2160p.mkv, AudioStreamIndex=1, SubtitleStreamIndex=3 ) => ( PlayMethod=Transcode, TranscodeReason=VideoCodecNotSupported ) media:/videos/7c34c915-ee53-0665-51d0-51b70acbff5f/master.m3u8?MediaSourceId=7c34c915ee53066551d051b70acbff5f&VideoCodec=h264,hevc,hevc&AudioCodec=ac3&AudioStreamIndex=1&VideoBitrate=139360000&AudioBitrate=640000&AudioSampleRate=48000&MaxFramerate=23.976025&api_key=<token>&TranscodingMaxAudioChannels=6&RequireAvc=false&Tag=52549855dcaa59d541c58a35446717c6&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=False&hevc-level=153&hevc-videobitdepth=10&hevc-profile=main10&hevc-audiochannels=5&hevc-rangetype=SDR,HDR10,HLG,DOVI&TranscodeReasons=VideoCodecNotSupported
[17:04:59] [INF] [249] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for tv. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[17:04:59] [INF] [249] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile=Anonymous Profile, Path=/data/movies/Shutter Island (2010)/Shutter Island (2010) Bluray-2160p.mkv, AudioStreamIndex=1, SubtitleStreamIndex=3 ) => ( PlayMethod=Transcode, TranscodeReason=VideoCodecNotSupported ) media:/videos/7c34c915-ee53-0665-51d0-51b70acbff5f/master.m3u8?MediaSourceId=7c34c915ee53066551d051b70acbff5f&VideoCodec=h264,hevc,hevc&AudioCodec=ac3&AudioStreamIndex=1&VideoBitrate=139360000&AudioBitrate=640000&AudioSampleRate=48000&MaxFramerate=23.976025&api_key=<token>&TranscodingMaxAudioChannels=6&RequireAvc=false&Tag=52549855dcaa59d541c58a35446717c6&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=False&hevc-level=153&hevc-videobitdepth=10&hevc-profile=main10&hevc-audiochannels=5&hevc-rangetype=SDR,HDR10,HLG,DOVI&TranscodeReasons=VideoCodecNotSupported
[17:05:22] [INF] [285] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app Jellyfin Web 10.8.10 playing Shutter Island. Stopped at 0 ms
dmitrylyzo commented 11 months ago

Please post the ffmpeg log. The first one. The 2nd and 3rd are retries with forced transcoding.

Side note. I sanitized the api_key in your post, but can't delete the original one. Logging out will probably invalidate it.

Litarvan commented 11 months ago

Thanks for the API key, I revoked it. Jellyfin doesn't seam to produce FFMPEG logs in this specific case, I only see logs from when I tried on my PC and it worked, but not for my tries on my TV. I checked both in the dashboard "logs" section and in the container logs.

dmitrylyzo commented 11 months ago

Jellyfin doesn't seam to produce FFMPEG logs in this specific case

😕 Reverse proxy? Could you try connecting the server directly (by IP:port + http) to bypass it?

Litarvan commented 11 months ago

Wow you are right, it works. Didn't think such an error could have anything to do with NGINX, I guess it fails to stream the media properly? Though I don't get why it only happens with my TV...

Thanks a lot, I'll try to debug my NGINX config. By any chance, do you have any idea where I should look at?

dmitrylyzo commented 11 months ago

Here it was caching of wrong MIME type.

Litarvan commented 11 months ago

After hours of struggling I found out that even without NGINX, direct play was working but not transcoding. When I try to play HEVC, it produces the same error. It's a bit strange, sometimes I managed to see the first seconds of the video playing properly but then it stops and displays the error. Sometimes it just black screen when I try to play it but if I try to forward or anything it displays the error too.

I tried on my main instance without NGINX (using Ngrok TCP proxy), but I also tried to launch a fresh Jellyfin instance on my laptop with Docker and accessing it locally and it did the same.

If it helps, here are the server logs of my local reproduction : https://code.litarvan.com/acipayug.yaml ; [12:57:40] is the moment I tried fowarding since it was just stuck on a black screen. The client logs are here : https://code.litarvan.com/iqisaxiv.sql . Again, it works seamlessly from my computer, these issues are only on webOS :/

I'm starting to think it's just not possible to make this work under webOS 1

Litarvan commented 11 months ago

And also, here are all the FFMPEG logs produced :

whoamiUNIX commented 10 months ago

I'm facing the same issue as above. Behavior are the same. It only occur if jellyfin is behind proxy. Direct ip:port did not cause this issue. I found that issue occur only for mkv formats on Android device.

mannes commented 19 hours ago

Had the same issue, interface worked well, no video playback when using reverse proxy. Using haproxy as reverse proxy. I solved it by allowing TLS 1.2 (instead of at least 1.3). Works with mozilla ssl's intermediate profile. Solution probably applicable to other proxies too. Make sure TLS 1.2 is enabled