Go bindings for libVLC and high-level media player interface

Overview

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.

Issues
  • Embed VLC rather than floating window?

    Embed VLC rather than floating window?

    This project launches a new window for VLC. Can we embed the VLC player inside another GUI toolkit, like GTK rather than spawning a new window?

    opened by erikherz 19
  • 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!

    opened by dmerrick 14
  • 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
    
    
    opened by ericsartor 14
  • help! libvlc-go can not run

    help! libvlc-go can not run

    when I run the useage code It report like this: Module must be initialized first

    opened by biij5698 13
  • 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.

    opened by masseelch 10
  • 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"

    opened by advancedwebdeveloper 9
  • 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?

    opened by bakurits 8
  • 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!

    enhancement 
    opened by dmerrick 7
  • 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?

    opened by matejbizjak 6
  • 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

    opened by gallex 6
  • [bug] MediaPlayerEndReached Event not thrown reliably

    [bug] MediaPlayerEndReached Event not thrown reliably

    I am playing several videos after another in a loop. One of the videos is this one. After a while my video loop hangs because the EventManager does not receive the MediaPlayerEndReached even though the video has ended.

    I do not know how to reproduce this issue but it does only happen to the linked video. Several others I tested work fine.

    opened by masseelch 3
  • 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.

    help wanted 
    opened by adrg 7
Releases(v3.1.4)
  • v3.1.4(Mar 31, 2021)

    Changelog

    New bindings

    • Added vlc.ListAudioOutputDevices method
    • Added Player.AudioOutputDevices method
    • Added Player.AudioOutputDevice and Player.SetAudioOutputDevice methods
    • Added Player.Role and Player.GetRole methods
    • Added Player.UpdateVideoViewpoint method
    • Added Player.VideoDimensions method
    • Added Player.CursorPosition method

    New examples

    Misc

    • Fixed relevant golangci-lint notices
    • Improved documentation
    Source code(tar.gz)
    Source code(zip)
  • v2.1.3(Mar 31, 2021)

    Changelog

    New bindings

    • Added vlc.ListAudioOutputDevices method
    • Added Player.AudioOutputDevices method
    • Added Player.SetAudioOutputDevice method
    • Added Player.VideoDimensions method
    • Added Player.CursorPosition method

    New examples

    Misc

    • Fixed relevant golangci-lint notices
    • Improved documentation
    Source code(tar.gz)
    Source code(zip)
  • v3.1.3(Mar 23, 2021)

  • v3.1.2(Mar 4, 2021)

    Changelog

    • Added equalizer support
    • Added Player.StereoMode and Player.SetStereoMode bindings
    • Added Player.SetEqualizer binding
    • Improved documentation
    • Added player equalizer usage example
    Source code(tar.gz)
    Source code(zip)
  • v2.1.2(Mar 4, 2021)

    Changelog

    • Added equalizer support
    • Added Player.StereoMode and Player.SetStereoMode bindings
    • Added Player.SetEqualizer binding
    • Improved documentation
    • Added player equalizer usage example
    Source code(tar.gz)
    Source code(zip)
  • v3.1.1(Feb 18, 2021)

    Changelog

    • Added Player.AudioDelay and Player.SetAudioDelay
    • Added Player.SubtitleDelay and Player.SetSubtitleDelay
    • Added Add Player.VideoTrackID and Player.SetVideoTrack
    • Added Player.AudioTrackID and Player.SetAudioTrack
    • Added Player.SubtitleTrackID and Player.SetSubtitleTrack
    • Added Player.VideoTrackCount, Player.AudioTrackCount and Player.SubtitleTrackCount
    • Added Player.VideoTrackDescriptors, Player.AudioTrackDescriptors and Player.SubtitleTrackDescriptors
    Source code(tar.gz)
    Source code(zip)
  • v2.1.1(Feb 18, 2021)

    Changelog

    • Added Player.AudioDelay and Player.SetAudioDelay
    • Added Player.SubtitleDelay and Player.SetSubtitleDelay
    • Added Add Player.VideoTrackID and Player.SetVideoTrack
    • Added Player.AudioTrackID and Player.SetAudioTrack
    • Added Player.SubtitleTrackID and Player.SetSubtitleTrack
    • Added Player.VideoTrackCount, Player.AudioTrackCount and Player.SubtitleTrackCount
    • Added Player.VideoTrackDescriptors, Player.AudioTrackDescriptors and Player.SubtitleTrackDescriptors
    Source code(tar.gz)
    Source code(zip)
  • v3.1.0(Feb 7, 2021)

    Changelog

    • Added renderer functionality
    • Added renderer discovery functionality
    • Added Player.SetRenderer binding
    • Added stream media to Chromecast example
    • Internal event management improvements
    • Allow detaching multiple events using EventManager.Detach
    Source code(tar.gz)
    Source code(zip)
  • v2.1.0(Feb 7, 2021)

  • v3.0.9(Jan 28, 2021)

    Changelog

    • Added vlc.NewMediaFromReadSeeker
    • Added Player.LoadMediaFromReadSeeker
    • Added MediaList.AddMediaFromReadSeeker and MediaList.InsertMediaFromReadSeeker
    • Added Media.UserData
    • Added Media.SetUserData
    • Improved error handling and resource management
    • Miscellaneous internal improvements
    • Improved documentation
    Source code(tar.gz)
    Source code(zip)
  • v2.0.9(Jan 28, 2021)

    Changelog

    • Added Media.UserData
    • Added Media.SetUserData
    • Improved error handling and resource management
    • Miscellaneous internal improvements
    • Improved documentation
    Source code(tar.gz)
    Source code(zip)
  • v2.0.8(Dec 29, 2020)

    Changelog

    • Add Media.Duplicate binding
    • Add Player.IsMuted, Player.SetMute and Player.ToggleMute bindings
    • Add Player.Scale and Player.SetScale bindings
    • Add Player.AspectRatio and Player.SetAspectRatio bindings
    • Add Player.NextFrame binding
    • Improve documentation
    Source code(tar.gz)
    Source code(zip)
  • v3.0.8(Dec 29, 2020)

    Changelog

    • Add Media.Duplicate binding
    • Add Player.IsMuted, Player.SetMute and Player.ToggleMute bindings
    • Add Player.Scale and Player.SetScale bindings
    • Add Player.AspectRatio and Player.SetAspectRatio bindings
    • Add Player.NextFrame binding
    • Improve documentation
    Source code(tar.gz)
    Source code(zip)
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

