Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

zooole

macrumors member
Original poster
May 22, 2016
67
47
So after posting about this yesterday, I did a little digging.

First of all, Safari supports Dolby Atmos Spatial Audio. As is evident when playing Dolby Atmos files.

Now, Netflix does support Dolby Atmos, just not on the web. There exists a nice extension, Netflix 1080p. For us this is not too relevant, as it cannot be ported as is to Safari, and Safari already does Dolby Vision at 4K. But it's still limited to 2 channel audio.

This extension does provide 5.1 too, so I was intrigued. I managed to get DDPLUS 5.1 out of Netflix, which correctly shows up as Multichannel audio with Spatial Audio. Atmos is also possible, but I got stuck. It shows up as Atmos on Netflix, but still just Multichannel in sound settings.

I created a gist of the modified Cadmium Playercore. It is a mess, mostly I just wrote over the existing heaac-2-dash because the minified .js file is extremely hard to read and Safari kept going back to 2.0 without basically overwriting everything. Atmos also needs a bit of a push.

If somehow Atmos could get through Spatial Audio, I would be willing to make this nice and potentially an extension. 5.1 is already quite nice with Spatial Audio though, but I really hope this could be pushed all the way.

Github Gist

Screenshot 2022-01-02 at 22.05.42.png
 
So after posting about this yesterday, I did a little digging.

First of all, Safari supports Dolby Atmos Spatial Audio. As is evident when playing Dolby Atmos files.

Now, Netflix does support Dolby Atmos, just not on the web. There exists a nice extension, Netflix 1080p. For us this is not too relevant, as it cannot be ported as is to Safari, and Safari already does Dolby Vision at 4K. But it's still limited to 2 channel audio.

This extension does provide 5.1 too, so I was intrigued. I managed to get DDPLUS 5.1 out of Netflix, which correctly shows up as Multichannel audio with Spatial Audio. Atmos is also possible, but I got stuck. It shows up as Atmos on Netflix, but still just Multichannel in sound settings.

I created a gist of the modified Cadmium Playercore. It is a mess, mostly I just wrote over the existing heaac-2-dash because the minified .js file is extremely hard to read and Safari kept going back to 2.0 without basically overwriting everything. Atmos also needs a bit of a push.

If somehow Atmos could get through Spatial Audio, I would be willing to make this nice and potentially an extension. 5.1 is already quite nice with Spatial Audio though, but I really hope this could be pushed all the way.

Github Gist

View attachment 1937870
i am able to get 4k on safari but how did u get 5.1 channel on safari? can you help me out in this case. and yes i am also looking how to play atmos from netflix, i saw that extension for chrome but it limits playback to 1080p only. thankfully someone is also looking in this case.
 
  • Like
Reactions: joey3561
I manage to get Atmos by overriding with this gist. However, in those shows/movies with only 5.1 audio, I can only get stereo. Is any update going to fix this? Thanks a lot.
I just tried this file and it is not working for me. In the console I am getting an error that says "
[Warning] AES-CBC and AES-CTR do not provide authentication by default, and implementing it manually can result in minor, but serious mistakes. We recommended using authenticated encryption like AES-GCM to protect against chosen-ciphertext attacks. (cadmium-playercore-6.0040.377.911.js, line 1)"
Does anyone how to move forward from this?
 
  • Like
Reactions: iL15hts
@igermanprod I tried your script and it doesn't seem to do anything. I have no 5.1 audio option and still get 2.0 audio. I'm sure I did it correctly per your instructions

I'm connected to a TV via HDMI. The TV will normally pass 5.1 to the sound bar. I notice that when I open the audio midi app and select my TV, all I see are 2 ch options. Maybe that's the problem?

What is your display and how are you connected?
 
  • Like
Reactions: iL15hts
Holy moly guys I never expected this to blow up. I haven't really been active on MacRumors forums and I kind of forgot about this thread.

I will take a look at how things look today, Safari API support got better, and I think the extension route is the only realistic solution here, but I highly doubt that the required things would be added (for security purposes).

Nevertheless, I will try to find some time to look back and maybe check out some other streaming services.

Note: The gist is old. And it's super sketchy. Netflix changes cadmium versions whenever they want so it might break whenever it wants. The gist is more than likely won't work in its current state. I would need to grab a newer version and maybe edit that.
 
  • Like
