Go bindings for libVLC and high-level media player interface

libvlc-go logo

Go bindings for libVLC 2.X/3.X/4.X and high-level media player interface.

pkg.go.dev documentation MIT license Awesome Go Buy me a coffee
Go report card GitHub contributors Discord channel GitHub open issues GitHub closed issues

The package can be useful for adding multimedia capabilities to applications through the provided player interfaces. It relies on Go modules in order to mirror each supported major version of libVLC.

Documentation for v3, which implements bindings for libVLC 3.X, can be found on pkg.go.dev and on GoDoc.
Documentation for v2, which implements bindings for libVLC 2.X, can be found on pkg.go.dev and on GoDoc.

libvlc-go examples

Example applications:

Prerequisites

The libVLC development files are required. Instructions for installing the VLC SDK on multiple operating systems can be found on the wiki pages of this project.

Installation

In order to support multiple versions of libVLC, the package contains a Go module for each major version of the API. Choose an installation option depending on the version of libVLC you want to use.

libVLC v3.X or later

go get github.com/adrg/libvlc-go/v3

libVLC v2.X

go get github.com/adrg/libvlc-go/v2

# Build for libVLC < v2.2.0
go build -tags legacy

All versions above also work for projects which are not using Go modules. However, consider switching to modules.

Examples

Examples for the older version of the API can be found here.

Usage

package main

import (
    "log"

    vlc "github.com/adrg/libvlc-go/v3"
)

func main() {
    // Initialize libVLC. Additional command line arguments can be passed in
    // to libVLC by specifying them in the Init function.
    if err := vlc.Init("--no-video", "--quiet"); err != nil {
        log.Fatal(err)
    }
    defer vlc.Release()

    // Create a new player.
    player, err := vlc.NewPlayer()
    if err != nil {
        log.Fatal(err)
    }
    defer func() {
        player.Stop()
        player.Release()
    }()

    // Add a media file from path or from URL.
    // Set player media from path:
    // media, err := player.LoadMediaFromPath("localpath/test.mp4")
    // Set player media from URL:
    media, err := player.LoadMediaFromURL("http://stream-uk1.radioparadise.com/mp3-32")
    if err != nil {
        log.Fatal(err)
    }
    defer media.Release()

    // Retrieve player event manager.
    manager, err := player.EventManager()
    if err != nil {
        log.Fatal(err)
    }

    // Register the media end reached event with the event manager.
    quit := make(chan struct{})
    eventCallback := func(event vlc.Event, userData interface{}) {
        close(quit)
    }

    eventID, err := manager.Attach(vlc.MediaPlayerEndReached, eventCallback, nil)
    if err != nil {
        log.Fatal(err)
    }
    defer manager.Detach(eventID)

    // Start playing the media.
    err = player.Play()
    if err != nil {
        log.Fatal(err)
    }

    <-quit
}

In action

A list of projects using libvlc-go, in alphabetical order. If you want to showcase your project in this section, please create a pull request with it.

  • Alio - Command-line music player with Emacs style key bindings.
  • Tripbot - An ongoing 24/7 slow-TV art project.

Stargazers over time

Stargazers over time

Contributing

Contributions in the form of pull requests, issues or just general feedback, are always welcome.
See CONTRIBUTING.MD.

Contributors: adrg, fenimore, tarrsalah, danielpellon, patknight, sndnvaps.

References

For more information see the libVLC documentation.

License

Copyright (c) 2018 Adrian-George Bostan.

This project is licensed under the MIT license. See LICENSE for more details.

