Jump to content

HEVC Browser Support in macOS?


K22R8CT
Go to solution Solved by Happy2Play,

Recommended Posts

K22R8CT

On Safari on my 2016 Macbook Pro HEVC mp4s always transcode. Stats for Nerds doesn't give a reason.

(HEVC mkvs transcode with the expected reason: container not supported)

I've tried enabling WebRTC H265 in Safari's Experimental Features but it doesn't make a difference.


 949493566_ScreenShot2020-12-09at7_45_17AM.thumb.png.e1abbd923d0a87651f2ebb97981911f6.png  1316543876_ScreenShot2020-12-09at7_53_35AM.thumb.png.1cdd4fe5b07c54c4d8d19a699e3a67a5.png

 

On the same machine both HEVC mkvs and mp4s direct play in the Emby Web App.

416903465_ScreenShot2020-12-09at7_49_15AM.png.57850c15c066e00d402593bda1e435ac.png 774041657_ScreenShot2020-12-09at8_11_40AM.png.4ff935c61bc45b8652e46a2699103f5d.png

 

Is this a bug, do I have something misconfigured or is this expected behavior?

I've just started digging into HEVC/H265 so I'm a bit out of my depth.

 

 

Edited by Anon28109
Link to comment
Share on other sites

  • 1 month later...

@Anon28109 I just tested on a macbook and an mp4 with hevc is direct playing in safari. I have not made any adjustments to this so I don't think any fix was made that I'm forgetting about.

My best guess is that safari always shows the option but it's only active on devices that have hardware decoding support of hevc.

Link to comment
Share on other sites

K22R8CT
20 hours ago, Luke said:

My best guess is that safari always shows the option but it's only active on devices that have hardware decoding support of hevc.

Well something's up because my Intel 630 can decode in hardware (as far as I know.) I disabled graphics switching to force the Radeon 555 and it still transcodes. Can you see anything in that log files that might explain why? (I'm running the latest version of everything including the Emby beta server.)

 

2018200147_ScreenShot2021-02-07at11_15_17AM.thumb.png.c94fbad24bf770db96e3dbbc2a27cbc0.png412857752_ScreenShot2021-02-07at11_16_23AM.thumb.png.6d68aaace64df1037060dd232439024d.png

Link to comment
Share on other sites

All I see is that it looks like the browser thinks it's not supported. @Happy2Play do you recall the link to the page that detects supported video formats? Thanks.

Link to comment
Share on other sites

Happy2Play

Is html5test.com showing h265 support?

 

But that transcode log is only showing "VideoCodec=h264&AudioCodec=mp3,aac" support.

Link to comment
Share on other sites

Ok, the only other thing I can think of is that the web app tried to direct play it, but the browser reported a decoding error or some other error with the file and then the server automatically switched to transcoding. 

The server log would help confirm that.

And by the way, it's not unusual for safari to report features as supported that don't actually work on some subset of older devices. The same thing happened with ac3 support and the browser's picture in picture function. Once those two things were added the browser started reporting them as supported even on devices where they didn't work, and we ended up having to put hacks to avoid trying to use them.

Link to comment
Share on other sites

Yes that's exactly it. It tried to direct play and then immediately switched to transcoding due to the browser reporting an error. So my guess is, on your device, safari is lying about supporting hevc, something that we've seen Safari do before with other browser features.

  • Thanks 1
Link to comment
Share on other sites

  • Solution
Happy2Play

if you put path to file in your browser does the mp4 play?

  • Thanks 1
Link to comment
Share on other sites

K22R8CT
On 2/8/2021 at 1:45 PM, Happy2Play said:

if you put path to file in your browser does the mp4 play?

It never occurred to me to try that. No it doesn't.

The integrated graphics (630) should support it so it must be a software limitation, strange.

Thanks.

Link to comment
Share on other sites

  • 9 months later...

Hi, I now this topic is a little bit older, but I here got a similar behavior and tested a little bit and it will be even stranger:

Okay I'm using a newer MacBook (2019) which got hardware support for HEVC, Monterey 12.1, Safari 15.1, Emby 4.6.6 and also I here got the same problem that a 1080p hevc will not play directly in safari browser (web interface) and try to recode/trancode it to h264.

The really strange thing now is, the problem is not the video stream, but the audio stream.

I tested a few setups and at the moment it looks like safari doesn't like an AC3 Stream (maybe other too), if I drop the audio streams completely or select an AAC audio stream, direct streaming works. I only tested it with mp4 containers, mkv containers seems to be always recoded.

Maybe this could helps anyone.

Link to comment
Share on other sites

25 minutes ago, Avenius said:

Hi, I now this topic is a little bit older, but I here got a similar behavior and tested a little bit and it will be even stranger:

Okay I'm using a newer MacBook (2019) which got hardware support for HEVC, Monterey 12.1, Safari 15.1, Emby 4.6.6 and also I here got the same problem that a 1080p hevc will not play directly in safari browser (web interface) and try to recode/trancode it to h264.

The really strange thing now is, the problem is not the video stream, but the audio stream.

I tested a few setups and at the moment it looks like safari doesn't like an AC3 Stream (maybe other too), if I drop the audio streams completely or select an AAC audio stream, direct streaming works. I only tested it with mp4 containers, mkv containers seems to be always recoded.

Maybe this could helps anyone.

Hi, this will be improved in the upcoming Emby Server 4.7 release where even if the audio has to be converted, it won't necessarily cause the video to transcode.

  • Like 1
Link to comment
Share on other sites

  • 10 months later...

Hi @Luke,

I found this thread and was wondering if my current issues are not related to this subject ? Whereas indeed, any HEVC in MKV are converted to h264 mp4 in safari. Shouldn't they be simply remuxed to mp4 container ? Not a huge problem anyway, just wondering...

 

FYI, a 1080p HEVC with AC3 Stereo Audio playback from Emby Web App 4.7.8.0 gives me this :

http://<emby>/emby/videos/253370/main.m3u8?DeviceId=2a67424c-7b0c-49d8-99b0-75046e6f4546&MediaSourceId=c1c7c6f5169dd5c54cee12d59ce6f93b&PlaySessionId=2915bbb9e2bf47259ec938d8f3f3272e&api_key=1d50186e532e4836aaaa66121215b8b8&VideoCodec=h264,h265,hevc&AudioCodec=mp3,aac&VideoBitrate=7808001&AudioBitrate=192000&AudioStreamIndex=2&TranscodingMaxAudioChannels=2&SegmentContainer=m4s,ts&MinSegments=2&BreakOnNonKeyFrames=True&h264-profile=high,main,baseline,constrainedbaseline&h264-level=62&hevc-codectag=hvc1&TranscodeReasons=ContainerNotSupported,DirectPlayError&allowVideoStreamCopy=false

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...