How to optimize VLC for online streaming
Open VLC media player, select "Tools", and click on "Preference".
At the bottom of the screen click on "All Radio".
In the new window, find Stream Output and increase the stream output muxer catching from 1500ms (its default) to 5000ms. This will keep the caches of 5 seconds.
Another temporary solution when you are running a network URL format or streaming files like TS and M3U file formats is explained below:
Open VLC media player, click on "Media" and select "Open Network Stream".
Type the URL you want to play, then click on "Show More Options" checkbox.
Now, based on your Internet speed you can increase the cache size.