Hello,
I'm running into an issue with VLC buffering with media over an SMB share.
similar search terms: stuttering, choppy
Here's my setup:
Client:
VLC Version 3.0.18 Vetinari (Intel 64bit)
macOS Ventura 13.3.1 (a)
Server:
debian bullseye 11.7
smb 4.13.13
File information:
file is ~1.4GB
3840x2160 H.264
with AAC audio
Rule out CPU / decode:
If I copy the file locally to disk and play with VLC, there is no buffering. Activity monitor shows disk reads in the range of 3MB/s - 5MB/s with spikes to 8MB/s - 12MB/s
Rule out network issues:
The same file plays fine without buffering if I use QuickLook on the file in Finder. Activity monitor shows network receive at shows 3MB/s - 5MB/s with spikes to 8MB/s - 12MB/s
Reproduce:
Playing with VLC from SMB share, activity monitor shows network receive at shows 3MB/s - 4MB/s, NO spikes to 8MB/s - 12MB/s.
Log shows frame late, buffering.
I've tried increasing Network Caching ( Preferences (All) > Input / Codecs ) but that only increases the initial delay before playback from what I presume is a larger cache / buffer, but still stutters later on. Decreasing the Network Caching, is faster to load but choppier.
I've also tried doubling Read Size ( Preferences (All) > Input / Codecs > Stream filters > prefetch ) with no change in result.
Read [1] about SMB read size influencing this behavior. SMB read size is kept small to satisfy users with high latency, low bandwidth connections to the detriment of low latency, high bandwidth connections.
I may be missing context but this seems similar to TCP slow start [6], roughly analogous: start with a small SMB read buffer size and double the size until the buffer cant be filled fast enough or there is no buffering, whichever is sooner.
If there is a config option I'm missing or other things I can do to test/debug please let me know!
Gitlab references:
[1] https://code.videolan.org/videolan/vlc/-/issues/19988
[2] https://code.videolan.org/videolan/vlc/-/issues/19806
[3] https://code.videolan.org/videolan/vlc/-/issues/21470
Forum References:
[4] https://forum.videolan.org/viewtopic.ph ... 2&start=50
[5] https://forum.videolan.org/search.php?k ... %5B0%5D=12
Technical references
[6] hpbn.co/building-blocks-of-tcp/ [hit url limit]
update: added software versions and media information