Skip to content

When switching audio track in the video, the audio starts, then stops, then starts again.

I'm launching the similar code as in LibVLCSharp.WPF.Sample to play a video.

var uri = new Uri("http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4");
using (var media = new Media(_libVLC, uri))
VideoView.MediaPlayer.Play(media);

When I switch audio track in the playing video to empty track (with id == -1)

VideoView.MediaPlayer.SetAudioTrack(-1);

and then to the initial track (id==0)

VideoView.MediaPlayer.SetAudioTrack(0);

then audio appears for a very short moment, then disappears for about a second, and then plays normally again.

My Sample https://github.com/Asteron1024/LibVlcSwitchTrack Launch, then press "Play", press "Track 0", press "Track -1"

The VLC player also has a second pause before turning on the audio, but there is no short unwanted moment with the audio immediately after switching the track. I appreciate any advice on how to get rid of the short sound right after switching a track.

  • OS: Windows 10 19043
  • LibVLC.Windows 3.0.16
  • LibVLCSharp.WPF 3.6.5
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information