Skip to content


Andrew Lambert edited this page May 4, 2018 · 7 revisions


Method signature

 Sub AddOption(Options As String, Flags As UInt32 = 0)


This method is used to apply advanced reading/streaming options to a single Medium object. These are VLC command-line options that change what libvlc will do when the Medium is played with a VLCPlayer. These options can, for example, transcode media from one format into another and then write output into a file instead of playing the media to the user.


This example creates a Medium from an ogg/vorbis audio file, and then uses AddOption to instruct libvlc to transcode the audio stream into an MP3 file rather than playback normally:

  Dim player As New VLCPlayer
  Dim m As libvlc.Medium = GetFolderItem("C:\example\music.ogg")
  player.Media = m
  If Not player.Play() Then MsgBox("Unable to transcode!")
  Do Until Not player.IsPlaying

See also

Clone this wiki locally
You can’t perform that action at this time.