All Projects → adrg → Libvlc Go

adrg / Libvlc Go

Licence: mit
Go bindings for libVLC and high-level media player interface

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Libvlc Go

react-native-vlc-media-player
React native media player for video streaming and playing. Supports RTSP, RTMP and other protocols supported by VLC player
Stars: ✭ 221 (+17.55%)
Mutual labels:  player, video-player, media, media-player, vlc
Python Mpv
Python interface to the awesome mpv media player
Stars: ✭ 245 (+30.32%)
Mutual labels:  bindings, audio, media, media-player
React Native Jw Media Player
React-Native Android/iOS bridge for JWPlayer SDK (https://www.jwplayer.com/)
Stars: ✭ 76 (-59.57%)
Mutual labels:  audio, player, media, media-player
Pandoraplayer
🅿️ PandoraPlayer is a lightweight music player for iOS, based on AudioKit and completely written in Swift.
Stars: ✭ 1,037 (+451.6%)
Mutual labels:  audio, player, media, sound
Monstercat Visualizer
A real time audio visualizer for Rainmeter similar to the ones used in the Monstercat videos.
Stars: ✭ 571 (+203.72%)
Mutual labels:  audio, player, media, media-player
Vuejs Sound Player
▶️ 🎹 🎵 HTML5 <audio> tag sound player UI for Vue.js - supports single, loop, pause/stop modes etc
Stars: ✭ 164 (-12.77%)
Mutual labels:  audio, player, sound
Xamarinmediamanager
Cross platform Xamarin plugin to play and control Audio and Video
Stars: ✭ 647 (+244.15%)
Mutual labels:  audio, player, media
Streama
Self hosted streaming media server. https://docs.streama-project.com/
Stars: ✭ 8,948 (+4659.57%)
Mutual labels:  video-player, media, media-player
Ktvhttpcache
A powerful media cache framework.
Stars: ✭ 2,113 (+1023.94%)
Mutual labels:  audio, player, media
Pbjvideoplayer
▶️ video player, simple way to play and stream media on iOS/tvOS
Stars: ✭ 620 (+229.79%)
Mutual labels:  player, video-player, media
Sjmediacacheserver
A HTTP Media Caching Framework. It can cache FILE or HLS media. 音视频边播边缓存框架, 支持 HLS(m3u8) 和 FILE(mp4, mp3等).
Stars: ✭ 87 (-53.72%)
Mutual labels:  audio, player, media
Glow
mpv Config File Generator for Windows
Stars: ✭ 167 (-11.17%)
Mutual labels:  audio, video-player, media-player
Swiftysound
SwiftySound is a simple library that lets you play sounds with a single line of code.
Stars: ✭ 995 (+429.26%)
Mutual labels:  audio, player, sound
Universalvideoview
A better Android VideoView with more Media Controller customization. 一个更好用的Android VideoView
Stars: ✭ 941 (+400.53%)
Mutual labels:  player, media, media-player
Sbplayerclient
支持全格式的mac版视频播放器
Stars: ✭ 110 (-41.49%)
Mutual labels:  audio, player, video-player
Avideo
Create Your Own Broadcast Network With AVideo Platform Open-Source. OAVP OVP
Stars: ✭ 1,329 (+606.91%)
Mutual labels:  video-player, media, media-player
Vue Howler
[UNMAINTAINED] A Howler.js mixin for Vue 2 that makes it easy to create custom audio player components
Stars: ✭ 103 (-45.21%)
Mutual labels:  audio, player, media-player
Vime
Customizable, extensible, accessible and framework agnostic media player. Modern alternative to Video.js and Plyr. Supports HTML5, HLS, Dash, YouTube, Vimeo, Dailymotion...
Stars: ✭ 1,928 (+925.53%)
Mutual labels:  audio, player, media
Player
▶️ video player in Swift, simple way to play and stream media on iOS/tvOS
Stars: ✭ 1,849 (+883.51%)
Mutual labels:  player, video-player, media
React Player
A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion
Stars: ✭ 5,931 (+3054.79%)
Mutual labels:  audio, player, media

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].