This library provides a low-level interface to the REST API of Telestream Cloud, the online video encoding service.
Python 2.7 and 3.4+
import time
import telestream_cloud_flip
from telestream_cloud_flip.rest import ApiException
from pprint import pprint
api_instance = telestream_cloud_flip.FlipApi()
api_instance.api_client.configuration.api_key['X-Api-Key'] = '[API KEY]'
factory_id = '[FACTORY ID]'# POST videos
createVideoBody = telestream_cloud_flip.CreateVideoBody(
source_url="https://example.com/video.mp4", profiles="h264",
subtitle_files=["https://example.com/subtitle.srt"]
)
try:
video = api_instance.create_video(factoryId, createVideoBody)
pprint(video)
except ApiException as e:
print("Exception when calling FlipApi->create_video: %s\n" % e)All URIs are relative to https://api.cloud.telestream.net/flip/3.1
| Class | Method | HTTP request | Description |
|---|---|---|---|
| FlipApi | cancel_encoding | POST /encodings/{encoding_id}/cancel.json | Cancels an Encoding. |
| FlipApi | cancel_video | POST /videos/{video_id}/cancel.json | Cancel video and all encodings |
| FlipApi | copy_profile | POST /profiles/{profile_id}/copy.json | Copies a given Profile |
| FlipApi | create_encoding | POST /encodings.json | Creates an Encoding |
| FlipApi | create_factory | POST /factories.json | Creates a new factory |
| FlipApi | create_profile | POST /profiles.json | Creates a Profile |
| FlipApi | create_video | POST /videos.json | Creates a Video from a provided source_url. |
| FlipApi | delete_encoding | DELETE /encodings/{encoding_id}.json | Deletes an Encoding from both Telestream Cloud and your storage. Returns an information whether the operation was successful. |
| FlipApi | delete_profile | DELETE /profiles/{profile_id}.json | Deletes a given Profile |
| FlipApi | delete_video | DELETE /videos/{video_id}.json | Deletes a Video object. |
| FlipApi | delete_video_source | DELETE /videos/{video_id}/source.json | Delete a video's source file. |
| FlipApi | encodings_count | GET /encodings/count.json | Returns a number of Encoding objects created using a given factory. |
| FlipApi | get_encoding | GET /encodings/{encoding_id}.json | Returns an Encoding object. |
| FlipApi | get_factory | GET /factories/{id}.json | Returns a Factory object. |
| FlipApi | get_profile | GET /profiles/{profile_id}.json | Returns a Profile object. |
| FlipApi | get_video | GET /videos/{video_id}.json | Returns a Video object. |
| FlipApi | list_encodings | GET /encodings.json | Returns a list of Encoding objects |
| FlipApi | list_factories | GET /factories.json | Returns a collection of Factory objects. |
| FlipApi | list_profiles | GET /profiles.json | Returns a collection of Profile objects. |
| FlipApi | list_video_encodings | GET /videos/{video_id}/encodings.json | Returns a list of Encodings that belong to a Video. |
| FlipApi | list_videos | GET /videos.json | Returns a collection of Video objects. |
| FlipApi | list_workflows | GET /workflows.json | Returns a collection of Workflows that belong to a Factory. |
| FlipApi | profile_encodings | GET /profiles/{id_or_name}/encodings.json | Returns a list of Encodings that belong to a Profile. |
| FlipApi | queued_videos | GET /videos/queued.json | Returns a collection of Video objects queued for encoding. |
| FlipApi | resubmit_video | POST /videos/resubmit.json | Resubmits a video to encode. |
| FlipApi | retry_encoding | POST /encodings/{encoding_id}/retry.json | Retries a failed encoding. |
| FlipApi | signed_encoding_url | GET /encodings/{encoding_id}/signed-url.json | Returns a signed url pointing to an Encoding. |
| FlipApi | signed_encoding_urls | GET /encodings/{encoding_id}/signed-urls.json | Returns a list of signed urls pointing to an Encoding's outputs. |
| FlipApi | signed_video_url | GET /videos/{video_id}/signed-url.json | Returns a signed url pointing to a Video. |
| FlipApi | update_encoding | PUT /encodings/{encoding_id}.json | Updates an Encoding |
| FlipApi | update_factory | PATCH /factories/{id}.json | Updates a Factory's settings. Returns a Factory object. |
| FlipApi | update_profile | PUT /profiles/{profile_id}.json | Updates a given Profile |
| FlipApi | video_metadata | GET /videos/{video_id}/metadata.json | Returns a Video's metadata |
- CanceledResponse
- CopyProfileBody
- CountResponse
- CreateEncodingBody
- CreateVideoBody
- DeletedResponse
- Encoding
- EncodingSignedUrl
- EncodingSignedUrls
- Error
- ExtraFile
- Factory
- PaginatedEncodingsCollection
- PaginatedFactoryCollection
- PaginatedProfilesCollection
- PaginatedVideoCollection
- PaginatedWorkflowsCollection
- Profile
- ResubmitVideoBody
- RetriedResponse
- SignedVideoUrl
- UpdateEncodingBody
- Video
- Type: API key
- API key parameter name: X-Api-Key
- Location: HTTP header