Skip to content

Windows Media Player slow to load large m4b files (~30s+ for 400MB) #145

@KeinNiemand

Description

@KeinNiemand

Currently the app uses Windows MediaPlayer (Windows Media Foundation) as the audio backend. For large m4b files
(tested with ~400MB), there's a significant loading delay (~30+ seconds) before audio playback begins.
This 30s freeze always occurs whenever you first start playback after launching the app then reoccurs every several minutes.

Initial Investigation

Manual testing with the same m4b file shows:

  • Windows Media Player: ~30 second load time (same freeze reproduced in the native Windows Media Player app)
  • VLC: Instant file open and playback ready

This suggests the bottleneck is in Windows Media Foundation itself, not the app's implementation. The file format
and size are valid — VLC's performance confirms the file is not the problem.

Proposed Solution:

Replace Windows MediaPlayer with LibVLCSharp to use VLC as the audio backend. This should eliminate the freeze since
VLC demonstrates nearly instant load times for the same files.

I have a newPlayer, currently it doesn't work at all yet, so it's not anywhere near ready for a PR but feel free to take a look.
One problem with with using LibVLCSharp is that the VideoLAN.LibVLC.Windows package only contains naitive libvlc binaries for x86 and x64 windows. To get ARM64 working it would be required to manually compile and package the ARM64 version of libvlc.

Either way fixing this 30s+ freeze is going to require replacing Windows Media Player, while LibVLCSharp seems like the best option to me there are probably other libraries that could work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions