VLC media player for Windows Troubleshooting • VLC Player not playing back silent interludes properly in streams using Ogg Vorbis and FLAC if bitrate is 0bps



I am using Icecast 2 Win32 to stream audio in conjunction with EdcastStandalone using the Ogg Vorbis and FLAC codecs due to these codecs providing better sound quality than mp3, FLAC being lossless.

When playing a stream encoded in Ogg Vorbis or FLAC using VLC Player the player stops playback and buffers the audio whenever the encoded bitrate is 0bps (as displayed in the encoder) indicating the presence of a deliberate silent interlude in the music or audio stream. Thus if there is a delay between tracks such as 2 to 4 seconds of silence between CD tracks or even longer interludes of silence between classical music tracks in symphonies and concertos which are an integral part of the compositions themselves, VLC player will stop playing while still connected to the stream waiting until it receives non-zero samples from the Icecast2 server.

As a result of this playback issue the periods of silence between tracks, and even during the middle of tracks such as classical music tracks are doubled and this is cumulative.

If there is 10 seconds of silence between tracks VLC player will stop playing the audio and the played back time display on the player will stop as well at the time when the silence or zero samples were encoded into the stream for the duration of the silence. VLC player will then remain in this state until it registers non-zero samples in the audio and then when it detects non-zero samples in the audio stream playback will resume from the point it paused. Thus if there is 10 seconds of silence VLC player will remain silent for 10 seconds frozen on say 3 minutes, 5 seconds of the track and then when the non-zero samples are picked up will start again from 3 minutes 5 seconds (the time in seconds in an Ogg Vorbis or FLAC stream or file from the start is encoded using frame numbers in the Ogg container format by design), the 10 seconds that originally expired when VLC player paused will then be played back until the time code reaches 3 minutes 15 seconds and then the non-zero samples of the music or audio will then be played 20 seconds after the first silence occurred. The duration of the silence or interlude is therefore doubled.

This issue does not occur when playing back streams encoded using mp3 since the bitrate never drops to 0bps. It only occurs when playing back Ogg Vorbis and FLAC streams and as time progresses with consecutive periods of silence the delay between the live performance and playback gets longer and longer since VLC player doubles the duration of the silence every time. This makes listening to classical music the way it was recorded practically impossible and makes listening to CD tracks frustrating as the stream gets more and more out of sync with the original source unless the player is manually stopped and started again.

Other players such as SM Player do not suffer from this issue. SM Player will buffer an Ogg Vorbis or FLAC stream for about 12 seconds and if it encounters audio samples at -infinity dB ie. zero samples it will continue playback normally with the original duration of the gaps between tracks being preserved. It does suffer from bugs playing back Ogg Vorbis or FLAC streams which cause it to repeat the last second of audio, if a track stops or silent interludes occur at -infinity dB, if the playback buffer has not been filled up properly.

These bugs have probably been there for years and it is surprising no one has noticed them before and figured out the cause.

Is it possible to fix this issue and get Ogg Vorbis and FLAC streams to play black properly?

All audio is routed digitally using:
player: VLC Player 3.0.20 Vetinari
server: Icecast2 Win32 2.3.2
encoder: Edcast 3.37.2011.1214
mixer: Voicemeeter Banana 2.0.6.8
source: Virtual DJ v2024 b8263

Statistics: Posted by Argyros — 01 Aug 2024 16:51