Disabling AAC audio while still allowing H.264(AVC) video

Do not post support requests, bug reports or feature requests. Discuss CEF here. Non-CEF related discussion goes in General Discussion!

Disabling AAC audio while still allowing H.264(AVC) video

Postby stevensnow » Mon Feb 01, 2021 9:32 am

For a windows only project I'm working on, we've enabled proprietary codecs as part of a feature, which has worked fine thus far. However, due to a licensing concern, we've been asked to try to disable AAC audio somehow while simultaneously still supporting H.264 video, the desired end result being H.264 video still working, but without the AAC audio working. This is only even on the table due to audio being unimportant within the context of our app.

Does anyone know if this is doable?
I suspect that with AAC audio disabled, that such a video (like an mp4 video composed of H.264 video and AAC audio) would simply not be playable.

As far as how to try this, it seems that the best way would be to rebuild ffmpeg with AAC removed for Chrome branding (within the context of custom building CEF).
Any tips on how else this could be accomplished are appreciated as well.

Thanks in advance!
stevensnow
Newbie
 
Posts: 6
Joined: Thu Nov 12, 2020 1:27 pm

Re: Disabling AAC audio while still allowing H.264(AVC) vide

Postby ndesktop » Mon Feb 01, 2021 11:53 am

If calling SetAudioMuted from CEF for each audio element (using a visitor for html media elements) is not an option, I'd try to take a look here first.
Then (wild guesses follows, since I never did this):
- patch AAC class to play nothing
- patch HTMLMediaElement and provide a some kind of "null" AudioSourceProvider, AudioSourceProviderClient.
ndesktop
Master
 
Posts: 571
Joined: Thu Dec 03, 2015 10:10 am

Re: Disabling AAC audio while still allowing H.264(AVC) vide

Postby stevensnow » Wed Feb 03, 2021 1:19 pm

We were able to accomplish this with a modified version of the SetAudioMuted approach.

We use CefSharp as a wrapper for CEF. On browser initialization, we were able to access the ChromiumWebBrowser's CefBrowserHost and call SetAudioMuted(true) on it.
stevensnow
Newbie
 
Posts: 6
Joined: Thu Nov 12, 2020 1:27 pm


Return to CEF Discussion

Who is online

Users browsing this forum: No registered users and 6 guests