K22R8CT 24 Posted December 9, 2020 Posted December 9, 2020 (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. On the same machine both HEVC mkvs and mp4s direct play in the Emby Web App. 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 December 9, 2020 by Anon28109
K22R8CT 24 Posted December 9, 2020 Author Posted December 9, 2020 Darn, I meant to post this in the MacOS forum. Could someone please move it?
Luke 40006 Posted December 12, 2020 Posted December 12, 2020 Hi, you enabled WebRTC H265 ? That should not impact the Emby web app.
K22R8CT 24 Posted December 14, 2020 Author Posted December 14, 2020 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. In the same browser I tried the two H265 test files here and both play. https://tools.woolyss.com/html5-audio-video-tester/
Luke 40006 Posted December 15, 2020 Posted December 15, 2020 ffmpeg log for the mp4 example? The browser doesn't support the mkv container.
K22R8CT 24 Posted December 17, 2020 Author Posted December 17, 2020 Attached. ffmpeg-transcode-6aaffb4e-f854-4077-8ca8-14ec5786b36c_1.txt
Luke 40006 Posted February 6, 2021 Posted February 6, 2021 @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.
K22R8CT 24 Posted February 7, 2021 Author Posted February 7, 2021 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.)
Luke 40006 Posted February 7, 2021 Posted February 7, 2021 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 9431 Posted February 7, 2021 Posted February 7, 2021 Is html5test.com showing h265 support? But that transcode log is only showing "VideoCodec=h264&AudioCodec=mp3,aac" support.
K22R8CT 24 Posted February 7, 2021 Author Posted February 7, 2021 2 minutes ago, Happy2Play said: Is html5test.com showing h265 support? Yes. Screenshots attached.
Luke 40006 Posted February 7, 2021 Posted February 7, 2021 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.
K22R8CT 24 Posted February 7, 2021 Author Posted February 7, 2021 Okay I queued up an H265 movie, restarted EmbyServer then hit play. Logs attached. embyserver.txt.zip ffmpeg-transcode-a59e174c-0f65-4846-96b7-23f08b0336bc_1.txt.zip
Luke 40006 Posted February 8, 2021 Posted February 8, 2021 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. 1
Solution Happy2Play 9431 Posted February 8, 2021 Solution Posted February 8, 2021 if you put path to file in your browser does the mp4 play? 1
K22R8CT 24 Posted February 9, 2021 Author Posted February 9, 2021 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.
Avenius 0 Posted November 22, 2021 Posted November 22, 2021 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.
Luke 40006 Posted November 22, 2021 Posted November 22, 2021 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. 1
Gecko 71 Posted October 4, 2022 Posted October 4, 2022 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
hoonlight 17 Posted September 26, 2024 Posted September 26, 2024 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.
Luke 40006 Posted September 26, 2024 Posted September 26, 2024 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?
hoonlight 17 Posted September 26, 2024 Posted September 26, 2024 (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? ffmpeg-transcode-1904778c-5f73-4c91-a0b0-5f188d1d1637_1.txt Edited September 26, 2024 by hoonlight
hoonlight 17 Posted September 26, 2024 Posted September 26, 2024 (edited) If you need more logs, let me know. Edited September 26, 2024 by hoonlight
Luke 40006 Posted October 24, 2024 Posted October 24, 2024 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.
hoonlight 17 Posted October 29, 2024 Posted October 29, 2024 (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 October 29, 2024 by hoonlight
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now