VLC HTTP Client

Control VLC from MATLAB via the Web (HTTP) interface—autolaunch, play/pause, seek, volume, status, and an approximate frame index.
1 Download
Updated 12 Nov 2025

View License

VLC HTTP Client for MATLAB
==========================
Control VLC Media Player from MATLAB via VLC’s Web (HTTP) interface. This toolbox can auto-launch VLC (GUI or headless), wait for the HTTP endpoint to be ready, and provides simple methods to open/enqueue media, play/pause/stop, seek, set volume, and query status (time/length/position/state). It also parses nominal FPS when available and returns an approximate “current frame” as floor(time*fps).
Key features
• Auto-launch VLC with the HTTP interface (configurable port/password)
• Play, pause, stop, next/previous, open/enqueue URIs (file://, http://, https://)
• Relative/absolute seek; set fractional position
• Volume control (0..512; ~256 ≈ 100%)
• Status getters: state, time, length, position
• FPS best-effort parser and approx frame index
• Cross-platform: Windows, macOS, Linux
Requirements
• VLC 3.x+ installed locally
• A non-empty VLC HTTP password (VLC requirement)
• MATLAB R2019b or newer (uses “arguments” blocks)
Security note
Keep the HTTP interface on localhost or a trusted network and choose a strong password. The class authenticates with HTTP Basic auth using an empty username (the “:password” form).
Quick Start
-----------
v = VLC("127.0.0.1", 8081, "mypw", AutoLaunch=true, Headless=true, WaitReady=25);
v.open("file:///C:/videos/demo.mp4");
v.play(); pause(1);
v.seekRel(+10);
[t,L,state] = v.getTimeLengthState();
n = v.getApproxFrameNumber();
v.pause(); v.stop();
Documentation
-------------
• Getting Started (landing page): setup, passwords, ports, quick examples
• How-To guides: playback control, headless launch, troubleshooting
• API Reference: full list of methods and properties
Limitations
-----------
• No true frame counter in VLC’s HTTP API (frame index is time×fps)
• MATLAB Online is not supported (requires local VLC/system access)

Cite As

Daniel Duque-Urrego (2025). VLC HTTP Client (https://se.mathworks.com/matlabcentral/fileexchange/182587-vlc-http-client), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2025b
Compatible with R2020b and later releases
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0