Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential Safari port #123

Open
zoltan-magyar opened this issue Jan 2, 2022 · 2 comments
Open

Potential Safari port #123

zoltan-magyar opened this issue Jan 2, 2022 · 2 comments

Comments

@zoltan-magyar
Copy link

Hello everyone!

I understand that this is not exactly in scope for this project, but I have been messing around in Safari, mainly because Spatial Audio support has been added, so the potential for Dolby Atmos or multichannel playback is quite great.

I have been digging around in Cadmium, mostly concentrated around the audio tracks. I used WebKit local overrides and everything should be in order, but even though I am forcing heaac-5.1-dash the debug screen still shows 2 channels. Bitrate screen is fine and back.

The reason I opened this issue here is because I couldn't really find any other sources on Cadmium, and I guess people have the most experience here.

Of course if this is a totally wrong way to bring this issue up feel free to close it, but nevertheless I would appreciate some input on the matter.

Obviously a complete Safari port is not trivial, since it misses some key Web Extensions API features, so this is purely a proof of concept

After I commented out most features that aren't necessary for this usecase, I changed the following:

b.TM = function() {
      var audioProfiles = ["heaac-5.1-dash"];
      //if (use6Channels) audioProfiles.push("heaac-5.1-dash");
      
      // var videoProfiles = [
      //     "playready-h264mpl30-dash",
      //     "playready-h264mpl31-dash",
      //     "playready-h264mpl40-dash",
      //     "playready-h264hpl22-dash",
      //     "playready-h264hpl30-dash",
      //     "playready-h264hpl31-dash",
      //     "playready-h264hpl40-dash"
      // ];

      // if (useVP9) videoProfiles = videoProfiles.concat(["vp9-profile0-L22-dash-cenc", "vp9-profile0-L30-dash-cenc", "vp9-profile0-L31-dash-cenc", "vp9-profile0-L40-dash-cenc"]);
      return {
          oC: audioProfiles,
          gv: [l.N.QJ, l.N.FE, l.N.LQ, l.N.MQ, l.N.qK, l.N.rK],
          xm: f.Hb.hMa,
          dA: c.Nc(31E3)
      };
  };
@zoltan-magyar
Copy link
Author

zoltan-magyar commented Jan 2, 2022

I managed to get Atmos working, as far as I can see the right bitrate is locked and the debug view reports it as DDPlus Atmos.

The only problem is that it still only shows up as a multichannel source under a Spatial Audio compatible AirPods.

I created a Gist with the working configuration, I had to be a bit brutal, basically replacing the "heaac-2-dash" string with the Atmos one and flipping a switch.

Gist, look for comments

@expertsultan
Copy link

Hello everyone!

I understand that this is not exactly in scope for this project, but I have been messing around in Safari, mainly because Spatial Audio support has been added, so the potential for Dolby Atmos or multichannel playback is quite great.

I have been digging around in Cadmium, mostly concentrated around the audio tracks. I used WebKit local overrides and everything should be in order, but even though I am forcing heaac-5.1-dash the debug screen still shows 2 channels. Bitrate screen is fine and back.

The reason I opened this issue here is because I couldn't really find any other sources on Cadmium, and I guess people have the most experience here.

Of course if this is a totally wrong way to bring this issue up feel free to close it, but nevertheless I would appreciate some input on the matter.

Obviously a complete Safari port is not trivial, since it misses some key Web Extensions API features, so this is purely a proof of concept

After I commented out most features that aren't necessary for this usecase, I changed the following:

b.TM = function() {
      var audioProfiles = ["heaac-5.1-dash"];
      //if (use6Channels) audioProfiles.push("heaac-5.1-dash");
      
      // var videoProfiles = [
      //     "playready-h264mpl30-dash",
      //     "playready-h264mpl31-dash",
      //     "playready-h264mpl40-dash",
      //     "playready-h264hpl22-dash",
      //     "playready-h264hpl30-dash",
      //     "playready-h264hpl31-dash",
      //     "playready-h264hpl40-dash"
      // ];

      // if (useVP9) videoProfiles = videoProfiles.concat(["vp9-profile0-L22-dash-cenc", "vp9-profile0-L30-dash-cenc", "vp9-profile0-L31-dash-cenc", "vp9-profile0-L40-dash-cenc"]);
      return {
          oC: audioProfiles,
          gv: [l.N.QJ, l.N.FE, l.N.LQ, l.N.MQ, l.N.qK, l.N.rK],
          xm: f.Hb.hMa,
          dA: c.Nc(31E3)
      };
  };

I have been searching for this thing since weeks, can you please help me get this 5.1 audio, i will test atmos audio if possible. you can reach out to me on insta if you use or discord
Insta username @saywhat.exe
Discord username @needsometonic#9298

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants