Closed bertmelis closed 2 weeks ago
Hmm, this is odd. It looks like it's trying to transcode to an output resolution of 3840x1604
even though you're on a non-4K Chromecast. I'm going to guess that either the client is sending down the wrong resolution or the server is reading the wrong resolution to transcode to.
Just to confirm, is this still an issue you're running into?
Yes, it's still actual. Can't play 4k with my Chromecast.
Don't het me wrong, maybe my config is wrong or something's wrong with my system. But I also just don't know where to start debugging because the logs don't show anything wrong. It just stops.
This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.
If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.
This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.
@bertmelis is this still reproducing for you?
I have the same problem, I use my android phone to cast to a non 4k chromecast but a normal one.
I setup on android 1080 as much as i can (maximum allowed video transcoding resolution, network, etc)
And the screen is black, after looking at FFmpeg log, i assume it's transcoding because the codec is h264 and not h265 as my source file but the output resolution is 4k
Stream #0:0: Video: h264 (H264 / 0x34363248), qsv(tv, bt709, progressive), 3840x1600 [SAR 1:1 DAR 12:5], q=2-31, 4944 kb/s, 23.98 fps, 1k tbn (default)
Experiencing a very similar issue. Playback on a Chromecast HD (non-4k) attempts to use several players, cancelling the transcode each time, before exiting playback altogether. It appears ffmpeg is trying to output the original 3840x2160
to the Chromecast in this case too.
Sorry for the excessive logs, I know some of it may be less relevant but I didn't want to risk excluding any important info.
Jellyfin seems to report that transcoding is terminated as playback has been stopped on the client - assuming this is because the ffmpeg output resolution is too high. videocodec
information is also missing from the transcodingprofile
in the available players' playback info, along with a lot of null
s and other empty definitions. Wonder if this is related to ffmpeg not receiving the correct resolution to transcode to?
Server System (please complete the following information):
OS: Docker on Ubuntu Server Jellyfin Version: 10.8.10 Hardware settings & device: QSV on i5-7500 (Intel HD Graphics 630) Reverse proxy: Nginx Proxy Manager in Docker
Client System (please complete the following information):
Chromecast with Google TV (HD) (GA03131)
Can confirm I'm experiencing in the same issue, transcoding is encoding to the file's native frame size instead of the one requested by the Chromecast.
I'm glad I was subscribed to this topic -- otherwise, I would've forgotten about this. Not a maintainer but this seems like a really annoying bug.
The logs from @pinkneonsign are incredibly helpful, specifically this line:
More specifically, the parts of interest, prettified here:
Notice how there's nothing that constrains the video frame size. This almost certainly looks like a bug in this file in the jellyfin/jellyfin-chromecast repo, which I'll have to take a look at later.
Only problem is, I don't have a Chromecast to test this on...
In light of this being opened on the Chromecast repo (https://github.com/jellyfin/jellyfin-androidtv/issues/3191), which is, I believe, the correct location for it, I am closing this issue on the server repo. Please see the issue in the Chromecast repo for further development and discussion.
As mentioned in the other issue, the Chromecast with Google TV devices natively support 4K video. In the case of the HD device, the device should handle downscaling.
Ref: https://developers.google.com/cast/docs/media#chromecast_with_google_tv
@thornbill you may want to re-open this issue since the other one has been closed.
Somehow this issue has ended up in the androidtv repo but it has nothing to do with androidtv.
The issue is still present.
Do not understand why it should be closed neither
I moved the issue because every comment I could see with an actual device name was referring to the app on the Chromecast with Google TV which is the Android TV app. I did not reopen it because those devices natively support video resolutions of 4K... see my comment above for the Chromecast documentation reference.
We are a lot facing this issue with normal chromecast (1, 2 and third generation) which are not 4k native but FullHd only. And I do not see in the documentation reference that the video should be downscaled by the device in this case (and it's not actually ...)
Ok I’ve now transferred this issue to the Chromecast repository and the other that had logs explicitly indicating it was a Chromecast with Google TV to the Android TV app repository.
Please remember to include exact device models when opening an issue. Google has made this rather difficult to track with the horribly confusing naming of the Chromecast with Google TV devices.
As you can see, DeviceProfile
isn't set at all: Name: null...
.
3th gen chromecast (HD)
Seems related with this issue: https://github.com/jellyfin/jellyfin-chromecast/issues/120
Adding my 2 cents here - having this issue with a Chromecast HD. (plugged in to a dumb TV) Android TV OS 12 Patch level Apr 1, 2024 Kernel version: 5.4.259-android12-9-g95db6f1dfeac Android TV OS build : STTE.240315.002
``` { "Protocol": 0, "Id": "9b2f44ffe92c55b6ccb6856ac1b0053c", "Path": "******-2160p.mkv", "EncoderPath": null, "EncoderProtocol": null, "Type": 0, "Container": "mkv", "Size": 7530207473, "Name": "******", "IsRemote": false, "ETag": "7239b7d24b95eb1bb23394434a6953e3", "RunTimeTicks": 94300270000, "ReadAtNativeFramerate": false, "IgnoreDts": false, "IgnoreIndex": false, "GenPtsInput": false, "SupportsTranscoding": true, "SupportsDirectStream": true, "SupportsDirectPlay": true, "IsInfiniteStream": false, "RequiresOpening": false, "OpenToken": null, "RequiresClosing": false, "LiveStreamId": null, "BufferMs": null, "RequiresLooping": false, "SupportsProbing": true, "VideoType": 0, "IsoType": null, "Video3DFormat": null, "MediaStreams": [ { "Codec": "hevc", "CodecTag": null, "Language": null, "ColorRange": null, "ColorSpace": "bt709", "ColorTransfer": "bt709", "ColorPrimaries": "bt709", "DvVersionMajor": null, "DvVersionMinor": null, "DvProfile": null, "DvLevel": null, "RpuPresentFlag": null, "ElPresentFlag": null, "BlPresentFlag": null, "DvBlSignalCompatibilityId": null, "Comment": null, "TimeBase": "1/1000", "CodecTimeBase": null, "Title": "", "VideoRange": 1, "VideoRangeType": 1, "VideoDoViTitle": null, "AudioSpatialFormat": 0, "LocalizedUndefined": null, "LocalizedDefault": null, "LocalizedForced": null, "LocalizedExternal": null, "LocalizedHearingImpaired": null, "DisplayTitle": "4K HEVC SDR", "NalLengthSize": null, "IsInterlaced": false, "IsAVC": false, "ChannelLayout": null, "BitRate": 6388280, "BitDepth": 10, "RefFrames": 1, "PacketLength": null, "Channels": null, "SampleRate": null, "IsDefault": true, "IsForced": false, "IsHearingImpaired": false, "Height": 1600, "Width": 3832, "AverageFrameRate": 23.976025, "RealFrameRate": 23.976025, "Profile": "Main 10", "Type": 1, "AspectRatio": "2.40:1", "Index": 0, "Score": null, "IsExternal": false, "DeliveryMethod": null, "DeliveryUrl": null, "IsExternalUrl": null, "IsTextSubtitleStream": false, "SupportsExternalStream": false, "Path": null, "PixelFormat": "yuv420p10le", "Level": 150, "IsAnamorphic": false }, { "Codec": "aac", "CodecTag": null, "Language": null, "ColorRange": null, "ColorSpace": null, "ColorTransfer": null, "ColorPrimaries": null, "DvVersionMajor": null, "DvVersionMinor": null, "DvProfile": null, "DvLevel": null, "RpuPresentFlag": null, "ElPresentFlag": null, "BlPresentFlag": null, "DvBlSignalCompatibilityId": null, "Comment": null, "TimeBase": "1/1000", "CodecTimeBase": null, "Title": "", "VideoRange": 0, "VideoRangeType": 0, "VideoDoViTitle": null, "AudioSpatialFormat": 0, "LocalizedUndefined": null, "LocalizedDefault": "Default", "LocalizedForced": null, "LocalizedExternal": "External", "LocalizedHearingImpaired": null, "DisplayTitle": "AAC - 5.1 - Default", "NalLengthSize": null, "IsInterlaced": false, "IsAVC": false, "ChannelLayout": "5.1", "BitRate": 320000, "BitDepth": null, "RefFrames": null, "PacketLength": null, "Channels": 6, "SampleRate": 48000, "IsDefault": true, "IsForced": false, "IsHearingImpaired": false, "Height": null, "Width": null, "AverageFrameRate": null, "RealFrameRate": null, "Profile": "LC", "Type": 0, "AspectRatio": null, "Index": 1, "Score": null, "IsExternal": false, "DeliveryMethod": null, "DeliveryUrl": null, "IsExternalUrl": null, "IsTextSubtitleStream": false, "SupportsExternalStream": false, "Path": null, "PixelFormat": null, "Level": 0, "IsAnamorphic": null }, { "Codec": "subrip", "CodecTag": null, "Language": "eng", "ColorRange": null, "ColorSpace": null, "ColorTransfer": null, "ColorPrimaries": null, "DvVersionMajor": null, "DvVersionMinor": null, "DvProfile": null, "DvLevel": null, "RpuPresentFlag": null, "ElPresentFlag": null, "BlPresentFlag": null, "DvBlSignalCompatibilityId": null, "Comment": null, "TimeBase": "1/1000", "CodecTimeBase": null, "Title": "", "VideoRange": 0, "VideoRangeType": 0, "VideoDoViTitle": null, "AudioSpatialFormat": 0, "LocalizedUndefined": "Undefined", "LocalizedDefault": "Default", "LocalizedForced": "Forced", "LocalizedExternal": "External", "LocalizedHearingImpaired": "Hearing Impaired", "DisplayTitle": "English - Default - SUBRIP", "NalLengthSize": null, "IsInterlaced": false, "IsAVC": false, "ChannelLayout": null, "BitRate": null, "BitDepth": null, "RefFrames": null, "PacketLength": null, "Channels": null, "SampleRate": null, "IsDefault": true, "IsForced": false, "IsHearingImpaired": false, "Height": 0, "Width": 0, "AverageFrameRate": null, "RealFrameRate": null, "Profile": null, "Type": 2, "AspectRatio": null, "Index": 2, "Score": null, "IsExternal": false, "DeliveryMethod": null, "DeliveryUrl": null, "IsExternalUrl": null, "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Path": null, "PixelFormat": null, "Level": 0, "IsAnamorphic": null }, { "Codec": "subrip", "CodecTag": null, "Language": "fre", "ColorRange": null, "ColorSpace": null, "ColorTransfer": null, "ColorPrimaries": null, "DvVersionMajor": null, "DvVersionMinor": null, "DvProfile": null, "DvLevel": null, "RpuPresentFlag": null, "ElPresentFlag": null, "BlPresentFlag": null, "DvBlSignalCompatibilityId": null, "Comment": null, "TimeBase": "1/1000", "CodecTimeBase": null, "Title": "French", "VideoRange": 0, "VideoRangeType": 0, "VideoDoViTitle": null, "AudioSpatialFormat": 0, "LocalizedUndefined": "Undefined", "LocalizedDefault": "Default", "LocalizedForced": "Forced", "LocalizedExternal": "External", "LocalizedHearingImpaired": "Hearing Impaired", "DisplayTitle": "French - SUBRIP", "NalLengthSize": null, "IsInterlaced": false, "IsAVC": false, "ChannelLayout": null, "BitRate": null, "BitDepth": null, "RefFrames": null, "PacketLength": null, "Channels": null, "SampleRate": null, "IsDefault": false, "IsForced": false, "IsHearingImpaired": false, "Height": 0, "Width": 0, "AverageFrameRate": null, "RealFrameRate": null, "Profile": null, "Type": 2, "AspectRatio": null, "Index": 3, "Score": null, "IsExternal": false, "DeliveryMethod": null, "DeliveryUrl": null, "IsExternalUrl": null, "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Path": null, "PixelFormat": null, "Level": 0, "IsAnamorphic": null } ], "MediaAttachments": [], "Formats": [], "Bitrate": 6708280, "Timestamp": null, "RequiredHttpHeaders": {}, "TranscodingUrl": null, "TranscodingSubProtocol": 0, "TranscodingContainer": null, "AnalyzeDurationMs": null, "DefaultAudioStreamIndex": null, "DefaultSubtitleStreamIndex": null } ```
``` [2024-08-14 18:50:07.340 -06:00] [INF] [25] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "home". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True [2024-08-14 18:50:08.584 -06:00] [INF] [25] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app "Android TV" "0.17.3" playing "******". Stopped at "0" ms [2024-08-14 18:50:15.565 -06:00] [INF] [40] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets. [2024-08-14 18:50:16.537 -06:00] [INF] [40] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "home". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True [2024-08-14 18:50:17.572 -06:00] [INF] [25] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app "Android TV" "0.17.3" playing "******". Stopped at "0" ms [2024-08-14 18:50:21.733 -06:00] [INF] [41] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "home". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True [2024-08-14 18:50:22.938 -06:00] [INF] [31] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app "Android TV" "0.17.3" playing "******". Stopped at "0" ms [2024-08-14 18:50:25.767 -06:00] [INF] [31] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "home". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True ```
``` [2024-08-14 18:50:28.889 -06:00] [INF] [39] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: "ffmpeg" "-analyzeduration 200M -probesize 1G -f matroska -noautorotate -i file:\"******-2160p.mkv\" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 libx264 -preset veryfast -crf 23 -maxrate 5170833 -bufsize 10341666 -x264opts:0 subme=0:me_range=4:rc_lookahead=10:me=dia:no_chroma_me:8x8dct=0:partitions=none -force_key_frames:0 \"expr:gte(t,n_forced*3)\" -sc_threshold:v:0 0 -vf \"setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(3840\,1604*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(3840/a\,1604))/2)*2,format=yuv420p\" -codec:a:0 libfdk_aac -ac 6 -ab 640000 -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type mpegts -start_number 0 -hls_segment_filename \"C:\ProgramData\Jellyfin\Server\cache\transcodes\c9535febcd57444da59fea0376e3efe2%d.ts\" -hls_playlist_type vod -hls_list_size 0 -y \"C:\ProgramData\Jellyfin\Server\cache\transcodes\c9535febcd57444da59fea0376e3efe2.m3u8\"" [2024-08-14 18:50:29.909 -06:00] [INF] [26] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app "Android TV" "0.17.3" playing "******". Stopped at "0" ms [2024-08-14 18:50:30.611 -06:00] [INF] [31] MediaBrowser.Controller.MediaEncoding.TranscodingJob: Stopping ffmpeg process with q command for "C:\ProgramData\Jellyfin\Server\cache\transcodes\c9535febcd57444da59fea0376e3efe2.m3u8" [2024-08-14 18:50:30.615 -06:00] [INF] [25] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "home". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True [2024-08-14 18:50:30.788 -06:00] [INF] [25] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: FFmpeg exited with code 0 [2024-08-14 18:50:30.788 -06:00] [INF] [31] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: Deleting partial stream file(s) "C:\ProgramData\Jellyfin\Server\cache\transcodes\c9535febcd57444da59fea0376e3efe2.m3u8" ```
``` [2024-08-14 18:50:34.480 -06:00] [INF] [35] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app "Android TV" "0.17.3" playing "******". Stopped at "0" ms [2024-08-14 18:51:39.566 -06:00] [INF] [17] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets. [2024-08-14 18:51:46.529 -06:00] [WRN] [25] Emby.Server.Implementations.HttpServer.WebSocketConnection: WS "10.0.0.99" error receiving data: "The remote party closed the WebSocket connection without completing the close handshake." [2024-08-14 18:51:46.548 -06:00] [INF] [25] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "10.0.0.99" closed [2024-08-14 18:52:02.231 -06:00] [INF] [35] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "home". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True ```
Just curious: are people here plugging a non-4K Chromecast into a 4K TV or screen?
Actually, https://github.com/jellyfin/jellyfin/pull/12499 might've fixed this issue.
Just curious: are people here plugging a non-4K Chromecast into a 4K TV or screen?
I'll keep an eye out to see if it's changed, but no, definitely a 1080p TV (Samsung un43n5300)
That would be great!
I see it's included in the latest release so it's straighforward to try it out. I will see if I can test it this evening, on an old HD television with an HD chromecast.
Actually, jellyfin/jellyfin#12499 might've fixed this issue.
I tested and it now works!
Playback of a 2160p movie doesn't work on Chromecast. It works for my laptop for examples, where to file is also transcoded. It starts transcoding but never writes the temporary file so nothing can be served to the client.
The screen stays black and after a while, it returns to the Jellyfin main waiting screen.
When transcoding a file that works, somewhere in the transcode log there is a line like this:
For -amongst others- this file, nothing is written.
Media Info of the file
Logs
FFmpeg Logs
Server System (please complete the following information):
Client System (please complete the following information):