Platforms to show: All Mac Windows Linux Cross-Platform

Back to VLCMediaPlayerMBS class.

VLCMediaPlayerMBS.Constructor(media as VLCMediaMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Create a Media Player object from a Media.

On success handle is not nil.

See also:

VLCMediaPlayerMBS.Constructor(VLCInstance as VLCInstanceMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Create an empty Media Player object.

On success handle is not nil.

See also:

VLCMediaPlayerMBS.CopyCGImage as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 19.0 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Copies current frame as CGImageMBS.

This method set HasNewFrame to false.

VLCMediaPlayerMBS.CopyMemory as memoryblock

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Copies current frame as memoryblock.

This method set HasNewFrame to false.
The format depends on what you passed to VideoSetFormat.
Byte order usually is BGRA.

VLCMediaPlayerMBS.CopyPicture as Picture

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Copies current frame as picture.

This method set HasNewFrame to false.
If using CGContext, this returns a CGImageMBS. Else a Picture.

With version 19.0, this returns always a picture.

VLCMediaPlayerMBS.CopyToMemory(dest as Ptr, offset as Integer, RowBytes as Integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 13.4 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Copies current frame into a given memory block.

Offset: Position of first byte in memoryblock.
RowBytes: The row size in bytes of your memoryblock.

This way you can have your frame go into a buffer of bigger width/height representing an OpenGL texture for example.
Byte order usually is BGRA.

VLCMediaPlayerMBS.Destructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
The destructor.

VLCMediaPlayerMBS.GetChapterCountForTitle(title as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Get title chapter count.

Return number of chapters in title, or -1.

VLCMediaPlayerMBS.GetChapterDescription(index as Integer) as VLCTrackDescriptionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Get the description of available chapters for specific title.

Return list containing description of available chapter for title with index.

VLCMediaPlayerMBS.GetMemory as Ptr

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 13.4 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Returns pointer to memory with current frame.

This method set HasNewFrame to false.
The format depends on what you passed to VideoSetFormat.

VLCMediaPlayerMBS.Navigate(Navigate as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Navigate through DVD Menu.

VLCMediaPlayerMBS.NextChapter

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Set next chapter (if applicable)

VLCMediaPlayerMBS.NextFrame

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Display the next frame (if supported)

VLCMediaPlayerMBS.Pause

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Toggle pause (no effect if there is no media)

See also:

VLCMediaPlayerMBS.Pause(pause as boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Pause or resume (no effect if there is no media)

pause: play/resume if false, pause if true.

See also:

VLCMediaPlayerMBS.Play as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Plays video.

Return true if playback started (and was already started), or false on error.

VLCMediaPlayerMBS.PreviousChapter

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Set previous chapter (if applicable)

VLCMediaPlayerMBS.SetAudioOutput(AudioOutputName as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Set the audio output.

Change will be applied after stop and play.
Name: name of audio output.
Return true on success.

VLCMediaPlayerMBS.SetAudioOutputDevice(AudioOutputName as string, deviceID as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Set audio output device. Changes are only effective after stop and play.

AudioOutputName: name of audio output.
deviceID: device ID.

VLCMediaPlayerMBS.SetEqualizer(Equalizer as VLCEqualizerMBS = nil)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 15.3 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Apply new equalizer settings to a media player.

It is possible to apply new equalizer settings to a media player whether the media player is currently playing media or not.
Invoking this method will immediately apply the new equalizer settings to the audio output of the currently playing media if there is any.
If there is no currently playing media, the new equalizer settings will be applied later if and when new media is played.

Equalizer settings will automatically be applied to subsequently played media.

To disable the equalizer for a media player invoke this method passing nil for the equalizer parameter.

The media player does not keep a reference to the supplied equalizer so it is safe for an application to release the equalizer reference any time after this method returns.

Requires VLC 2.2.

VLCMediaPlayerMBS.SetSubtitleFile(filename as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Set new video subtitle file.

filename: new video subtitle file
Returns the success status.

VLCMediaPlayerMBS.SetVideoTitleDisplay(position as Integer, timeout as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 15.3 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Set if, and how, the video title will be shown when media is played.

position: position at which to display the title, or kVideoTitleDisplayPositionDisable to prevent the title from being displayed.
timeout: title display timeout in milliseconds (ignored if libvlc_position_disable)

Requires VLC 2.1.

VLCMediaPlayerMBS.Stop

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Stop (no effect if there is no media)

VLCMediaPlayerMBS.ToggleFullScreen

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Toggle fullscreen status on non-embedded video outputs.

See also Fullscreen property.

VLCMediaPlayerMBS.ToggleMute

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Toggle mute status.

VLCMediaPlayerMBS.ToggleTeletext

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Toggle teletext transparent status on video output.

VLCMediaPlayerMBS.VideoAdjust(option as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Get/set adjust option as Integer.

option: See kAdjust* constants.
Options that take a different type value are ignored.

Using kAdjustEnable with value 0 stops adjust filter. With other values you start adjust filter.
(Read and Write computed property)

VLCMediaPlayerMBS.VideoAdjustFloat(option as Integer) as single

Type Topic Plugin Version macOS Windows Linux iOS Targets
property VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Get/set adjust option as float.

option: See kAdjust* constants.
Options that take a different type value are ignored.
(Read and Write computed property)

VLCMediaPlayerMBS.VideoGetCursor(num as Integer, byref px as Integer, byref py as Integer) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Get the mouse pointer coordinates over a video.

Coordinates are expressed in terms of the decoded video resolution, not in terms of pixels on the screen/viewport (to get the latter, you can query your windowing system directly).

Either of the coordinates may be negative or larger than the corresponding dimension of the video, if the cursor is outside the rendering area.

The coordinates may be out-of-date if the pointer is not located on the video rendering area. LibVLC does not track the pointer if it is outside of the video widget.

LibVLC does not support multiple pointers (it does of course support multiple input devices sharing the same pointer) at the moment.

num: number of the video (starting from, and most commonly 0)
px: get the abscissa.
py: get the ordinate.
Returns true on success, false if the specified video does not exist

VLCMediaPlayerMBS.VideoGetSize(num as Integer, byref px as UInt32, byref py as UInt32) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Get the pixel dimensions of a video.

num: number of the video (starting from, and most commonly 0)
px: get the pixel width [OUT]
py: get the pixel height [OUT]
Return true on success, false if the specified video does not exist.

VLCMediaPlayerMBS.VideoLogo(option as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Get/Set logo option as Integer.

Options that take a different type value are ignored.
Passing kLogoEnable as option value has the side effect of starting (arg not 0) or stopping (arg 0) the logo filter.
(Read and Write computed property)

VLCMediaPlayerMBS.VideoMarquee(option as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Get, Enable, disable or set an integer marquee option.

Setting kMarqueeEnable has the side effect of enabling (arg not 0) or disabling (arg 0) the marq filter.
(Read and Write computed property)

VLCMediaPlayerMBS.VideoMarqueeString(option as Integer) as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Get/Set a string marquee option value

(Read and Write computed property)

VLCMediaPlayerMBS.VideoSetCallback(width as integer, height as integer, CGContextHandle as integer = 0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Sets video callbacks, so the plugin can provide current frame with CopyPicture method.

You can use CopyPicture and CopyMemory methods to query new frame content.
The hasNewFrame property tells you whether a new frame is available.
The plugin will optionally draw the frames into the CGContext you provide.
Please use CopyCGImage to get a CGImage from image buffer.

Some examples using this method:

VLCMediaPlayerMBS.VideoSetDeinterlace(Mode as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Enable or disable deinterlace filter.

Mode: Type of deinterlace filter, "" to disable.

VLCMediaPlayerMBS.VideoSetFormat(chroma as string, width as UInt32, height as UInt32, pitch as UInt32)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Set decoded video chroma and dimensions.

This only works in combination with SetVideoCallbacks().
chroma: a four-characters string identifying the chroma (e.g. "RV32" or "YUYV")
width: pixel width
height: pixel height
pitch: line pitch (in bytes)

All pixel planes are expected to have the same pitch.

VLCMediaPlayerMBS.VideoSetKeyInput(on as boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Enable or disable key press events handling, according to the LibVLC hotkeys configuration.

By default and for historical reasons, keyboard events are handled by the LibVLC video widget.

On X11, there can be only one subscriber for key press and mouse click events per window. If your application has subscribed to those events for the X window ID of the video widget, then LibVLC will not be able to handle key presses and mouse clicks in any case.

This function is only implemented for X11 and Win32 at the moment.

on: true to handle key press events, false to ignore them.

VLCMediaPlayerMBS.VideoSetLogoString(option as Integer, logo as String)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Set logo option as string.

Options that take a different type value are ignored.

VLCMediaPlayerMBS.VideoSetMouseInput(on as boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Enable or disable mouse click events handling.

By default, those events are handled. This is needed for DVD menus to work, as well as a few video filters such as "puzzle".

This function is only implemented for X11 and Win32 at the moment.

on: true to handle mouse click events, false to ignore them.

VLCMediaPlayerMBS.VideoTakeSnapshot(num as Integer, path as string, width as Integer, height as Integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method VLC MBS VLC Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Take a snapshot of the current video window.

If width AND height is 0, original size is used.
If width XOR height is 0, original aspect-ratio is preserved. (e.g. width = 0 and height = -1)

num: number of video output (typically 0 for the first/only one)
Path: the path where to save the screenshot to
Width: the snapshot's width
Height: the snapshot's height

Returns true on success, false if the video was not found

Some examples using this method:

The items on this page are in the following plugins: MBS VLC Plugin.


The biggest plugin in space...