-
Notifications
You must be signed in to change notification settings - Fork 34
Description
When a device like an AV Receiver (AVR) that supports decoding formats like Dolby Digital (AC-3) and DTS is connected via HDMI or S/PIDF, Windows doesn't decode audio for these formats by default. Instead it sends the audio stream to the device as-is (bitstreaming), and the device does the actual decoding. All other formats, like AAC and MP3, are still decoded by a software Windows decoder, and the audio is sent to the device as uncompressed PCM. Both ways work fine on their own with Media Foundation, but I found two cases where transitioning from one method of audio output to another results in no sound or an error.
Case 1
When playing bitstreamable (AC-3 or DTS) and non-bitstreamable media one after another (in the same playlist for example), a non-bitstreamable media file that is supposed to play after a bitstreamable one produces the We couldn't open 'filename'. Wait a bit, then try again. 0x88890002
error in the standard Media Player on Windows 11.
Steps to reproduce:
- Make sure that you have a device that supports decoding of AC-3, like an AVR, and it's connected to the PC via HDMI (S/PIDF should be similar, but I didn't try it). To verify that the device supports AC-3 bitstreaming, start "mmsys.cpl", double click on the device, go to the Supported Formats tab, and make sure that "Dolby Digital" is listed under "Encoded Formats".
- Extract the attached archive with test files and go to the "playlist" folder.
- Select all 3 files (1aac, 2ac3 and 3aac) and press Enter.
- They should open in a playlist in the standard Media Player that comes with Windows 11.
- "1aac" should start playing. As soon as it finishes and "2ac3" starts playing, there's the "We couldn't open 3aac. Wait a bit, then try again. 0x88890002" error. "3aac" doesn't play after "2ac3" because of the error.
Case 2
When a video file contains multiple audio tracks and one of them is a bitstreamable format (AC-3 or DTS) while another is either non-bitstreamable or a different bitstreamable format. In such case switching from the default track to the second track results in no sound.
Steps to reproduce:
- Make sure that you have a device that supports decoding of AC-3, like an AVR, and it's connected to the PC via HDMI (S/PIDF should be similar, but I didn't try it). To verify that the device supports AC-3 bitstreaming, start "mmsys.cpl", double click on the device, go to the Supported Formats tab, and make sure that "Dolby Digital" is listed under "Encoded Formats".
- Extract the attached archive with test files and go to the "multitrack" folder.
- Open the "aac+ac3" video using the standard Media Player.
- You should hear the sound.
- Switch the audio track to the second one.
- The result is there's no more sound playing.
I could reproduce it on 2 different PCs with different AVRs. I tried the standard Microsoft's "High Definition Audio Device" driver, as well as NVIDIA and Intel HDMI audio drivers with the GeForce GTX 1080 and Intel UHD Graphics 630 video cards respectively. The OS is Windows 11 24H2.
The same 2 scenarios work fine with third-party players that use DirectShow, so it looks like a Media Foundation issue.
I attached the files generated by MFTraceLog for both cases.