Problem
When playing music, there is a noticeable gap or delay between tracks. This is because the next song is only fetched (via yt-dlp) once the current track ends, which involves a YouTube search, stream resolution, and buffering before playback can begin.
Proposed Solution
Pre-cache the next song in the queue while the current track is still playing, similar to how most music players (Spotify, Apple Music, etc.) handle gapless or near-gapless playback.
Ideally this would begin fetching/buffering the next track some configurable amount of time before the current one ends (e.g. 10–20 seconds).
Expected Benefit
- Near-instant transitions between tracks
- Better experience when using the yt-dlp addon, where stream resolution adds latency
- Brings music playback quality closer to native streaming apps
Additional Context
This would be especially impactful given that yt-dlp stream resolution can take 2–4 seconds per track. Pre-caching would effectively hide this latency entirely for normal sequential playback.
Problem
When playing music, there is a noticeable gap or delay between tracks. This is because the next song is only fetched (via yt-dlp) once the current track ends, which involves a YouTube search, stream resolution, and buffering before playback can begin.
Proposed Solution
Pre-cache the next song in the queue while the current track is still playing, similar to how most music players (Spotify, Apple Music, etc.) handle gapless or near-gapless playback.
Ideally this would begin fetching/buffering the next track some configurable amount of time before the current one ends (e.g. 10–20 seconds).
Expected Benefit
Additional Context
This would be especially impactful given that yt-dlp stream resolution can take 2–4 seconds per track. Pre-caching would effectively hide this latency entirely for normal sequential playback.