Alexander I.Grafov 841 Jul 17, 2021
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

Michał Derkacz 159 Apr 20, 2021
Personal video streaming server.

tube This is a Golang project to build a self hosted "tube"-style video player for watching your own video collection over HTTP or hosting your own ch

davy wybiral 199 Jul 15, 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

alex 695 Jul 23, 2021
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

Tan Quang Ngo 75 Jun 2, 2021
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

H. Giorgis 1.7k Jul 24, 2021
RTSP 1.0 client and server library for the Go programming language

RTSP 1.0 client and server library for the Go programming language

Alessandro Ros 97 Jul 14, 2021
live video streaming server in golang

中文 Simple and efficient live broadcast server: Very simple to install and use; Pure Golang, high performance, and cross-platform; Supports commonly us

浩麟 6.8k Jul 19, 2021
LiveKit - Open source, distributed video/audio rooms over WebRTC

LiveKit is an open source project that provides scalable, multi-user conferencing over WebRTC. It's designed to give you everything you need to build real time video/audio capabilities in your applications.

LiveKit 1.5k Jul 27, 2021
Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Take control over your content and stream it yourself. Explore the docs » View Demo · Use Our Server for Testing · FAQ · Report Bug Table of Contents

Owncast 4.9k Jul 20, 2021
🔥 Golang live stream lib/client/server. support RTMP/RTSP/HLS/HTTP[S]-FLV/HTTP-TS, H264/H265/AAC, relay, cluster, record, HTTP API/Notify, GOP cache. 官方文档见 https://pengrl.com/lal

lal是一个开源GoLang直播流媒体网络传输项目,包含三个主要组成部分: lalserver:流媒体转发服务器。类似于nginx-rtmp-module等应用,但支持更多的协议,提供更丰富的功能。lalserver简介 demo:一些小应用,比如推、拉流客户端,压测工具,流分析工具,调度示例程序等

yoko 598 Jul 19, 2021
👾 Annie is a fast, simple and clean video downloader built with Go.

?? Annie is a fast, simple and clean video downloader built with Go. Installation Prerequisites Install via go get Homebrew (macOS only) Arch Linux Vo

Xinzhao Xu 15.1k Jul 24, 2021
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

Yoshiaki Sugimoto 20 Jul 15, 2021
A Go implementation of fluent-ffmpeg

A Go implementation of fluent-ffmpeg

Modfy 274 Jul 15, 2021