This folder contains examples demonstrating usage of the Bitmovin Python API SDK
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.
Configuration parameters will be retrieved from these sources in the listed order:
- Command line arguments passed when running the example (E.g.:
BITMOVIN_API_KEY=xyz) - A properties file located in the root folder of the Python examples at
./examples.properties(seeexamples.properties.templateas reference) - Environment variables
- A properties file located in the home folder at
~/.bitmovin/examples.properties(seeexamples.properties.templateas 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/encodingsExecute 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.bizExecute 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.bizFor more code snippets, and sometimes complete scripts, please have a look at our tutorials and our Community pages