jellyfin / jellyfin-web

Web Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
2.39k stars 1.27k forks source link

H.265 files cannot be played in Safari without transcoding, even though it supports it. #4216

Open Southpaw1496 opened 1 year ago

Southpaw1496 commented 1 year ago

Describe The Bug H.265 files cannot be played in Safari without being transcoded, even though it supports them. I have played back the raw files natively in Safari without issue, it only doesn't work when played through Jellyfin (without transcoding).

Steps To Reproduce

  1. Obtain an HVEC video, and add it to Jellyfin
  2. Disable transcoding for the user you wish to test with (Dashboard -> Users -> User ❌ Allow video playback that requires transcoding).
  3. Try playing the H265 video
  4. Observe

Expected Behavior Since Safari natively supports H.265 playback on Safari 11 (on macOS High Sierra or later) and later, the video should play successfully without transcoding enabled.

Logs Tested with the short "8 Ball Bunny"

jellyfin  | [22:33:38] [INF] [12] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for root. EnablePlaybackRemuxing: False EnableVideoPlaybackTranscoding: False EnableAudioPlaybackTranscoding: False
jellyfin  | [22:33:38] [INF] [12] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile=Anonymous Profile, Path=/media/Movies/8 Ball Bunny (1950).mp4, AudioStreamIndex=1, SubtitleStreamIndex=-1 ) => ( PlayMethod=Transcode, TranscodeReason=VideoCodecNotSupported ) media:/videos/31aaa79d-3f2b-063a-23f9-d17cfd3016fc/stream?MediaSourceId=31aaa79d3f2b063a23f9d17cfd3016fc&AudioStreamIndex=1&api_key=<token>&SubtitleMethod=Encode&RequireAvc=false&Tag=fdfbdd9cdc993d86abf770a978545d7b&TranscodeReasons=VideoCodecNotSupported
jellyfin  | [22:33:39] [INF] [12] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app Jellyfin Web 10.8.8 playing 8 Ball Bunny. Stopped at 0 ms

Screenshots

Screenshot 2022-12-18 at 10 35 28 pm

System (please complete the following information):

Additional Context I have also tested playback in the desktop app, Chrome, and Firefox. Chrome and the desktop app work fine, and Firefox does not, but it doesn't support H.265 in the first place anyway.

TimGels commented 1 year ago

Have you tried enabling the fmp4-hls option in the web client? Screenshot_20221226-155254.jpg

Southpaw1496 commented 1 year ago

I have now, and there is no difference.

dmitrylyzo commented 1 year ago

Looks like HEVC is currently disabled on Safari (because some version was lying about support): https://github.com/jellyfin/jellyfin-web/blob/b90936912716832cab6e70b8f2876ac9f2ddf94d/src/scripts/browserDeviceProfile.js#L516-L519

It is better to try to rebuild the web with the discarded condition. But if you can't, you can try to remove s.Z.safari|| in main.jellyfin.bundle.js in the part that looks like: l(n,e)&&(s.Z.safari||L.push("hevc"),...).

Southpaw1496 commented 1 year ago

Would this fix ever be added to Jellyfin itself, perhaps as a config option? Could you check for a specific version instead of just Safari in general?

jellyfin-bot commented 1 year ago

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.