Skip to content

Commit c954557

Browse files
authored
Ed/clipping (#28)
* updating API from spec * added get-asset-or-livestream-id * code generation * docs (+ manual fix) * clipping test
1 parent 9d210f1 commit c954557

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1103
-91
lines changed

.tool-versions

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python 3.7.2

docs/Asset.md

+13-12
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,30 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**id** | **str** | | [optional]
7-
**created_at** | **str** | | [optional]
6+
**id** | **str** | Unique identifier for the Asset. | [optional]
7+
**created_at** | **str** | Time at which the object was created. Measured in seconds since the Unix epoch. | [optional]
88
**deleted_at** | **str** | | [optional]
9-
**status** | **str** | | [optional]
10-
**duration** | **float** | | [optional]
11-
**max_stored_resolution** | **str** | | [optional]
12-
**max_stored_frame_rate** | **float** | | [optional]
13-
**aspect_ratio** | **str** | | [optional]
9+
**status** | **str** | The status of the asset. | [optional]
10+
**duration** | **float** | The duration of the asset in seconds (max duration for a single asset is 24 hours). | [optional]
11+
**max_stored_resolution** | **str** | The maximum resolution that has been stored for the asset. The asset may be delivered at lower resolutions depending on the device and bandwidth, however it cannot be delivered at a higher value than is stored. | [optional]
12+
**max_stored_frame_rate** | **float** | The maximum frame rate that has been stored for the asset. The asset may be delivered at lower frame rates depending on the device and bandwidth, however it cannot be delivered at a higher value than is stored. This field may return -1 if the frame rate of the input cannot be reliably determined. | [optional]
13+
**aspect_ratio** | **str** | The aspect ratio of the asset in the form of `width:height`, for example `16:9`. | [optional]
1414
**playback_ids** | [**list[PlaybackID]**](PlaybackID.md) | | [optional]
1515
**tracks** | [**list[Track]**](Track.md) | | [optional]
1616
**errors** | [**AssetErrors**](AssetErrors.md) | | [optional]
1717
**per_title_encode** | **bool** | | [optional]
18-
**is_live** | **bool** | | [optional]
19-
**passthrough** | **str** | | [optional]
20-
**live_stream_id** | **str** | | [optional]
18+
**is_live** | **bool** | Whether the asset is created from a live stream and the live stream is currently `active` and not in `idle` state. | [optional]
19+
**passthrough** | **str** | Arbitrary metadata set for the asset. Max 255 characters. | [optional]
20+
**live_stream_id** | **str** | Unique identifier for the live stream. This is an optional parameter added when the asset is created from a live stream. | [optional]
2121
**master** | [**AssetMaster**](AssetMaster.md) | | [optional]
2222
**master_access** | **str** | | [optional] [default to 'none']
2323
**mp4_support** | **str** | | [optional] [default to 'none']
24-
**normalize_audio** | **bool** | | [optional] [default to False]
24+
**source_asset_id** | **str** | Asset Identifier of the video used as the source for creating the clip. | [optional]
25+
**normalize_audio** | **bool** | Normalize the audio track loudness level. This parameter is only applicable to on-demand (not live) assets. | [optional] [default to False]
2526
**static_renditions** | [**AssetStaticRenditions**](AssetStaticRenditions.md) | | [optional]
2627
**recording_times** | [**list[AssetRecordingTimes]**](AssetRecordingTimes.md) | An array of individual live stream recording sessions. A recording session is created on each encoder connection during the live stream | [optional]
2728
**non_standard_input_reasons** | [**AssetNonStandardInputReasons**](AssetNonStandardInputReasons.md) | | [optional]
28-
**test** | **bool** | | [optional]
29+
**test** | **bool** | Indicates this asset is a test asset if the value is `true`. A Test asset can help evaluate the Mux Video APIs without incurring any cost. There is no limit on number of test assets created. Test assets are watermarked with the Mux logo, limited to 10 seconds, and deleted after 24 hrs. | [optional]
2930

3031
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
3132

docs/AssetErrors.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**type** | **str** | | [optional]
7-
**messages** | **list[str]** | | [optional]
6+
**type** | **str** | The type of error that occurred for this asset. | [optional]
7+
**messages** | **list[str]** | Error messages with more details. | [optional]
88

99
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1010

docs/AssetNonStandardInputReasons.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**video_codec** | **str** | The video codec used on the input file | [optional]
7-
**audio_codec** | **str** | The audio codec used on the input file | [optional]
8-
**video_gop_size** | **str** | The video key frame Interval (also called as Group of Picture or GOP) of the input file | [optional]
9-
**video_frame_rate** | **str** | The video frame rate of the input file | [optional]
10-
**video_resolution** | **str** | The video resolution of the input file | [optional]
11-
**pixel_aspect_ratio** | **str** | The video pixel aspect ratio of the input file | [optional]
12-
**video_edit_list** | **str** | Video Edit List reason indicates that the input file's video track contains a complex Edit Decision List | [optional]
13-
**audio_edit_list** | **str** | Audio Edit List reason indicates that the input file's audio track contains a complex Edit Decision List | [optional]
14-
**unexpected_media_file_parameters** | **str** | A catch-all reason when the input file in created with non-standard encoding parameters | [optional]
6+
**video_codec** | **str** | The video codec used on the input file. | [optional]
7+
**audio_codec** | **str** | The audio codec used on the input file. | [optional]
8+
**video_gop_size** | **str** | The video key frame Interval (also called as Group of Picture or GOP) of the input file. | [optional]
9+
**video_frame_rate** | **str** | The video frame rate of the input file. | [optional]
10+
**video_resolution** | **str** | The video resolution of the input file. | [optional]
11+
**pixel_aspect_ratio** | **str** | The video pixel aspect ratio of the input file. | [optional]
12+
**video_edit_list** | **str** | Video Edit List reason indicates that the input file's video track contains a complex Edit Decision List. | [optional]
13+
**audio_edit_list** | **str** | Audio Edit List reason indicates that the input file's audio track contains a complex Edit Decision List. | [optional]
14+
**unexpected_media_file_parameters** | **str** | A catch-all reason when the input file in created with non-standard encoding parameters. | [optional]
1515

1616
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1717

docs/AssetRecordingTimes.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**started_at** | **datetime** | The time at which the recording for the live stream started. The time value is Unix epoch time represented in ISO 8601 format | [optional]
7-
**duration** | **float** | The duration of the live stream recorded. The time value is in seconds | [optional]
6+
**started_at** | **datetime** | The time at which the recording for the live stream started. The time value is Unix epoch time represented in ISO 8601 format. | [optional]
7+
**duration** | **float** | The duration of the live stream recorded. The time value is in seconds. | [optional]
88

99
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1010

docs/AssetStaticRenditions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**status** | **str** | * `ready`: All MP4s are downloadable * `preparing`: We are preparing the MP4s * `disabled`: MP4 support was not requested or has been removed * `errored`: There was a Mux internal error that prevented the MP4s from being created | [optional] [default to 'disabled']
6+
**status** | **str** | Indicates the status of downloadable MP4 versions of this asset. | [optional] [default to 'disabled']
77
**files** | [**list[AssetStaticRenditionsFiles]**](AssetStaticRenditionsFiles.md) | | [optional]
88

99
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

docs/AssetsApi.md

+4
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ Name | Type | Description | Notes
185185
186186
Delete an asset
187187

188+
Deletes a video asset and all its data
189+
188190
### Example
189191

190192
* Basic Authentication (accessToken):
@@ -504,6 +506,8 @@ Name | Type | Description | Notes
504506
505507
List assets
506508

509+
List all Mux assets.
510+
507511
### Example
508512

509513
* Basic Authentication (accessToken):

docs/CreateAssetRequest.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**input** | [**list[InputSettings]**](InputSettings.md) | | [optional]
7-
**playback_policy** | [**list[PlaybackPolicy]**](PlaybackPolicy.md) | | [optional]
6+
**input** | [**list[InputSettings]**](InputSettings.md) | An array of objects that each describe an input file to be used to create the asset. As a shortcut, input can also be a string URL for a file when only one input file is used. See `input[].url` for requirements. | [optional]
7+
**playback_policy** | [**list[PlaybackPolicy]**](PlaybackPolicy.md) | An array of playback policy names that you want applied to this asset and available through `playback_ids`. Options include: `\"public\"` (anyone with the playback URL can stream the asset). And `\"signed\"` (an additional access token is required to play the asset). If no playback_policy is set, the asset will have no playback IDs and will therefore not be playable. For simplicity, a single string name can be used in place of the array in the case of only one playback policy. | [optional]
88
**per_title_encode** | **bool** | | [optional]
9-
**passthrough** | **str** | | [optional]
10-
**mp4_support** | **str** | | [optional]
9+
**passthrough** | **str** | Arbitrary metadata that will be included in the asset details and related webhooks. Can be used to store your own ID for a video along with the asset. **Max: 255 characters**. | [optional]
10+
**mp4_support** | **str** | Specify what level (if any) of support for mp4 playback. In most cases you should use our default HLS-based streaming playback ({playback_id}.m3u8) which can automatically adjust to viewers' connection speeds, but an mp4 can be useful for some legacy devices or downloading for offline playback. See the [Download your vidoes guide](/guides/video/download-your-videos) for more information. | [optional]
1111
**normalize_audio** | **bool** | Normalize the audio track loudness level. This parameter is only applicable to on-demand (not live) assets. | [optional] [default to False]
12-
**master_access** | **str** | | [optional]
13-
**test** | **bool** | | [optional]
12+
**master_access** | **str** | Specify what level (if any) of support for master access. Master access can be enabled temporarily for your asset to be downloaded. See the [Download your vidoes guide](/guides/video/download-your-videos) for more information. | [optional]
13+
**test** | **bool** | Marks the asset as a test asset when the value is set to true. A Test asset can help evaluate the Mux Video APIs without incurring any cost. There is no limit on number of test assets created. Test asset are watermarked with the Mux logo, limited to 10 seconds, deleted after 24 hrs. | [optional]
1414

1515
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1616

docs/CreateTrackRequest.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ Name | Type | Description | Notes
66
**url** | **str** | |
77
**type** | **str** | |
88
**text_type** | **str** | |
9-
**language_code** | **str** | |
10-
**name** | **str** | | [optional]
11-
**closed_captions** | **bool** | | [optional]
12-
**passthrough** | **str** | | [optional]
9+
**language_code** | **str** | The language code value must be a valid BCP 47 specification compliant value. For example, en for English or en-US for the US version of English. |
10+
**name** | **str** | The name of the track containing a human-readable description. This value must be unqiue across all the text type and subtitles text type tracks. HLS manifest will associate subtitle text track with this value. For example, set the value to \"English\" for subtitles text track with language_code as en-US. If this parameter is not included, Mux will auto-populate based on the language_code value. | [optional]
11+
**closed_captions** | **bool** | Indicates the track provides Subtitles for the Deaf or Hard-of-hearing (SDH). | [optional]
12+
**passthrough** | **str** | Arbitrary metadata set for the track either when creating the asset or track. | [optional]
1313

1414
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1515

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# GetAssetOrLiveStreamIdResponse
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**data** | [**GetAssetOrLiveStreamIdResponseData**](GetAssetOrLiveStreamIdResponseData.md) | | [optional]
7+
8+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
9+
10+
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# GetAssetOrLiveStreamIdResponseData
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**id** | **str** | The Playback ID used to retrieve the corresponding asset or the live stream ID | [optional]
7+
**policy** | [**PlaybackPolicy**](PlaybackPolicy.md) | | [optional]
8+
**object** | [**GetAssetOrLiveStreamIdResponseDataObject**](GetAssetOrLiveStreamIdResponseDataObject.md) | | [optional]
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
12+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# GetAssetOrLiveStreamIdResponseDataObject
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**id** | **str** | The identifier of the object. | [optional]
7+
**type** | **str** | Identifies the object type associated with the playback ID. | [optional]
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+

docs/InputSettings.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**url** | **str** | | [optional]
6+
**url** | **str** | The web address of the file that Mux should download and use. * For subtitles text tracks, the url is the location of subtitle/captions file. Mux supports [SubRip Text (SRT)](https://en.wikipedia.org/wiki/SubRip) and [Web Video Text Tracks](https://www.w3.org/TR/webvtt1/) format for ingesting Subtitles and Closed Captions. * For Watermarking or Overlay, the url is the location of the watermark image. * When creating clips from existing Mux assets, the url is defined with `mux://assets/{asset_id}` template where `asset_id` is the Asset Identifier for creating the clip from. | [optional]
77
**overlay_settings** | [**InputSettingsOverlaySettings**](InputSettingsOverlaySettings.md) | | [optional]
8-
**type** | **str** | | [optional]
9-
**text_type** | **str** | | [optional]
10-
**language_code** | **str** | | [optional]
11-
**name** | **str** | | [optional]
12-
**closed_captions** | **bool** | | [optional]
13-
**passthrough** | **str** | | [optional]
8+
**start_time** | **float** | The time offset in seconds from the beginning of the video indicating the clip's starting marker. The default value is 0 when not included. | [optional]
9+
**end_time** | **float** | The time offset in seconds from the beginning of the video, indicating the clip's ending marker. The default value is the duration of the video when not included. | [optional]
10+
**type** | **str** | This parameter is required for the `text` track type. | [optional]
11+
**text_type** | **str** | Type of text track. This parameter only supports subtitles value. For more information on Subtitles / Closed Captions, [see this blog post](https://mux.com/blog/subtitles-captions-webvtt-hls-and-those-magic-flags/). This parameter is required for `text` track type. | [optional]
12+
**language_code** | **str** | The language code value must be a valid [BCP 47](https://tools.ietf.org/html/bcp47) specification compliant value. For example, en for English or en-US for the US version of English. This parameter is required for text type and subtitles text type track. | [optional]
13+
**name** | **str** | The name of the track containing a human-readable description. This value must be unique across all text type and subtitles `text` type tracks. The hls manifest will associate a subtitle text track with this value. For example, the value should be \"English\" for subtitles text track with language_code as en. This optional parameter should be used only for `text` type and subtitles `text` type track. If this parameter is not included, Mux will auto-populate based on the `input[].language_code` value. | [optional]
14+
**closed_captions** | **bool** | Indicates the track provides Subtitles for the Deaf or Hard-of-hearing (SDH). This optional parameter should be used for `text` type and subtitles `text` type tracks. | [optional]
15+
**passthrough** | **str** | This optional parameter should be used for `text` type and subtitles `text` type tracks. | [optional]
1416

1517
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1618

0 commit comments

Comments
 (0)