Nevcairiel / LAVFilters

LAV Filters - Open-Source DirectShow Media Splitter and Decoders
GNU General Public License v2.0
7.19k stars 786 forks source link

Improve downtime in audio when seeking with bitstreaming enabled #596

Closed ecruz1986 closed 1 month ago

ecruz1986 commented 1 month ago

I'm using MPC-HC, playing a Dolby Atmos TrueHD file with bitstreaming enabled to my Denon AV receiver connected via HDMI.

When I seek through the timeline of the file while it is playing, there is a downtime in audio playback, it stays mute for about 2 seconds before it starts playing again from the new timeline position.

For comparison, VLC's audio downtime when seeking under the same bitstreaming conditions is much lower than MPC-HC's, so we can be sure there is room for improvement here so that users get a more seamless experience while seeking.

Nevcairiel commented 1 month ago

This is most likely up to the audio renderer. LAV immediately outputs audio, as can be observed when decoding.

ecruz1986 commented 1 month ago

This is most likely up to the audio renderer. LAV immediately outputs audio, as can be observed when decoding.

Then how could we explain that VLC does this much faster? Under VLC, I'm also using HDMI passthrough to the same Denon AVR renderer, and it is much faster.

VLC must be doing something different that we could "borrow" and make LAVFilters better.

Nevcairiel commented 1 month ago

And why can't the "better" part be in the audio renderer, as mentioned above?

ecruz1986 commented 1 month ago

And why can't the "better" part be in the audio renderer, as mentioned above?

I'm sorry, initially I thought that by "audio renderer" you meant the Denon AVR, that's what's rendering the object based audio bitstream into the discrete audio channels.

You understood that the Denon AVR is the same in both scenarios, so you must be talking about something else... The player software then? So you think MPC-HC is the component that should be improved?

I did create an issue in MPC-HC before, https://github.com/clsid2/mpc-hc/issues/2818#issuecomment-2140802338

But they referred me here...

So you think this should be dealt with in MPC-HC?

clsid2 commented 1 month ago

MPC-HC options > Playback > Output > Audio Renderer Maybe you have more luck with SaneAR, which uses WASAPI instead of DirectSound.

There will be no modifications in MPC-HC.

ecruz1986 commented 1 month ago

MPC-HC options > Playback > Output > Audio Renderer Maybe you have more luck with SaneAR, which uses WASAPI instead of DirectSound.

There will be no modifications in MPC-HC.

Thank you, I played with those settings.

When set to "System Default" like it was before, I get the long downtime.

Setting it to either "SaneAR Audio Renderer" or "MPC Audio Renderer" or "DENON-AVR" it becomes just as fast as VLC. Setting as "DirectSound DENON-AVR" makes it slow again.

So yeah, DirectSound is the culprit here... But why is the system default using DirectSound? From what I read, that should be deprecated... Looks like VLC selects something else as their default audio renderer, so that's why it works faster out of the box without any config.

Food for thought... but anyways, closing. Thank you!