{"id":13529318,"url":"https://github.com/adrg/libvlc-go","last_synced_at":"2025-05-15T10:00:39.871Z","repository":{"id":25436219,"uuid":"28865956","full_name":"adrg/libvlc-go","owner":"adrg","description":"Handcrafted Go bindings for libVLC and high-level media player interface","archived":false,"fork":false,"pushed_at":"2025-03-24T21:16:14.000Z","size":362,"stargazers_count":462,"open_issues_count":9,"forks_count":52,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-14T15:56:54.796Z","etag":null,"topics":["audio","bindings","go","golang","golang-library","libvlc","libvlc-go","media","media-player","player","screen-capture","screen-recorder","sound","video","video-player","vlc","vlc-libvlc","vlc-media-player","vlc-player"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/adrg/libvlc-go/v3","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adrg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"ko_fi":"adrg"}},"created_at":"2015-01-06T14:01:50.000Z","updated_at":"2025-03-30T18:21:38.000Z","dependencies_parsed_at":"2025-03-10T00:52:09.387Z","dependency_job_id":"db3d85b5-a0db-44fc-bb72-784a586beefc","html_url":"https://github.com/adrg/libvlc-go","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrg%2Flibvlc-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrg%2Flibvlc-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrg%2Flibvlc-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrg%2Flibvlc-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adrg","download_url":"https://codeload.github.com/adrg/libvlc-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254319715,"owners_count":22051072,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","bindings","go","golang","golang-library","libvlc","libvlc-go","media","media-player","player","screen-capture","screen-recorder","sound","video","video-player","vlc","vlc-libvlc","vlc-media-player","vlc-player"],"created_at":"2024-08-01T07:00:35.378Z","updated_at":"2025-05-15T10:00:39.003Z","avatar_url":"https://github.com/adrg.png","language":"Go","funding_links":["https://ko-fi.com/adrg","https://ko-fi.com/T6T72WATK"],"categories":["Video","视频","HarmonyOS","Go","Utility","Players \u0026 Clients","视频`视频和流媒体相关库`","Language and platform specific libraries","Bindings"],"sub_categories":["HTTP Clients","实用程序/Miscellaneous","Utility/Miscellaneous","Windows Manager","交流","版本控制","Frameworks \u0026 UI Components","版本控制`版本控制相关库`","Go","Fail injection"],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cdiv\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/adrg/adrg.github.io/master/assets/projects/libvlc-go/logo.svg\" alt=\"libvlc-go logo\"/\u003e\n  \u003c/div\u003e\n\u003c/h1\u003e\n\n\u003ch3 align=\"center\"\u003eHandcrafted Go bindings for libVLC and high-level media player interface\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/adrg/libvlc-go/actions/workflows/lint-v3.yml\"\u003e\n        \u003cimg alt=\"Build status\" src=\"https://img.shields.io/github/actions/workflow/status/adrg/libvlc-go/lint-v3.yml\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://pkg.go.dev/github.com/adrg/libvlc-go/v3\"\u003e\n        \u003cimg alt=\"pkg.go.dev documentation\" src=\"https://img.shields.io/badge/go.dev-reference-007d9c?logo=go\u0026logoColor=white\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://opensource.org/licenses/MIT\" rel=\"nofollow\"\u003e\n        \u003cimg alt=\"MIT license\" src=\"https://img.shields.io/github/license/adrg/libvlc-go\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/avelino/awesome-go#video\"\u003e\n        \u003cimg alt=\"Awesome Go\" src=\"https://awesome.re/mentioned-badge.svg\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://ko-fi.com/T6T72WATK\"\u003e\n        \u003cimg alt=\"Buy me a coffee\" src=\"https://img.shields.io/static/v1.svg?label=%20\u0026message=Buy%20me%20a%20coffee\u0026color=579fbf\u0026logo=buy%20me%20a%20coffee\u0026logoColor=white\"/\u003e\n    \u003c/a\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://goreportcard.com/report/github.com/adrg/libvlc-go\"\u003e\n        \u003cimg alt=\"Go report card\" src=\"https://goreportcard.com/badge/github.com/adrg/libvlc-go\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/adrg/libvlc-go/graphs/contributors\"\u003e\n        \u003cimg alt=\"GitHub contributors\" src=\"https://img.shields.io/github/contributors/adrg/libvlc-go\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://discord.gg/3h3K3JF\"\u003e\n        \u003cimg alt=\"Discord channel\" src=\"https://img.shields.io/discord/716939396464508958?label=discord\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/adrg/libvlc-go/issues?q=is%3Aopen+is%3Aissue\"\u003e\n        \u003cimg alt=\"GitHub open issues\" src=\"https://img.shields.io/github/issues-raw/adrg/libvlc-go\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/adrg/libvlc-go/issues?q=is%3Aissue+is%3Aclosed\"\u003e\n        \u003cimg alt=\"GitHub closed issues\" src=\"https://img.shields.io/github/issues-closed-raw/adrg/libvlc-go\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\nThe package can be useful for adding multimedia capabilities to applications\nthrough the provided player interfaces. It relies on Go modules in order to\nmirror each supported major version of [libVLC](https://www.videolan.org/vlc/libvlc.html).\n\nDocumentation for v3, which implements bindings for libVLC 3.X, can be found on [pkg.go.dev](https://pkg.go.dev/github.com/adrg/libvlc-go/v3).  \nDocumentation for v2, which implements bindings for libVLC 2.X, can be found on [pkg.go.dev](https://pkg.go.dev/github.com/adrg/libvlc-go/v2).\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/adrg/libvlc-go-examples/tree/master/v3/gtk3_player\"\u003e\n      \u003cimg align=\"center\" width=\"49%\" alt=\"libvlc-go media player\" src=\"https://raw.githubusercontent.com/adrg/adrg.github.io/master/assets/projects/libvlc-go/gtk3-media-player-example/libvlc-gtk3-media-player.jpg\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/adrg/libvlc-go-examples/tree/master/v3/gtk3_screen_recorder\"\u003e\n      \u003cimg align=\"center\" width=\"49%\" alt=\"libvlc-go screen recorder\" src=\"https://raw.githubusercontent.com/adrg/adrg.github.io/master/assets/projects/libvlc-go/gtk3-screen-recorder-example/libvlc-gtk3-screen-recorder.jpg\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/adrg/libvlc-go-examples/tree/master/v3/gtk3_equalizer\"\u003e\n      \u003cimg align=\"center\" width=\"49%\" alt=\"libvlc-go equalizer\" src=\"https://raw.githubusercontent.com/adrg/adrg.github.io/master/assets/projects/libvlc-go/gtk3-equalizer-example/libvlc-gtk3-equalizer.jpg\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/adrg/libvlc-go-examples/tree/master/v3/gtk3_media_discovery\"\u003e\n      \u003cimg align=\"center\" width=\"49%\" alt=\"libvlc-go media discovery\" src=\"https://raw.githubusercontent.com/adrg/adrg.github.io/master/assets/projects/libvlc-go/gtk3-media-discovery-example/libvlc-gtk3-media-discovery.jpg\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\nExample applications:\n\n* [GUI media player](https://github.com/adrg/libvlc-go-examples/tree/master/v3/gtk3_player)\n* [GUI screen recorder](https://github.com/adrg/libvlc-go-examples/tree/master/v3/gtk3_screen_recorder)\n* [GUI equalizer](https://github.com/adrg/libvlc-go-examples/tree/master/v3/gtk3_equalizer)\n* [GUI media discovery](https://github.com/adrg/libvlc-go-examples/tree/master/v3/gtk3_media_discovery)\n\n## Prerequisites\n\nThe libVLC development files are required. Instructions for installing the\nVLC SDK on multiple operating systems can be found on the wiki pages of this project.\n\n- [Install on Linux](https://github.com/adrg/libvlc-go/wiki/Install-on-Linux)\n- [Install on Windows](https://github.com/adrg/libvlc-go/wiki/Install-on-Windows)\n- [Install on macOS](https://github.com/adrg/libvlc-go/wiki/Install-on-macOS)\n\n## Installation\n\nIn order to support multiple versions of libVLC, the package contains a Go\nmodule for each major version of the API. Choose an installation option\ndepending on the version of libVLC you want to use.\n\n**libVLC v3.X**\n\n```bash\ngo get github.com/adrg/libvlc-go/v3\n```\n\n**libVLC v2.X**\n\n```bash\ngo get github.com/adrg/libvlc-go/v2\n\n# Build for libVLC \u003c v2.2.0\ngo build -tags legacy\n```\n\nAll versions above also work for projects which are not using Go modules.\nHowever, consider switching to modules.\n\n## Examples\n\n* [GTK 3 media player](https://github.com/adrg/libvlc-go-examples/tree/master/v3/gtk3_player) (using [gotk3](https://github.com/gotk3/gotk3))\n* [GTK 3 screen recorder](https://github.com/adrg/libvlc-go-examples/tree/master/v3/gtk3_screen_recorder) (using [gotk3](https://github.com/gotk3/gotk3))\n* [GTK 3 media discovery](https://github.com/adrg/libvlc-go-examples/tree/master/v3/gtk3_media_discovery) (using [gotk3](https://github.com/gotk3/gotk3))\n* [GTK 3 equalizer](https://github.com/adrg/libvlc-go-examples/tree/master/v3/gtk3_equalizer) (using [gotk3](https://github.com/gotk3/gotk3))\n* [GTK 2 media player](https://github.com/adrg/libvlc-go-examples/tree/master/v3/gtk2_player) (using [go-gtk](https://github.com/mattn/go-gtk))\n* [GTK 2 screen recorder](https://github.com/adrg/libvlc-go-examples/tree/master/v3/gtk2_screen_recorder) (using [go-gtk](https://github.com/mattn/go-gtk))\n* [Basic player usage](https://github.com/adrg/libvlc-go-examples/blob/master/v3/player/player.go)\n* [Basic list player usage](https://github.com/adrg/libvlc-go-examples/tree/master/v3/list_player/list_player.go)\n* [Handling events](https://github.com/adrg/libvlc-go-examples/tree/master/v3/event_handling/event_handling.go)\n* [Retrieve media tracks](https://github.com/adrg/libvlc-go-examples/blob/master/v3/media_tracks/media_tracks.go)\n* [Retrieve media information](https://github.com/adrg/libvlc-go-examples/blob/master/v3/media_information/media_information.go)\n* [Display screen as player media](https://github.com/adrg/libvlc-go-examples/blob/master/v3/display_screen_media/display_screen_media.go)\n* [Stream media to Chromecast](https://github.com/adrg/libvlc-go-examples/blob/master/v3/chromecast_streaming/chromecast_streaming.go)\n* [Player equalizer usage](https://github.com/adrg/libvlc-go-examples/blob/master/v3/equalizer/equalizer.go)\n\nExamples for all supported API versions can be found at https://github.com/adrg/libvlc-go-examples.\n\n## Usage\n\n```go\npackage main\n\nimport (\n    \"log\"\n\n    vlc \"github.com/adrg/libvlc-go/v3\"\n)\n\nfunc main() {\n    // Initialize libVLC. Additional command line arguments can be passed in\n    // to libVLC by specifying them in the Init function.\n    if err := vlc.Init(\"--no-video\", \"--quiet\"); err != nil {\n        log.Fatal(err)\n    }\n    defer vlc.Release()\n\n    // Create a new player.\n    player, err := vlc.NewPlayer()\n    if err != nil {\n        log.Fatal(err)\n    }\n    defer func() {\n        player.Stop()\n        player.Release()\n    }()\n\n    // Add a media file from path or from URL.\n    // Set player media from path:\n    // media, err := player.LoadMediaFromPath(\"localpath/test.mp4\")\n    // Set player media from URL:\n    media, err := player.LoadMediaFromURL(\"http://stream-uk1.radioparadise.com/mp3-32\")\n    if err != nil {\n        log.Fatal(err)\n    }\n    defer media.Release()\n\n    // Retrieve player event manager.\n    manager, err := player.EventManager()\n    if err != nil {\n        log.Fatal(err)\n    }\n\n    // Register the media end reached event with the event manager.\n    quit := make(chan struct{})\n    eventCallback := func(event vlc.Event, userData interface{}) {\n        close(quit)\n    }\n\n    eventID, err := manager.Attach(vlc.MediaPlayerEndReached, eventCallback, nil)\n    if err != nil {\n        log.Fatal(err)\n    }\n    defer manager.Detach(eventID)\n\n    // Start playing the media.\n    err = player.Play()\n    if err != nil {\n        log.Fatal(err)\n    }\n\n    \u003c-quit\n}\n```\n\n## In action\n\nA list of projects using libvlc-go, in alphabetical order. If you want to\nshowcase your project in this section, please create a pull request with it.\n\n- [Alio](https://github.com/fenimore/alio) - Command-line music player with Emacs style key bindings.\n- [Tripbot](https://github.com/adanalife/tripbot) - An ongoing 24/7 slow-TV art project.\n\n## Stargazers over time\n\n[![Stargazers over time](https://starchart.cc/adrg/libvlc-go.svg)](https://starchart.cc/adrg/libvlc-go)\n\n## Contributing\n\nContributions in the form of pull requests, issues or just general feedback,\nare always welcome.  \nSee [CONTRIBUTING.MD](CONTRIBUTING.md).\n\n**Contributors**:\n[adrg](https://github.com/adrg),\n[fenimore](https://github.com/fenimore),\n[tarrsalah](https://github.com/tarrsalah),\n[danielpellon](https://github.com/danielpellon),\n[patknight](https://github.com/patknight),\n[sndnvaps](https://github.com/sndnvaps),\n[karlpip](https://github.com/karlpip).\n\n## Discord server\n\nlibvlc-go is part of the libVLC Discord Community [server](https://discord.gg/3h3K3JF). Feel free to come say hello!\n\n## References\n\nFor more information see the\n[libVLC](https://www.videolan.org/developers/vlc/doc/doxygen/html/group__libvlc.html) documentation.\n\n## License\n\nCopyright (c) 2018 Adrian-George Bostan.\n\nThis project is licensed under the [MIT license](https://opensource.org/licenses/MIT).\nSee [LICENSE](LICENSE) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrg%2Flibvlc-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadrg%2Flibvlc-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrg%2Flibvlc-go/lists"}