Jump to content

HEVC Browser Support in macOS?


Go to solution Solved by Happy2Play,

Recommended Posts

Posted (edited)

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
Posted

Darn, I meant to post this in the MacOS forum. Could someone please move it?

Posted

Hi, you enabled WebRTC H265 ? That should not impact the Emby web app.

Posted
On 12/12/2020 at 6:52 PM, Luke said:

Hi, you enabled WebRTC H265 ? That should not impact the Emby web app.

Yes, enabled and quit/restarted Safari to be safe. 

971233771_ScreenShot2020-12-14at11_03_08AM.png.a4d17f05712bd472ead6777d8944e8b8.png

In the same browser I tried the two H265 test files here and both play.

https://tools.woolyss.com/html5-audio-video-tester/

 

Posted

ffmpeg log for the mp4 example? The browser doesn't support the mkv container.

  • 1 month later...
Posted

@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.

Posted
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

Posted

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.

Happy2Play
Posted

Is html5test.com showing h265 support?

 

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

Posted
2 minutes ago, Happy2Play said:

Is html5test.com showing h265 support?

Yes. Screenshots attached.

1506772491_ScreenShot2021-02-07at5_30_25PM.thumb.png.209f7c3fc6df2ccc667be9f5f8b34684.png1444553592_ScreenShot2021-02-07at5_30_52PM.thumb.png.714b981b201e459cadcf3d814d39c4ab.png

Posted

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.

Posted

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
  • Solution
Happy2Play
Posted

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

  • Thanks 1
Posted
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.

  • 9 months later...
Posted

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.

Posted
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
  • 10 months later...
Posted

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

 

 

  • 1 year later...
Posted

Is there an update on this? All the hevc .mkv videos I have are transcoded when playing in safari. In chrome and emby app, they play directly.

Another thing, I found that if I convert the .mkv files to .mp4 (and convert the audio stream to aac), they don't get transcoded.

Posted
3 hours ago, hoonlight said:

Is there an update on this? All the hevc .mkv videos I have are transcoded when playing in safari. In chrome and emby app, they play directly.

Another thing, I found that if I convert the .mkv files to .mp4 (and convert the audio stream to aac), they don't get transcoded.

Hi there @hoonlightdid you explore the stats feature in the video player to learn why it was transcoding?

Posted (edited)
1 hour ago, Luke said:

Hi there @hoonlightdid you explore the stats feature in the video player to learn why it was transcoding?

Hi, I've attached the log, thanks.
I tested on M1 pro macbook, M1 ipad pro, iPhone and all the same.

In Chrome on macbook, only audio is transcoded, video is direct play. And in emby app both video and audio are direct play.

I thought this was a Safari issue from when I first started using emby until now, I wish there was a way to direct play.

 

I just checked, and videos that are 4k hevc .mkv files but are SDR can be direct play. does safari not support hdr10, DV direct play?

SCR-20240926-odth.png

ffmpeg-transcode-1904778c-5f73-4c91-a0b0-5f188d1d1637_1.txt

Edited by hoonlight
Posted (edited)

If you need more logs, let me know.

 

Edited by hoonlight
  • 4 weeks later...
Posted
On 9/26/2024 at 10:43 AM, hoonlight said:

If you need more logs, let me know.

 

Hi, can you try resetting your customizations back to defaults:

>>>>>  Non-Default Encoder Parameters
Warning EncoderParametersH264Qsv.Preset: Original:  Actual: medium
Warning EncoderParametersH264Qsv.BitrateMode: Original: Classic Actual: Vbr

Then see how things compare. Thanks.

Posted (edited)
On 10/25/2024 at 2:11 AM, Luke said:

Hi, can you try resetting your customizations back to defaults:

>>>>>  Non-Default Encoder Parameters
Warning EncoderParametersH264Qsv.Preset: Original:  Actual: medium
Warning EncoderParametersH264Qsv.BitrateMode: Original: Classic Actual: Vbr

Then see how things compare. Thanks.

Yes, I changed the relevant settings to default and then attached a log of the playback. The first and second videos are transcoded when played in safari, only the third video, which is not HDR, does not have the video stream transcoded.

 

ffmpeg-transcode-7e2b3a07-7ea4-45a2-95e2-6616c845a859_1.txt ffmpeg-transcode-3b583978-4dcb-43e7-9000-dff753970f09_1.txt ffmpeg-remux-b260c375-0dac-49ba-9d98-41102403295d_1.txt embyserver-6.txt

Edited by hoonlight

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...