Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

History

README.md

Bitmovin Python API SDK Examples Header

This folder contains examples demonstrating usage of the Bitmovin Python API SDK

license

💡 Getting Started

You'll need an active Bitmovin API key for these examples to work.

Don't have an account yet? Sign up for a free Bitmovin trial plan!

If you are new to the topic, we suggest reading our tutorial Understanding the Bitmovin Encoding Object Model to get a basic idea of the building blocks that make up an encoding.

For full documentation of all available API endpoints, see the Bitmovin API reference.

Prepare the configuration environment

Configuration parameters will be retrieved from these sources in the listed order:

  1. Command line arguments passed when running the example (E.g.: BITMOVIN_API_KEY=xyz)
  2. A properties file located in the root folder of the Python examples at ./examples.properties (see examples.properties.template as reference)
  3. Environment variables
  4. A properties file located in the home folder at ~/.bitmovin/examples.properties (see examples.properties.template as reference)

Here is an example of an examples.properties file:

BITMOVIN_API_KEY=my-secret-d9fa-4f3b-b7a4-92c67a6d5056
HTTP_INPUT_HOST=my-storage.biz
HTTP_INPUT_FILE_PATH=/path/to/my/input/file.mkv
S3_OUTPUT_BUCKET_NAME=my-s3-bucket-name
S3_OUTPUT_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE
S3_OUTPUT_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
S3_OUTPUT_BASE_PATH=/output/finest/encodings

How can I run an example?

Linux

Execute run_example.sh with the name of the desired example as first parameter, followed by a list of configuration parameters if needed.

run-example.sh multi_codec_encoding --BITMOVIN_API_KEY=your-api-key --HTTP_INPUT_HOST=my-storage.biz

Windows

Execute run_example.bat with the name of the desired example as first parameter, followed by a list of configuration parameters if needed.

run-example.bat multi_codec_encoding --BITMOVIN_API_KEY=your-api-key --HTTP_INPUT_HOST=my-storage.biz

More examples?

For more code snippets, and sometimes complete scripts, please have a look at our tutorials and our Community pages