All Projects → muxinc → mux-go

muxinc / mux-go

Licence: MIT License
Official Mux API wrapper for golang projects, supporting both Mux Data and Mux Video.

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to mux-go

mux-python
Official Mux API wrapper for python projects, supporting both Mux Data and Mux Video.
Stars: ✭ 34 (-50.72%)
Mutual labels:  video-processing, video-streaming, mux, video-analytics
Mux Elixir
Official Mux API wrapper for Elixir projects, supporting both Mux Data and Mux Video.
Stars: ✭ 41 (-40.58%)
Mutual labels:  video-processing, video-streaming, mux
tssi2
tssi2 is a header-only library for parsing MPEG-2 and DVB Transport Streams in the domain of multimedia processing applications.
Stars: ✭ 18 (-73.91%)
Mutual labels:  video-processing, video-streaming
Server
The Kaltura Platform Backend. To install Kaltura, visit the install packages repository.
Stars: ✭ 293 (+324.64%)
Mutual labels:  video-processing, video-streaming
Screen Recorder Ffmpeg Cpp
*Multimedia project* A screen recording application to capture your desktop and store in a video format. Click here to watch the demo
Stars: ✭ 98 (+42.03%)
Mutual labels:  video-processing, video-streaming
laav
Asynchronous Audio / Video Library for H264 / MJPEG / OPUS / AAC / MP2 encoding, transcoding, recording and streaming from live sources
Stars: ✭ 50 (-27.54%)
Mutual labels:  video-processing, video-streaming
Platform Install Packages
Official deployment packages to install the Kaltura platform on a server or cluster environments using native OS package managers
Stars: ✭ 436 (+531.88%)
Mutual labels:  video-processing, video-streaming
Awesome Video
A curated list of awesome video frameworks, libraries, specifications and software.
Stars: ✭ 124 (+79.71%)
Mutual labels:  video-processing, video-streaming
CrowdFlow
Optical Flow Dataset and Benchmark for Visual Crowd Analysis
Stars: ✭ 87 (+26.09%)
Mutual labels:  video-processing, video-analytics
Vidgear
A High-performance cross-platform Video Processing Python framework powerpacked with unique trailblazing features 🔥
Stars: ✭ 2,048 (+2868.12%)
Mutual labels:  video-processing, video-streaming
gilfoyle
Distributed video encoding, hosting and streaming (WIP)
Stars: ✭ 73 (+5.8%)
Mutual labels:  video-processing, video-streaming
tator
Video analytics web platform
Stars: ✭ 66 (-4.35%)
Mutual labels:  video-processing, video-analytics
SSffmpegVideoOperation
This is a library of FFmpeg for android... 📸 🎞 🚑
Stars: ✭ 261 (+278.26%)
Mutual labels:  video-processing, video-streaming
amazon-ivs-chime-web-demo
A demo web application intended as an educational tool for demonstrating how to load and play Amazon IVS streams alongside the Amazon Chime SDK.
Stars: ✭ 35 (-49.28%)
Mutual labels:  video-streaming
gst-sync-server
A library for synchronised network playback applications
Stars: ✭ 56 (-18.84%)
Mutual labels:  video-streaming
PororoQA
PororoQA, https://arxiv.org/abs/1707.00836
Stars: ✭ 26 (-62.32%)
Mutual labels:  video-processing
Image Processing
Image Processing techniques using OpenCV and Python.
Stars: ✭ 112 (+62.32%)
Mutual labels:  video-processing
pyanime4k
An easy way to use anime4k in python
Stars: ✭ 80 (+15.94%)
Mutual labels:  video-processing
glip-lib
An OpenGL Image Processing Library (in C++/GLSL).
Stars: ✭ 14 (-79.71%)
Mutual labels:  video-processing
Acid.Cam.v2.OSX
Acid Cam v2 for macOS distorts video to create art.
Stars: ✭ 91 (+31.88%)
Mutual labels:  video-processing

Mux Go Banner

GoDoc

Mux Go

Official Mux API wrapper for golang projects, supporting both Mux Data and Mux Video.

Mux Video is an API-first platform, powered by data and designed by video experts to make beautiful video possible for every development team.

Mux Data is a platform for monitoring your video streaming performance with just a few lines of code. Get in-depth quality of service analytics on web, mobile, and OTT devices.

Not familiar with Mux? Check out https://mux.com/ for more information.

Installation

go get github.com/muxinc/mux-go/v4

Getting Started

Overview

Mux Go is a code generated lightweight wrapper around the Mux REST API and reflects them accurately. This has a few consequences you should watch out for:

  1. For almost all API responses, the object you're looking for will be in the data field on the API response object, as in the example below. This is because we designed our APIs with similar concepts to the JSON:API standard. This means we'll be able to return more metadata from our API calls (such as related entities) without the need to make breaking changes to our APIs. We've decided not to hide that in this library.

  2. We don't use a lot of object orientation. For example API calls that happen on a single asset don't exist in the asset class, but are API calls in the AssetsApi which require an asset ID.

Authentication

To use the Mux API, you'll need an access token and a secret. Details on obtaining these can be found here in the Mux documentation.

Its up to you to manage your token and secret. In our examples, we read them from MUX_TOKEN_ID and MUX_TOKEN_SECRET in your environment.

Example Usage

Below is a quick example of using mux-go to list the Video assets stored in your Mux account.

Be sure to also checkout the exmples directory.

package main

import (
	"fmt"
	"os"

	"github.com/muxinc/mux-go/v4"
)

func main() {
	// API Client Init
	client := muxgo.NewAPIClient(
		muxgo.NewConfiguration(
			muxgo.WithBasicAuth(os.Getenv("MUX_TOKEN_ID"), os.Getenv("MUX_TOKEN_SECRET")),
		))

	// List Assets
	fmt.Println("Listing Assets...\n")
	r, err := client.AssetsApi.ListAssets()
	if err != nil {
		fmt.Printf("err: %s \n\n", err)
		os.Exit(255)
	}
	for _, asset := range r.Data {
		fmt.Printf("Asset ID: %s\n", asset.Id)
		fmt.Printf("Status: %s\n", asset.Status)
		fmt.Printf("Duration: %f\n\n", asset.Duration)
	}
}

Errors & Error Handling

All API calls return an err as their final return value. Below is documented the errors you might want to check for. You can check error.Body on all errors to see the full HTTP response.

BadRequestError

BadRequestError is returned when a you make a bad request to Mux, this likely means you've passed in an invalid parameter to the API call.

UnauthorizedError

UnauthorizedError is returned when Mux cannot authenticate your request. You should check you have configured your credentials correctly.

ForbiddenError

ForbiddenError is returned you don't have permission to access that resource. You should check you have configured your credentials correctly.

NotFoundError

NotFoundError is returned when a resource is not found. This is useful when trying to get an entity by its ID.

TooManyRequestsError

TooManyRequestsError is returned when you exceed the maximum number of requests allowed for a given time period. Please get in touch with [email protected] if you need to talk about this limit.

ServiceError

ServiceError is returned when Mux returns a HTTP 5XX Status Code. If you encounter this reproducibly, please get in touch with [email protected].

GenericOpenAPIError

GenericOpenAPIError is a fallback Error which may be returned in some edge cases. This will be deprecated in a later release but remains present for API compatibility.

Documentation

Be sure to check out the documentation in the docs directory.

Issues

If you run into problems, please raise a GitHub issue, filling in the issue template. We'll take a look as soon as possible.

Contributing

Please do not submit PRs against this package. It is generated from our OpenAPI definitions - Please open an issue instead!

License

MIT License. Copyright 2019 Mux, Inc.

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].