Giter VIP home page Giter VIP logo

goobs's Introduction

goobs

Protocol Version Documentation Build Status Go Report

Interact with OBS Studio from Go!

installation

To use this library in your project, add it as a module after you've initialized your own:

go mod init github.com/beautifulperson/my-cool-obs-thinggo get github.com/onthegit/goobs

usage

The following example connects to the server and prints out some versions.

Check out the docs for more info, or just jump right into the other examples!

package main

import (
	"fmt"

	"github.com/onthegit/goobs"
)

func main() {
	client, err := goobs.New("localhost:4455", goobs.WithPassword("goodpassword"))
	if err != nil {
		panic(err)
	}
	defer client.Disconnect()

	version, err := client.General.GetVersion()
	if err != nil {
		panic(err)
	}

	fmt.Printf("OBS Studio version: %s\n", version.ObsVersion)
	fmt.Printf("Server protocol version: %s\n", version.ObsWebSocketVersion)
	fmt.Printf("Client protocol version: %s\n", goobs.ProtocolVersion)
	fmt.Printf("Client library version: %s\n", goobs.LibraryVersion)
}

The corresponding output:

go run _examples/basic/main.go
OBS Studio version: 30.1.0
Server protocol version: 5.4.2
Client protocol version: 5.4.2
Client library version: 1.2.2

goobs's People

Contributors

andreykaipov avatar dependabot[bot] avatar cathy-cloud[bot] avatar onthegit avatar afriza avatar muesli avatar immortald avatar gambloide avatar lnqs avatar thisguycodes avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.