Install on Windows - adrg/libvlc-go GitHub Wiki

Install MinGW toolchain

See installation instructions at https://github.com/adrg/libvlc-go/wiki/Install-MinGW-toolchain.

Install libVLC SDK

The easiest way to install libVLC on Windows (which does not require building it from source) is to download the latest version of the VideoLAN.LibVLC.Windows NuGet package.

libVLC NuGet package

The downloaded package is basically a ZIP file, so it can be opened with any archive manager.

libVLC NuGet package structure

The build directory contains the SDK files, prebuilt for 32 and 64 bit versions of Windows.

libVLC NuGet package build directory

Extract the appropriate directory (most likely x64) to a location of your choice. In this example, the directory is extracted to C:\libvlc. The contents of the extracted directory should be:

libvlc directory

Before building your project, set the CGO_LDFLAGS and the CGO_CFLAGS environment variables, in order to make the Go build tools aware of the location of the VLC SDK files.

set CGO_LDFLAGS=-L{your-sdk-path}
set CGO_CFLAGS=-I{your-sdk-path}\include

In this example, the location of the SDK files is C:\libvlc.

Set environment variables