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.

[WIP] a very simple, tiny and intuitive ffmpeg wrapper with a cli interface for inspecting & transforming media files supported by the original ffmpeg software

About a very simple, tiny and intuitive ffmpeg wrapper with a cli interface for inspecting & transforming media files supported by the original ffmpeg

Oct 21, 2022
A simple library to extract video and audio frames from media containers (based on libav).
A simple library to extract video and audio frames from media containers (based on libav).

Reisen A simple library to extract video and audio frames from media containers (based on libav, i.e. ffmpeg). Dependencies The library requires libav

Jan 2, 2023
Synthetic media is a realistic transformation of audio and video using artificial intelligence.

Synthetic media is a realistic transformation of audio and video using artificial intelligence.

Nov 20, 2021
Go Media Framework

Go FFmpeg Bindings Installation Prerequisites Current master branch supports all major Go versions, starting from 1.6. Build/install FFmpeg build last

Dec 30, 2022
Videncode - Media Encoder (with ffmpeg)

Videncode - Media Encoder (with ffmpeg) Powered by yellyoshua (With2 easy steps) - Build JSON with folder of videos > Process the videos to the new fo

Nov 19, 2022
Frf-media-download - This tool downloads all the files you have uploaded to FreeFeed

FreeFeed Media Downloader This tool downloads all the files you have uploaded to

Jan 29, 2022
Golang bindings for FFmpeg

goav Golang binding for FFmpeg A comprehensive binding to the ffmpeg video/audio manipulation library. Usage import "github.com/giorgisio/goav/avforma

Dec 27, 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
Go4vl is Go library for working with the Video for Linux API (V4L2) natively, without any C bindings.

go4vl A Go library for working with the Video for Linux user API (V4L2). Gov4l hides all the complexities of working with V4L2 and exposes idiomatic G

Dec 23, 2022
Package implement reading and writing popular playlist formats: PLS, ASX, M3U, XSPF and others.

go-playlist ⚠️ WARNING The API is not stable yet and can change. Package playlist implement reading and writing popular playlist formats: PLS, ASX, M3

Oct 14, 2021
ffcommander - An easy frontend to FFmpeg and Imagemagick to automatically process video and manipulate subtitles.

% FFCOMMANDER(1) ffcommander 2.39 % Mikael Hartzell (C) 2018 % 2021 Name ffcommander - An easy frontend to FFmpeg and Imagemagick to automatically pro

May 9, 2022
Parse and demux MPEG Transport Streams (.ts) natively in GO

This is a Golang library to natively parse and demux MPEG Transport Streams (ts) in GO. WARNING: this library is not yet production ready. Use at your

Jan 9, 2023
Parse and generate m3u8 playlists for Apple HTTP Live Streaming (HLS) in Golang (ported from gem https://github.com/sethdeckard/m3u8)

go-m3u8 Golang package for m3u8 (ported m3u8 gem https://github.com/sethdeckard/m3u8) go-m3u8 provides easy generation and parsing of m3u8 playlists d

Nov 19, 2022
golang library to read and write various subtitle formats

libgosubs Golang library to read and write subtitles in the following formats Advanced SubStation Alpha v4 SRT TTML v1.0 - This is based on the spec p

Sep 27, 2022
Parser and generator of M3U8-playlists for Apple HLS. Library for Go language. :cinema:

M3U8 This is the most complete opensource library for parsing and generating of M3U8 playlists used in HTTP Live Streaming (Apple HLS) for internet vi

Dec 20, 2022
Plays videos using Prometheus and Grafana, e.g. Bad Apple.
Plays videos using Prometheus and Grafana, e.g. Bad Apple.

prometheus_video_renderer Plays videos using Prometheus and Grafana, e.g. Bad Apple. Modes Currently 3 different modes are supported. Bitmap The bitma

Nov 30, 2022
RTSP 1.0 client and server library for the Go programming language

RTSP 1.0 client and server library for the Go programming language

Jan 3, 2023
falco is VCL parser and linter optimized for Fastly.
falco is VCL parser and linter optimized for Fastly.

falco falco is VCL parser and linter optimized for Fastly. Disclaimer This is a VCL parser, but dedicated to Fastly's VCL (version 2.x), so we don't c

Dec 7, 2022
Desktop application to download videos and playlists from youtube by simply copying its url.
Desktop application to download videos and playlists from youtube by simply copying its url.

tubemp3 Desktop application to download videos and playlists from youtube by simply copying its url. You just need to run tubemp3 and copy (CTRL + C)

Oct 25, 2022