All Projects → muxinc → mux-python

muxinc / mux-python

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

Programming Languages

python
139335 projects - #7 most used programming language
Mustache
554 projects

Projects that are alternatives of or similar to mux-python

mux-go
Official Mux API wrapper for golang projects, supporting both Mux Data and Mux Video.
Stars: ✭ 69 (+102.94%)
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 (+20.59%)
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 (-47.06%)
Mutual labels:  video-processing, video-streaming
Server
The Kaltura Platform Backend. To install Kaltura, visit the install packages repository.
Stars: ✭ 293 (+761.76%)
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 (+1182.35%)
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 (+47.06%)
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 (+188.24%)
Mutual labels:  video-processing, video-streaming
CrowdFlow
Optical Flow Dataset and Benchmark for Visual Crowd Analysis
Stars: ✭ 87 (+155.88%)
Mutual labels:  video-processing, video-analytics
Vidgear
A High-performance cross-platform Video Processing Python framework powerpacked with unique trailblazing features 🔥
Stars: ✭ 2,048 (+5923.53%)
Mutual labels:  video-processing, video-streaming
Awesome Video
A curated list of awesome video frameworks, libraries, specifications and software.
Stars: ✭ 124 (+264.71%)
Mutual labels:  video-processing, video-streaming
gilfoyle
Distributed video encoding, hosting and streaming (WIP)
Stars: ✭ 73 (+114.71%)
Mutual labels:  video-processing, video-streaming
tator
Video analytics web platform
Stars: ✭ 66 (+94.12%)
Mutual labels:  video-processing, video-analytics
SSffmpegVideoOperation
This is a library of FFmpeg for android... 📸 🎞 🚑
Stars: ✭ 261 (+667.65%)
Mutual labels:  video-processing, video-streaming
pyanime4k
An easy way to use anime4k in python
Stars: ✭ 80 (+135.29%)
Mutual labels:  video-processing
FunCrop
Video Split Effect: a lots of transition effect in a video.
Stars: ✭ 42 (+23.53%)
Mutual labels:  video-processing
Tako-Play
A Mobile App To Watch Anime Online With No Ads !!
Stars: ✭ 78 (+129.41%)
Mutual labels:  video-streaming
go-mux-jwt-boilerplate
Golang REST API using MUX, GORM, and JWT for authentication
Stars: ✭ 41 (+20.59%)
Mutual labels:  mux
KTVideoMonitor
📹KTVideoMonitor视频监控Demo-基于ijkPlayer的网络播放器,支持HTTP、RTMP、HLS(m3u8)、本地视频等多种格式
Stars: ✭ 22 (-35.29%)
Mutual labels:  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 (+2.94%)
Mutual labels:  video-streaming
PororoQA
PororoQA, https://arxiv.org/abs/1707.00836
Stars: ✭ 26 (-23.53%)
Mutual labels:  video-processing

Mux Python Banner

Mux Python

Official Mux API wrapper for python 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.

Requirements

Python 2.7 or 3.4+

Compatibility with Ubuntu 14.04

Mux uses cross signed TLS root certificates, which may not be compatible with Ubuntu 14.04 LTS as documented in this issue. We suggest upgrading to a later LTS operating system if you encounter this issue.

Installation

Via pip

pip install git+https://github.com/muxinc/mux-python.git

(you may need to run pip with root permission)

Via source

git checkout https://github.com/muxinc/mux-python.git
cd mux-python
python setup.py install --user

Getting Started

Overview

Mux Python 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-python to list the Video assets stored in your Mux account.

Be sure to also checkout the examples directory:

There's also example usage of every API call (also used for testing):

import os
import mux_python
from mux_python.rest import ApiException

# Authentication Setup
configuration = mux_python.Configuration()
configuration.username = os.environ['MUX_TOKEN_ID']
configuration.password = os.environ['MUX_TOKEN_SECRET']

# API Client Initialization
assets_api = mux_python.AssetsApi(mux_python.ApiClient(configuration))

# List Assets
print("Listing Assets: \n")
try:
    list_assets_response = assets_api.list_assets()
    for asset in list_assets_response.data:
        print('Asset ID: ' + asset.id)
        print('Status: ' + asset.status)
        print('Duration: ' + str(asset.duration) + "\n")
except ApiException as e:
    print("Exception when calling AssetsApi->list_assets: %s\n" % e)

Exceptions & Error Handling

All exceptions inherit from ApiException, you can catch it as in the example above, or you can catch one of the more specific exceptions below. You can check the fields error_type and error_messages in all Exceptions to see what error the Mux API reported.

NotFoundException

NotFoundException is thrown when a resource is not found. This is useful when trying to get an entity by its ID, for example get_asset("some-id-here") in the AssetsApi.

UnauthorizedException

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

ServiceException

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

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