Reactions: awitez
Actually, there is really easy way to do it. All you have to do is download Netflix iPad app to your mac via PlayCover (https://playcover.io/) app. Then you will get multi channel sound on the Netflix iPad version.
That's not a good solution. There were always problems with 4K when I tried it, and at some point Netflix might just decide to stop working if it detects Playcover's injected libraries in itself. Without those you're going to have a 4:3 screen with black bars. Not to mention the UX not being optimized for mouse/keyboard at all. No idea why they can't just do it properly on Mac.
 
  • Like
Reactions: orbital~debris
i am able to get 4k on safari but how did u get 5.1 channel on safari? can you help me out in this case. and yes i am also looking how to play atmos from netflix, i saw that extension for chrome but it limits playback to 1080p only. thankfully someone is also looking in this case.
I can’t give you an easy way.

This is just for development purposes but the code is in the gist. It is a modified version of Cadmium player which is Netflix’s client side engine.

The 1080p extension approach is not viable on safari because it does not support features of the Web Extension API that is necessary to easily redirect Netflix’s request for the Cadmium player .js file to a modified one.

It should work on Chrome, but I didn’t investigate since it doesn’t support Spatial Audio.
 
I can’t give you an easy way.

This is just for development purposes but the code is in the gist. It is a modified version of Cadmium player which is Netflix’s client side engine.

The 1080p extension approach is not viable on safari because it does not support features of the Web Extension API that is necessary to easily redirect Netflix’s request for the Cadmium player .js file to a modified one.

It should work on Chrome, but I didn’t investigate since it doesn’t support Spatial Audio.
Yes, I did saw your gist. I was able to enable dev options in safari and access local sources of Netflix player. But I wasn't able to make changes in it. That's where I'm stuck, I hope you can help me in that case how to make changes or import that gist in safari to make it work.
Moreover I did find a new extension for Netflix which is for Edge browser and it has inbuilt Dolby Atmos option. That extension has a cardium player.js file as well.
For now please help me make changes in safari sources that's what I need to do.
 
So after posting about this yesterday, I did a little digging.

First of all, Safari supports Dolby Atmos Spatial Audio. As is evident when playing Dolby Atmos files.

Now, Netflix does support Dolby Atmos, just not on the web. There exists a nice extension, Netflix 1080p. For us this is not too relevant, as it cannot be ported as is to Safari, and Safari already does Dolby Vision at 4K. But it's still limited to 2 channel audio.

This extension does provide 5.1 too, so I was intrigued. I managed to get DDPLUS 5.1 out of Netflix, which correctly shows up as Multichannel audio with Spatial Audio. Atmos is also possible, but I got stuck. It shows up as Atmos on Netflix, but still just Multichannel in sound settings.

I created a gist of the modified Cadmium Playercore. It is a mess, mostly I just wrote over the existing heaac-2-dash because the minified .js file is extremely hard to read and Safari kept going back to 2.0 without basically overwriting everything. Atmos also needs a bit of a push.

If somehow Atmos could get through Spatial Audio, I would be willing to make this nice and potentially an extension. 5.1 is already quite nice with Spatial Audio though, but I really hope this could be pushed all the way.

Github Gist

View attachment 1937870

I get it working only for English language. Is there any way how to get it working for all other available languages?
 
So after posting about this yesterday, I did a little digging.

First of all, Safari supports Dolby Atmos Spatial Audio. As is evident when playing Dolby Atmos files.

Now, Netflix does support Dolby Atmos, just not on the web. There exists a nice extension, Netflix 1080p. For us this is not too relevant, as it cannot be ported as is to Safari, and Safari already does Dolby Vision at 4K. But it's still limited to 2 channel audio.

This extension does provide 5.1 too, so I was intrigued. I managed to get DDPLUS 5.1 out of Netflix, which correctly shows up as Multichannel audio with Spatial Audio. Atmos is also possible, but I got stuck. It shows up as Atmos on Netflix, but still just Multichannel in sound settings.

I created a gist of the modified Cadmium Playercore. It is a mess, mostly I just wrote over the existing heaac-2-dash because the minified .js file is extremely hard to read and Safari kept going back to 2.0 without basically overwriting everything. Atmos also needs a bit of a push.

If somehow Atmos could get through Spatial Audio, I would be willing to make this nice and potentially an extension. 5.1 is already quite nice with Spatial Audio though, but I really hope this could be pushed all the way.

Github Gist

View attachment 1937870
recently i got it working with the help of katzecz. And i was able to get high bitrate for audio in atmos, but in 5.1 it is still low, can you somehow manage to push t to highest bitrate in audio as well, to enable high bitrate audio all I did was add hq behind 5.1 or atmos, thats what katzecz found.
 
Hey @zoole can you please tell me how did you enable that popup thing which pops up when we tap option+control+shift+s
 
recently i got it working with the help of katzecz. And i was able to get high bitrate for audio in atmos, but in 5.1 it is still low, can you somehow manage to push t to highest bitrate in audio as well, to enable high bitrate audio all I did was add hq behind 5.1 or atmos, thats what katzecz found.
hi, how do you make it work ? i do stuck and can't edit the local source. Can you help me?
 
hi, how do you make it work ? i do stuck and can't edit the local source. Can you help me?
Enable developer options of safari,
Open Netflix play anything click develop option in top bar then show page source
In left there is scripts folder or something tap it then you will find cadmium player click it, tap copy kind of icon then select create response override then the tap import and select the file. Then refresh the page you are good to go. It will stay 5.1 until you reload the page. Click import and load file again if doesn’t work in first try and refresh the page
 
Enable developer options of safari,
Open Netflix play anything click develop option in top bar then show page source
In left there is scripts folder or something tap it then you will find cadmium player click it, tap copy kind of icon then select create response override then the tap import and select the file. Then refresh the page you are good to go. It will stay 5.1 until you reload the page. Click import and load file again if doesn’t work in first try and refresh the page
i try this and not working, not even go to 5.1 still stay in stereo. I'll attach a few files for you to have a look
 

Attachments

  • Screen Shot 2022-07-13 at 22.38.07.png
    Screen Shot 2022-07-13 at 22.38.07.png
    108.6 KB · Views: 894
  • Screen Shot 2022-07-13 at 22.37.34.png
    Screen Shot 2022-07-13 at 22.37.34.png
    239.4 KB · Views: 812
  • Screen Shot 2022-07-13 at 22.37.48.png
    Screen Shot 2022-07-13 at 22.37.48.png
    297.2 KB · Views: 822
Hi, this latest gist works for me : I can select the Atmos track for neftlix shows as shown in the screenshot above. However when looking at the sound output to my AirPods Max it says Multicanal (multichannel) not Dolby Atmos. Am I missing something ?
Many thanks for your work !
Capture d’écran 2022-09-19 à 22.45.03.png
 
Hi, I'm bit of beginner here and need some help. When I download the "gist" file as zip and extract it, how do I install to Safari? I Have M1 MacBook Pro 16" and I was surprised how well the spatial audio works in Apple TV app, but I'd like it to work in Netflix/Safari too. Thanks for any help.
 
Hi, I'm bit of beginner here and need some help. When I download the "gist" file as zip and extract it, how do I install to Safari? I Have M1 MacBook Pro 16" and I was surprised how well the spatial audio works in Apple TV app, but I'd like it to work in Netflix/Safari too. Thanks for any help.
Open netflix. play any content in it pause it. then go to develop option in menu bar, show page source, in left menu go to scripts, cadmium player in right text box thing in top of it tap that copy button type thing, create response local override, in left menu you will see local overrides, tap it, in right text thing there is import button and import the file and hit refresh on netlfix page. it will give netflix until you manually refresh page or reopen netflix.
 
Open netflix. play any content in it pause it. then go to develop option in menu bar, show page source, in left menu go to scripts, cadmium player in right text box thing in top of it tap that copy button type thing, create response local override, in left menu you will see local overrides, tap it, in right text thing there is import button and import the file and hit refresh on netlfix page. it will give netflix until you manually refresh page or reopen netflix.
Thank you very much for the help.
 
Interesting stuff! I applied the last gist and the player interface now reports '(Atmos)', but actually only decodes to 5.1 instead of 7.1.4 as configured in Audio Midi Setup.. If anyone know how to fix it, I'd appreciate any advice.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.