Comments
  • Error running on Windows: libvlc.dll not found

    Error running on Windows: libvlc.dll not found

    I have followed your wiki instructions on a fresh install of Windows.

    > gcc --version
    gcc (Rev5, Built by MSYS2 project) 10.2.0
    
    > ls C:\libvlc-3.0.8.1
    hrtfs  include  libvlc.dll  libvlc.lib  libvlccore.dll  libvlccore.lib  locale  lua  plugins  vlc.lib  vlccore.lib
    
    > ls C:\libvlc-3.0.8.1\include\vlc
    deprecated.h     libvlc_events.h            libvlc_media_library.h      libvlc_media_player.h         libvlc_vlm.h
    libvlc.h         libvlc_media.h             libvlc_media_list.h         libvlc_renderer_discoverer.h  plugins
    libvlc_dialog.h  libvlc_media_discoverer.h  libvlc_media_list_player.h  libvlc_version.h              vlc.h
    
    > echo %PATH%
    C:\Users\Dana\GolandProjects\go-1.13.15\go1.13.15\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\Syst
    em32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program F
    iles\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files\PowerShell\7\;C:\msy
    s64\mingw64\bin;C:\msys64\usr\bin;C:\Users\Dana\AppData\Local\Microsoft\WindowsApps;
    
    > echo %CGO_CFLAGS%
    -IC:\libvlc-3.0.11\include
    
    > echo %CGO_LDFLAGS%
    -LC:\libvlc-3.0.11\lib
    

    I have been switching between different versions of libvlc, libvlc-go, and go in my various attempts to get this working.

    Sometimes I see:

    > go build vlc-server.go
    # github.com/adrg/libvlc-go/v3
    C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lvlc
    C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lvlc
    C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lvlc
    C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lvlc
    C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lvlc
    C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lvlc
    C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lvlc
    C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lvlc
    C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lvlc
    C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lvlc
    collect2.exe: error: ld returned 1 exit status
    

    When I got past the go build step and ran the executable I got a popup that says:

    The code execution cannot proceed because the libvlc.dll was not found. Reinstalling the program may fix this problem.
    

    When I get this error I see the following in the terminal:

    Process finished with exit code -1073741515 (0xC0000135)
    

    I'm running out of things to try... any suggestions?

    Thank you for maintaining this!

  • Error messages when trying to run

    Error messages when trying to run

    I copied the code for the "Basic player usage" example, and used my own local video file. I'm getting the below errors when I try to run or build. I'm not familiar with C, but it seems it's complaining about something in the C code...

    $ go run video
    
    \# github.com/adrg/libvlc-go/v2
    
    In file included from _cgo_export.c:4:
    
    event_manager.go: In function 'eventAttach':
    
    event_manager.go:11:55: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    
    event_manager.go: In function 'eventDetach':
    
    event_manager.go:14:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    
    \# github.com/adrg/libvlc-go/v2
    
    ..\github.com\adrg\libvlc-go\v2\event_manager.go: In function 'eventAttach':
    
    ..\github.com\adrg\libvlc-go\v2\event_manager.go:11:55: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    
       11 |     return libvlc_event_attach(em, et, eventDispatch, (void*)userData);
    
          |                                                       ^
    
    ..\github.com\adrg\libvlc-go\v2\event_manager.go: In function 'eventDetach':
    
    ..\github.com\adrg\libvlc-go\v2\event_manager.go:14:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    
       14 |     libvlc_event_detach(em, et, eventDispatch, (void*)userData);
    
          |                                                ^
    
    \# github.com/adrg/libvlc-go/v2
    
    cgo-gcc-prolog: In function '_cgo_7b301a7633e1_Cfunc_libvlc_media_is_parsed':
    
    cgo-gcc-prolog:154:2: warning: 'libvlc_media_is_parsed' is deprecated [-Wdeprecated-declarations]
    
    In file included from C:\libvlc\include/vlc/vlc.h:51,
    
                     from ..\github.com\adrg\libvlc-go\v2\media.go:4:
    
    C:\libvlc\include/vlc/deprecated.h:249:4: note: declared here
    
      249 |    libvlc_media_is_parsed( libvlc_media_t *p_md );
    
          |    ^~~~~~~~~~~~~~~~~~~~~~
    
    cgo-gcc-prolog: In function '_cgo_7b301a7633e1_Cfunc_libvlc_media_parse':
    
    cgo-gcc-prolog:207:2: warning: 'libvlc_media_parse' is deprecated [-Wdeprecated-declarations]
    
    In file included from C:\libvlc\include/vlc/vlc.h:51,
    
                     from ..\github.com\adrg\libvlc-go\v2\media.go:4:
    
    C:\libvlc\include/vlc/deprecated.h:209:1: note: declared here
    
      209 | libvlc_media_parse( libvlc_media_t *p_md );
    
          | ^~~~~~~~~~~~~~~~~~
    
    cgo-gcc-prolog: In function '_cgo_7b301a7633e1_Cfunc_libvlc_media_parse_async':
    
    cgo-gcc-prolog:219:2: warning: 'libvlc_media_parse_async' is deprecated [-Wdeprecated-declarations]
    
    In file included from C:\libvlc\include/vlc/vlc.h:51,
    
                     from ..\github.com\adrg\libvlc-go\v2\media.go:4:
    
    C:\libvlc\include/vlc/deprecated.h:233:1: note: declared here
    
      233 | libvlc_media_parse_async( libvlc_media_t *p_md );
    
          | ^~~~~~~~~~~~~~~~~~~~~~~~
    
    exit status 3221225781
    
    
  • could not initialize module in macos

    could not initialize module in macos

    1. install vlc according to this guide https://github.com/adrg/libvlc-go/wiki/Install-on-macOS
    2. error ”could not initialize module“ occurred when run sample code if err := vlc.Init("--no-video", "--quiet"); err != nil { log.Fatal(err) })
  • Cannot build BaseExample

    Cannot build BaseExample

    I tried to run this but the build fails with

    # command-line-arguments
    cmd/client/main.go:34:12: undefined: vlc.Init
    cmd/client/main.go:37:8: undefined: vlc.Release
    cmd/client/main.go:40:17: undefined: vlc.NewPlayer
    
    » gcc --version
    gcc (GCC) 10.2.0
    Copyright (C) 2020 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    » ls /usr/lib | grep libvlc
    libvlccore.so
    libvlccore.so.9
    libvlccore.so.9.0.0
    libvlc.so
    libvlc.so.5
    libvlc.so.5.6.0
    

    I use Kernel 5.4.116-1-MANJARO.

  • Bug with segmented stacks, on gollvm

    Bug with segmented stacks, on gollvm

    Hi. Here is my situation:

    $ go test ./...

    github.com/adrg/libvlc-go/v3

    In file included from _cgo_export.c:3: event_manager.go:15:1: warning: non-void function does not return a value [-Wreturn-type]

    github.com/adrg/libvlc-go/v3

    ./event_manager.go:15:1: warning: non-void function does not return a value [-Wreturn-type]

    github.com/adrg/libvlc-go/v3

    cgo-gcc-prolog:142:11: warning: 'libvlc_media_is_parsed' is deprecated [-Wdeprecated-declarations] /usr/include/vlc/deprecated.h:248:1: note: 'libvlc_media_is_parsed' has been explicitly marked deprecated here /usr/include/vlc/libvlc.h:51:43: note: expanded from macro 'LIBVLC_DEPRECATED' cgo-gcc-prolog:174:2: warning: 'libvlc_media_parse' is deprecated [-Wdeprecated-declarations] /usr/include/vlc/deprecated.h:208:1: note: 'libvlc_media_parse' has been explicitly marked deprecated here /usr/include/vlc/libvlc.h:51:43: note: expanded from macro 'LIBVLC_DEPRECATED' cgo-gcc-prolog:183:2: warning: 'libvlc_media_parse_async' is deprecated [-Wdeprecated-declarations] /usr/include/vlc/deprecated.h:232:1: note: 'libvlc_media_parse_async' has been explicitly marked deprecated here /usr/include/vlc/libvlc.h:51:43: note: expanded from macro 'LIBVLC_DEPRECATED' ? github.com/adrg/libvlc-go/v3 [no test files]

    github.com/adrg/libvlc-go/v3/examples

    examples/event_handling.go:9:1: error: redefinition of 'main' examples/display_screen_media.go:15:1: note: previous definition of 'main' was here examples/list_player.go:9:1: error: redefinition of 'main' examples/display_screen_media.go:15:1: note: previous definition of 'main' was here examples/media_information.go:9:1: error: redefinition of 'main' examples/display_screen_media.go:15:1: note: previous definition of 'main' was here examples/player.go:9:1: error: redefinition of 'main' examples/display_screen_media.go:15:1: note: previous definition of 'main' was here

    github.com/mattn/go-gtk/glib

    In file included from _cgo_export.c:3: In file included from glib.go:5: ../../../go/pkg/mod/github.com/mattn/[email protected]/glib/glib.go.h:183:28: warning: 'GThreadFunctions' is deprecated [-Wdeprecated-declarations] /usr/include/glib-2.0/glib/deprecated/gthread.h:55:51: note: 'GThreadFunctions' has been explicitly marked deprecated here /usr/include/glib-2.0/glib/gversionmacros.h:432:49: note: expanded from macro 'GLIB_DEPRECATED_TYPE_IN_2_32' /usr/include/glib-2.0/glib/gmacros.h:1013:30: note: expanded from macro 'GLIB_DEPRECATED_TYPE' /usr/include/glib-2.0/glib/gmacros.h:942:37: note: expanded from macro 'G_DEPRECATED'

    github.com/mattn/go-gtk/glib

    In file included from ../../../go/pkg/mod/github.com/mattn/[email protected]/glib/glib.go:5: ../../../go/pkg/mod/github.com/mattn/[email protected]/glib/glib.go.h:183:28: warning: 'GThreadFunctions' is deprecated [-Wdeprecated-declarations] /usr/include/glib-2.0/glib/deprecated/gthread.h:55:51: note: 'GThreadFunctions' has been explicitly marked deprecated here /usr/include/glib-2.0/glib/gversionmacros.h:432:49: note: expanded from macro 'GLIB_DEPRECATED_TYPE_IN_2_32' /usr/include/glib-2.0/glib/gmacros.h:1013:30: note: expanded from macro 'GLIB_DEPRECATED_TYPE' /usr/include/glib-2.0/glib/gmacros.h:942:37: note: expanded from macro 'G_DEPRECATED' cgo-gcc-prolog:125:40: warning: 'GThreadFunctions' is deprecated [-Wdeprecated-declarations] /usr/include/glib-2.0/glib/deprecated/gthread.h:55:51: note: 'GThreadFunctions' has been explicitly marked deprecated here /usr/include/glib-2.0/glib/gversionmacros.h:432:49: note: expanded from macro 'GLIB_DEPRECATED_TYPE_IN_2_32' /usr/include/glib-2.0/glib/gmacros.h:1013:30: note: expanded from macro 'GLIB_DEPRECATED_TYPE' /usr/include/glib-2.0/glib/gmacros.h:942:37: note: expanded from macro 'G_DEPRECATED' fatal error: error in backend: Segmented stacks do not support vararg functions. PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. Stack dump: 0. Program arguments: /usr/bin/clang -I ../../../go/pkg/mod/github.com/mattn/[email protected]/glib -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build661407239/b019=/tmp/go-build -gno-record-gcc-switches -funwind-tables -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I $WORK/b019/ -g -O2 -fsplit-stack -o $WORK/b019/_x002.o -c glib.cgo2.c

    1. parser at end of file
    2. Code generation
    3. Running pass 'Function Pass Manager' on module 'glib.cgo2.c'.
    4. Running pass 'Prologue/Epilogue Insertion & Frame Finalization' on function '@_glib_callback' /lib/x86_64-linux-gnu/libLLVM-11.so.1(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x1f)[0x7f91c38e342f] /lib/x86_64-linux-gnu/libLLVM-11.so.1(_ZN4llvm3sys17RunSignalHandlersEv+0x50)[0x7f91c38e1790] /lib/x86_64-linux-gnu/libLLVM-11.so.1(_ZN4llvm3sys15CleanupOnSignalEm+0xdd)[0x7f91c38e2b7d] /lib/x86_64-linux-gnu/libLLVM-11.so.1(+0x9edb0a)[0x7f91c382ab0a] /lib/x86_64-linux-gnu/libLLVM-11.so.1(+0x9edaab)[0x7f91c382aaab] /lib/x86_64-linux-gnu/libLLVM-11.so.1(+0xaa125e)[0x7f91c38de25e] /usr/bin/clang[0x412932] /lib/x86_64-linux-gnu/libLLVM-11.so.1(_ZN4llvm18report_fatal_errorERKNS_5TwineEb+0x11f)[0x7f91c3836b6f] /lib/x86_64-linux-gnu/libLLVM-11.so.1(+0x9f9a48)[0x7f91c3836a48] /lib/x86_64-linux-gnu/libLLVM-11.so.1(+0x2a91910)[0x7f91c58ce910] /lib/x86_64-linux-gnu/libLLVM-11.so.1(+0xe4c8e3)[0x7f91c3c898e3] /lib/x86_64-linux-gnu/libLLVM-11.so.1(_ZN4llvm19MachineFunctionPass13runOnFunctionERNS_8FunctionE+0x10e)[0x7f91c3bb539e] /lib/x86_64-linux-gnu/libLLVM-11.so.1(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x3b9)[0x7f91c39f2579] /lib/x86_64-linux-gnu/libLLVM-11.so.1(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x33)[0x7f91c39f7b23] /lib/x86_64-linux-gnu/libLLVM-11.so.1(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x3e0)[0x7f91c39f2b90] /lib/x86_64-linux-gnu/libclang-cpp.so.11(_ZN5clang17EmitBackendOutputERNS_17DiagnosticsEngineERKNS_19HeaderSearchOptionsERKNS_14CodeGenOptionsERKNS_13TargetOptionsERKNS_11LangOptionsERKN4llvm10DataLayoutEPNSE_6ModuleENS_13BackendActionESt10unique_ptrINSE_17raw_pwrite_streamESt14default_deleteISM_EE+0x3316)[0x7f91c93621c6] /lib/x86_64-linux-gnu/libclang-cpp.so.11(+0x183f096)[0x7f91c9620096] /lib/x86_64-linux-gnu/libclang-cpp.so.11(_ZN5clang8ParseASTERNS_4SemaEbb+0x273)[0x7f91c86eb023] /lib/x86_64-linux-gnu/libclang-cpp.so.11(_ZN5clang14FrontendAction7ExecuteEv+0x48)[0x7f91c9cb55e8] /lib/x86_64-linux-gnu/libclang-cpp.so.11(_ZN5clang16CompilerInstance13ExecuteActionERNS_14FrontendActionE+0x861)[0x7f91c9c6b8e1] /lib/x86_64-linux-gnu/libclang-cpp.so.11(_ZN5clang25ExecuteCompilerInvocationEPNS_16CompilerInstanceE+0x5e0)[0x7f91c9d1af70] /usr/bin/clang(_Z8cc1_mainN4llvm8ArrayRefIPKcEES2_Pv+0x94f)[0x4125ff] /usr/bin/clang[0x410a3e] /lib/x86_64-linux-gnu/libclang-cpp.so.11(+0x1bbe9b2)[0x7f91c999f9b2] /lib/x86_64-linux-gnu/libLLVM-11.so.1(_ZN4llvm20CrashRecoveryContext9RunSafelyENS_12function_refIFvvEEE+0xdd)[0x7f91c382aa8d] /lib/x86_64-linux-gnu/libclang-cpp.so.11(_ZNK5clang6driver10CC1Command7ExecuteEN4llvm8ArrayRefINS2_8OptionalINS2_9StringRefEEEEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPb+0x13f)[0x7f91c999eedf] /lib/x86_64-linux-gnu/libclang-cpp.so.11(ZNK5clang6driver11Compilation14ExecuteCommandERKNS0_7CommandERPS3+0x2df)[0x7f91c9976cef] /lib/x86_64-linux-gnu/libclang-cpp.so.11(_ZNK5clang6driver11Compilation11ExecuteJobsERKNS0_7JobListERN4llvm15SmallVectorImplISt4pairIiPKNS0_7CommandEEEE+0x77)[0x7f91c9976e97] /lib/x86_64-linux-gnu/libclang-cpp.so.11(_ZN5clang6driver6Driver18ExecuteCompilationERNS0_11CompilationERN4llvm15SmallVectorImplISt4pairIiPKNS0_7CommandEEEE+0xdc)[0x7f91c998a9ec] /usr/bin/clang(main+0x2533)[0x4104e3] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7f91c29250b3] /usr/bin/clang(_start+0x2e)[0x40dcde] clang: error: clang frontend command failed with exit code 70 (use -v to see invocation) Ubuntu clang version 11.0.0-++20201021094914+176249bd673-1~exp1~20201021075533.113 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin clang: note: diagnostic msg:

    PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang: note: diagnostic msg: /tmp/glib-0387e6.c clang: note: diagnostic msg: /tmp/glib-0387e6.sh clang: note: diagnostic msg:


    github.com/mattn/go-pointer

    llvm-goc: /home/oceanfish81/workarea/llvm-project/llvm/lib/IR/Instructions.cpp:455: void llvm::CallInst::init(llvm::FunctionType *, llvm::Value *, ArrayRef<llvm::Value *>, ArrayRefllvm::OperandBundleDef, const llvm::Twine &): Assertion (i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Calling a function with a bad signature!"' failed. Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment varLLVM_SYMBOLIZER_PATH` to point to it): /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x3014ffa] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x30151cb] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x30137bb] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x301591d] /lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0)[0x7f675ad643c0] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7f675a7f918b] /lib/x86_64-linux-gnu/libc.so.6(abort+0x12b)[0x7f675a7d8859] /lib/x86_64-linux-gnu/libc.so.6(+0x25729)[0x7f675a7d8729] /lib/x86_64-linux-gnu/libc.so.6(+0x36f36)[0x7f675a7e9f36] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x2c8cf6d] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1e924cc] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1e92112] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1e91f50] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1ea0438] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1eaaeb5] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1eaaac7] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1ea418a] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1e99be3] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1e09b85] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1e0d7c4] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1e0f5e3] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1d95514] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1d93f31] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1d29935] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1d992a1] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1d93f31] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1d29935] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1d2923d] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1d173db] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1d15ff5] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1c72880] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1c5b7a0] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1c59401] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1c5cf76] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1c452c6] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1c454cc] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1c361be] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7f675a7da0b3] /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc[0x1c3556e] PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace. Stack dump: 0. Program arguments: /home/oceanfish81/gollvm_debug_dist/bin/llvm-goc -c -O2 -g -m64 -fdebug-prefix-map=/tmp/go-build661407239=/tmp/go-build -gno-record-gcc-switches -fgo-pkgpath=github.com/mattn/go-pointer -o $WORK/b023/go.o -I $WORK/b023/importcfgroot ../../../go/pkg/mod/github.com/mattn/[email protected]/doc.go $WORK/b023/_cgo_gotypes.go $WORK/b023/pointer.cgo1.go

    $ go version go version go1.15.2 gollvm LLVM 12.0.0git linux/amd64

    $ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/oceanfish81/.cache/go-build" GOENV="/home/oceanfish81/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/oceanfish81/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/oceanfish81/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/home/oceanfish81/gollvm_debug_dist" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/home/oceanfish81/gollvm_debug_dist/tools" GCCGO="/home/oceanfish81/gollvm_debug_dist/bin/llvm-goc" AR="ar" CC="/usr/bin/clang" CXX="/usr/bin/clang++" CGO_ENABLED="1" GOMOD="/home/oceanfish81/go_proj/libvlc-go/v3/go.mod" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build817753475=/tmp/go-build -gno-record-gcc-switches -funwind-tables"

  • module not initialized error

    module not initialized error

    I'm trying to run example code in my Ubuntu 18.04 machine, with Golang 1.13

    I'm getting a random module not initialized for every operation.

    if err := vlc.Init(); err != nil {
    	log.Fatal(err)
    }
    

    In here err is nil but when I debugged

    handle := C.libvlc_new(C.int(argc), *(***C.char)(unsafe.Pointer(&argv)))
    if handle == nil {
    	return getError()
    }
    

    handle is nil but getError() also returning nil. How can I resolve this?

  • How do I get the currently-playing file?

    How do I get the currently-playing file?

    I have my ListPlayer all set up and running, but I can't for the life of me figure out how to get info on the currently-playing Media.

    What I really want is the path to the current Media, but other metadata (such as the media's title) would also work.

    Thanks!

  • [bug] Random error when detaching event

    [bug] Random error when detaching event

    Detaching an event sometimes throws the following:

    SIGABRT: abort
    PC=0xb6dedf24 m=5 sigcode=4294967290
    
    goroutine 0 [idle]:
    runtime: unknown pc 0xb6dedf24
    stack: frame={sp:0xa52feb08, fp:0x0} stack=[0xa4aff1a4,0xa52feda4)
    a52fea88:  00000000  fde31900  00000000  92772680 
    a52fea98:  00000000  fde31900  00000000  92772670 
    a52feaa8:  00000000  fde31900  00000000  92772660 
    a52feab8:  00000000  fde31900  00000000  92772650 
    a52feac8:  00000000  fde31900  00000000  92772640 
    a52fead8:  00000000  fde31900  00000000  92772630 
    a52feae8:  00000000  00000006  00000109  a3f04080 
    a52feaf8:  a3f0408c  a52feb8c  b6fc0968  b6dedea8 
    a52feb08: <00000000  00000000  00000000  92772600 
    a52feb18:  00000000  fde31900  00000000  000555c8 <runtime.findrunnable+2800> 
    a52feb28:  01028060  00000000  00000000  927725e0 
    a52feb38:  00055d50 <runtime.findrunnable+4728>  006f2868  00055d64 <runtime.findrunnable+4748>  00000001 
    a52feb48:  00055d80 <runtime.findrunnable+4776>  006f2868  00000001  00000000 
    a52feb58:  00000001  00000001  000567ec <runtime.schedule+700>  006f2868 
    a52feb68:  00000000  010017a0  00000000  00000000 
    a52feb78:  00000000  00000000  00000000  92772590 
    runtime: unknown pc 0xb6dedf24
    stack: frame={sp:0xa52feb08, fp:0x0} stack=[0xa4aff1a4,0xa52feda4)
    a52fea88:  00000000  fde31900  00000000  92772680 
    a52fea98:  00000000  fde31900  00000000  92772670 
    a52feaa8:  00000000  fde31900  00000000  92772660 
    a52feab8:  00000000  fde31900  00000000  92772650 
    a52feac8:  00000000  fde31900  00000000  92772640 
    a52fead8:  00000000  fde31900  00000000  92772630 
    a52feae8:  00000000  00000006  00000109  a3f04080 
    a52feaf8:  a3f0408c  a52feb8c  b6fc0968  b6dedea8 
    a52feb08: <00000000  00000000  00000000  92772600 
    a52feb18:  00000000  fde31900  00000000  000555c8 <runtime.findrunnable+2800> 
    a52feb28:  01028060  00000000  00000000  927725e0 
    a52feb38:  00055d50 <runtime.findrunnable+4728>  006f2868  00055d64 <runtime.findrunnable+4748>  00000001 
    a52feb48:  00055d80 <runtime.findrunnable+4776>  006f2868  00000001  00000000 
    a52feb58:  00000001  00000001  000567ec <runtime.schedule+700>  006f2868 
    a52feb68:  00000000  010017a0  00000000  00000000 
    a52feb78:  00000000  00000000  00000000  92772590
    

    Is this related to the bindings? To me (noob) it does look like an issue with libVLC itself. If so i can open in their repo.

  • Why Ebedded  VLC on Microsoft Windows,  background  is transparent.

    Why Ebedded VLC on Microsoft Windows, background is transparent.

    I wrote a program under Microsoft Windows , which embed a LVC in a GTK DrawingArea . It seems OK except that the background around video (the gap between video and others) is transparent.

    I'v connect draw event to a function and use cr.SetSourceRGB(0, 255, 0)/cr.Paint() to draw background. When I click to maximize window, sometimes I can see the green background , but at most time it keep transparent.

    BTW: same program is All OK under linux

  • Https video streams don't play

    Https video streams don't play

    Player works fine with http streams, but it will not play streams over SSL.

    I have the same problem with Python library... Is there a solution for playing over https?

  • could not determine kind of name for C.libvlc_media_list_player_get_media_player

    could not determine kind of name for C.libvlc_media_list_player_get_media_player

    https://github.com/adrg/libvlc-go/blob/cf9c068890dd9f0d7ed909d3e2eb889ac378246a/v3/list_player.go#L58

    home/src/github.com/adrg/libvlc-go/v3/list_player.go:58:12: could not determine kind of name for C.libvlc_media_list_player_get_media_player

  • media player + gotk3 on WLS2(

    media player + gotk3 on WLS2(

    I attempted to use the media player on GOTK3 with V3 using Ubuntu 20.04 under WSL2 (Windows Subsystem Linux)

    During the realization phase, the following warning message appears on the terminal:

    Gdk-WARNING **: xxxxx: ../../../../../gdk/x11/gdkwindow-x11.c:5633 drawable is not a native X11 window
    

    Thus, the display of the video is in an automatically full screen created vlc window rather than the gtk.DrawingArea. I guess that it is due to the WSL2 X11 forwarding. Have you a hint on how to cope with the issue?

    I am using the latest WSL2 version (insider program). Therefore, I do not use a X11emulator such as mobaxterm. Nevertheless, before WSLg, I used mobaxterm and other x11 viewers. I got the same behavior.

  • libVLC instructions on Mac OS

    libVLC instructions on Mac OS

    Installation instructions on Debian based distributions are covered in the README file. Can someone provide installation instructions for the prerequisites of the library on Windows and Mac OS? I can then add the information to the README or create a wiki about this in order to help new users.

Fast, simple, scalable, Docker-ready HTTP microservice for high-level image processing

imaginary Fast HTTP microservice written in Go for high-level image processing backed by bimg and libvips. imaginary can be used as private or public

Jan 3, 2023
Monitor newznab/torznab rss and add new media to sonarr/radarr

Nabarr Nabarr monitors Newznab/Torznab RSS feeds to find new media to add to Sonarr and or Radarr. Table of contents Installing nabarr Introduction Me

Dec 28, 2022
Quake 2 Level Renderer written in Go and OpenGL
Quake 2 Level Renderer written in Go and OpenGL

go-quake2 Quake 2 Map Renderer written in Go and OpenGL. Features Loads any BSP file from Quake 2 Free roam around the environment Renders only a smal

Jan 4, 2023
Go bindings for audio capture and playback with ALSA and libasound

Go ALSA bindings These bindings allow capture and playback of audio via ALSA using the alsa-lib library. Installation go get github.com/cocoonlife/goa

Nov 26, 2022
Go bindings for GLFW 3

GLFW 3.3 for Go Installation GLFW C library source is included and built automatically as part of the Go package. But you need to make sure you have d

Jan 8, 2023
Go bindings for GLFW 3

GLFW 3.3 for Go Installation GLFW C library source is included and built automatically as part of the Go package. But you need to make sure you have d

Dec 25, 2022
Go bindings for OpenGL (generated via glow)

gl This repository holds Go bindings to various OpenGL versions. They are auto-generated using Glow. Features: Go functions that mirror the C specific

Dec 12, 2022
Go bindings to OpenGL Utility Library

GLU This package offers minimal bindings for GLU functions. Usage go get github.com/go-gl-legacy/glu License Copyright 2012 The go-gl Authors. All ri

Aug 18, 2018
naive go bindings to GnuPlot
naive go bindings to GnuPlot

go-gnuplot Simple-minded functions to work with gnuplot. go-gnuplot runs gnuplot as a subprocess and pushes commands via the STDIN of that subprocess.

Nov 8, 2021
go-gtk3 - GTK3 BINDINGS FOR GO

go-gtk3 - GTK3 BINDINGS FOR GO THIS IS: Hopefully GTK3 Bindings using gobject binding for Go. Goal is to have fairly complete gtk3 widgets with pango

May 25, 2021
Experimental OpenAL bindings for Go.

Experimental OpenAL bindings for Go. ==================================== Everything is evolving quickly and nothing is totally done. If you want to

Jul 24, 2022
Go bindings for OpenCV / 2.x API in gocv / 1.x API in opencv

Go OpenCV binding A Golang binding for OpenCV. OpenCV 1.x C API bindings through CGO, and OpenCV 2+ C++ API (GoCV) through SWIG. Disclaimer This is a

Dec 21, 2022
Go bindings for GStreamer (retired: currently I don't use/develop this package)

Retired. I don't use/develop this package anymore. Go bindings for GStreamer at a very early stage of maturity. This package is based on GLib bindings

Nov 10, 2022
Go bindings for OpenCV1.1 (Dev/Zero Dependencies).
Go bindings for OpenCV1.1 (Dev/Zero Dependencies).

Go语言QQ群: 102319854, 1055927514 凹语言(凹读音“Wa”)(The Wa Programming Language): https://github.com/wa-lang/wa Go bindings for OpenCV1.1 PkgDoc: http://godoc

Dec 6, 2022
Cgo bindings to PulseAudio's Simple API, for easily playing or capturing raw audio.

pulse-simple Cgo bindings to PulseAudio's Simple API, for easily playing or capturing raw audio. The full Simple API is supported, including channel m

Dec 17, 2022
Vulkan API bindings for Go programming language
Vulkan API bindings for Go programming language

Golang Bindings for Vulkan API Package vulkan provides Go bindings for Vulkan — a low-overhead, cross-platform 3D graphics and compute API. Updated Oc

Jan 3, 2023
Go cross-platform OpenGL bindings.

gl Package gl is a Go cross-platform binding for OpenGL, with an OpenGL ES 2-like API. It supports: macOS, Linux and Windows via OpenGL 2.1 backend, i

Nov 21, 2022
Efficient moving window for high-speed data processing.

Moving Window Data Structure Copyright (c) 2012. Jake Brukhman. ([email protected]). All rights reserved. See the LICENSE file for BSD-style license. I

Sep 4, 2022
⚡High Performance DICOM Medical Image Parser in Go.
⚡High Performance DICOM Medical Image Parser in Go.

dicom High Performance Golang DICOM Medical Image Parser ?? v1.0 just released! This is a library and command-line tool to read, write, and generally

Jan 4, 2023