gcore 0.12.0__py3-none-any.whl → 0.14.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of gcore might be problematic. Click here for more details.
- gcore/__init__.py +3 -1
- gcore/_base_client.py +9 -9
- gcore/_client.py +25 -10
- gcore/_models.py +10 -4
- gcore/_qs.py +7 -7
- gcore/_types.py +18 -11
- gcore/_utils/_transform.py +2 -2
- gcore/_utils/_utils.py +4 -4
- gcore/_version.py +1 -1
- gcore/pagination.py +137 -0
- gcore/resources/__init__.py +14 -0
- gcore/resources/cdn/__init__.py +201 -0
- gcore/resources/cdn/audit_log.py +406 -0
- gcore/resources/cdn/cdn.py +957 -0
- gcore/resources/cdn/certificates.py +1062 -0
- gcore/resources/cdn/ip_ranges.py +224 -0
- gcore/resources/cdn/logs/__init__.py +33 -0
- gcore/resources/cdn/logs/logs.py +1424 -0
- gcore/resources/cdn/logs/settings.py +1081 -0
- gcore/resources/cdn/logs_uploader/__init__.py +61 -0
- gcore/resources/cdn/logs_uploader/configs.py +868 -0
- gcore/resources/cdn/logs_uploader/logs_uploader.py +166 -0
- gcore/resources/cdn/logs_uploader/policies.py +1060 -0
- gcore/resources/cdn/logs_uploader/targets.py +811 -0
- gcore/resources/cdn/metrics.py +419 -0
- gcore/resources/cdn/network_capacity.py +139 -0
- gcore/resources/cdn/origin_groups.py +1496 -0
- gcore/resources/cdn/resources/__init__.py +47 -0
- gcore/resources/cdn/resources/resources.py +2060 -0
- gcore/resources/cdn/resources/rules.py +1027 -0
- gcore/resources/cdn/resources/shield.py +259 -0
- gcore/resources/cdn/rule_templates.py +883 -0
- gcore/resources/cdn/shields.py +139 -0
- gcore/resources/cdn/statistics.py +1408 -0
- gcore/resources/cdn/trusted_ca_certificates.py +592 -0
- gcore/resources/cloud/audit_logs.py +33 -29
- gcore/resources/cloud/baremetal/flavors.py +21 -17
- gcore/resources/cloud/baremetal/images.py +19 -15
- gcore/resources/cloud/baremetal/servers.py +141 -119
- gcore/resources/cloud/billing_reservations.py +41 -33
- gcore/resources/cloud/cloud.py +24 -0
- gcore/resources/cloud/cost_reports.py +149 -119
- gcore/resources/cloud/file_shares/access_rules.py +25 -13
- gcore/resources/cloud/file_shares/file_shares.py +107 -71
- gcore/resources/cloud/floating_ips.py +270 -52
- gcore/resources/cloud/gpu_baremetal_clusters/flavors.py +13 -9
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +275 -65
- gcore/resources/cloud/gpu_baremetal_clusters/images.py +69 -53
- gcore/resources/cloud/gpu_baremetal_clusters/interfaces.py +9 -5
- gcore/resources/cloud/gpu_baremetal_clusters/servers.py +151 -127
- gcore/resources/cloud/inference/api_keys.py +51 -31
- gcore/resources/cloud/inference/applications/deployments.py +49 -31
- gcore/resources/cloud/inference/applications/templates.py +17 -9
- gcore/resources/cloud/inference/deployments/deployments.py +171 -139
- gcore/resources/cloud/inference/deployments/logs.py +17 -13
- gcore/resources/cloud/inference/flavors.py +21 -13
- gcore/resources/cloud/inference/inference.py +9 -5
- gcore/resources/cloud/inference/registry_credentials.py +45 -25
- gcore/resources/cloud/inference/secrets.py +45 -25
- gcore/resources/cloud/instances/flavors.py +17 -13
- gcore/resources/cloud/instances/images.py +153 -129
- gcore/resources/cloud/instances/instances.py +287 -213
- gcore/resources/cloud/instances/interfaces.py +165 -161
- gcore/resources/cloud/instances/metrics.py +9 -5
- gcore/resources/cloud/ip_ranges.py +25 -15
- gcore/resources/cloud/k8s/clusters/clusters.py +151 -87
- gcore/resources/cloud/k8s/clusters/nodes.py +19 -11
- gcore/resources/cloud/k8s/clusters/pools/nodes.py +19 -11
- gcore/resources/cloud/k8s/clusters/pools/pools.py +83 -59
- gcore/resources/cloud/k8s/flavors.py +13 -9
- gcore/resources/cloud/k8s/k8s.py +9 -5
- gcore/resources/cloud/load_balancers/flavors.py +11 -7
- gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +103 -83
- gcore/resources/cloud/load_balancers/l7_policies/rules.py +77 -57
- gcore/resources/cloud/load_balancers/listeners.py +125 -105
- gcore/resources/cloud/load_balancers/load_balancers.py +155 -123
- gcore/resources/cloud/load_balancers/metrics.py +9 -5
- gcore/resources/cloud/load_balancers/pools/health_monitors.py +25 -17
- gcore/resources/cloud/load_balancers/pools/members.py +31 -23
- gcore/resources/cloud/load_balancers/pools/pools.py +155 -129
- gcore/resources/cloud/load_balancers/statuses.py +17 -9
- gcore/resources/cloud/networks/networks.py +79 -55
- gcore/resources/cloud/networks/routers.py +75 -47
- gcore/resources/cloud/networks/subnets.py +105 -81
- gcore/resources/cloud/placement_groups.py +33 -17
- gcore/resources/cloud/projects.py +53 -41
- gcore/resources/cloud/quotas/quotas.py +25 -13
- gcore/resources/cloud/quotas/requests.py +41 -25
- gcore/resources/cloud/regions.py +25 -23
- gcore/resources/cloud/registries/artifacts.py +17 -9
- gcore/resources/cloud/registries/registries.py +55 -29
- gcore/resources/cloud/registries/repositories.py +17 -9
- gcore/resources/cloud/registries/tags.py +9 -5
- gcore/resources/cloud/registries/users.py +65 -35
- gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +123 -107
- gcore/resources/cloud/reserved_fixed_ips/vip.py +45 -25
- gcore/resources/cloud/secrets.py +43 -27
- gcore/resources/cloud/security_groups/rules.py +55 -43
- gcore/resources/cloud/security_groups/security_groups.py +79 -47
- gcore/resources/cloud/ssh_keys.py +51 -31
- gcore/resources/cloud/tasks.py +57 -45
- gcore/resources/cloud/usage_reports.py +27 -23
- gcore/resources/cloud/users/role_assignments.py +49 -33
- gcore/resources/cloud/volumes.py +237 -201
- gcore/resources/dns/dns.py +17 -13
- gcore/resources/dns/locations.py +29 -17
- gcore/resources/dns/metrics.py +13 -9
- gcore/resources/dns/pickers/pickers.py +5 -5
- gcore/resources/dns/pickers/presets.py +9 -5
- gcore/resources/dns/zones/dnssec.py +19 -11
- gcore/resources/dns/zones/rrsets.py +149 -91
- gcore/resources/dns/zones/zones.py +247 -189
- gcore/resources/fastedge/apps/apps.py +105 -89
- gcore/resources/fastedge/apps/logs.py +25 -21
- gcore/resources/fastedge/binaries.py +33 -17
- gcore/resources/fastedge/fastedge.py +5 -5
- gcore/resources/fastedge/kv_stores.py +43 -31
- gcore/resources/fastedge/secrets.py +69 -45
- gcore/resources/fastedge/statistics.py +25 -17
- gcore/resources/fastedge/templates.py +59 -39
- gcore/resources/iam/api_tokens.py +43 -27
- gcore/resources/iam/iam.py +5 -5
- gcore/resources/iam/users.py +97 -65
- gcore/resources/security/bgp_announces.py +27 -19
- gcore/resources/security/events.py +23 -19
- gcore/resources/security/profile_templates.py +9 -5
- gcore/resources/security/profiles.py +69 -45
- gcore/resources/storage/buckets/buckets.py +37 -25
- gcore/resources/storage/buckets/cors.py +19 -11
- gcore/resources/storage/buckets/lifecycle.py +19 -11
- gcore/resources/storage/buckets/policy.py +25 -13
- gcore/resources/storage/credentials.py +19 -15
- gcore/resources/storage/locations.py +13 -9
- gcore/resources/storage/statistics.py +39 -31
- gcore/resources/storage/storage.py +105 -69
- gcore/resources/streaming/ai_tasks.py +307 -197
- gcore/resources/streaming/broadcasts.py +63 -35
- gcore/resources/streaming/directories.py +65 -39
- gcore/resources/streaming/players.py +47 -31
- gcore/resources/streaming/playlists.py +189 -123
- gcore/resources/streaming/quality_sets.py +69 -39
- gcore/resources/streaming/restreams.py +47 -27
- gcore/resources/streaming/statistics.py +613 -407
- gcore/resources/streaming/streams/overlays.py +107 -67
- gcore/resources/streaming/streams/streams.py +403 -263
- gcore/resources/streaming/videos/subtitles.py +131 -75
- gcore/resources/streaming/videos/videos.py +429 -279
- gcore/resources/waap/advanced_rules.py +9 -5
- gcore/resources/waap/custom_page_sets.py +99 -75
- gcore/resources/waap/domains/advanced_rules.py +157 -99
- gcore/resources/waap/domains/api_discovery.py +71 -47
- gcore/resources/waap/domains/api_path_groups.py +9 -5
- gcore/resources/waap/domains/api_paths.py +79 -83
- gcore/resources/waap/domains/custom_rules.py +89 -59
- gcore/resources/waap/domains/domains.py +59 -41
- gcore/resources/waap/domains/firewall_rules.py +83 -55
- gcore/resources/waap/domains/insight_silences.py +59 -39
- gcore/resources/waap/domains/insights.py +39 -27
- gcore/resources/waap/domains/settings.py +21 -13
- gcore/resources/waap/domains/statistics.py +99 -75
- gcore/resources/waap/insights.py +23 -21
- gcore/resources/waap/ip_info/ip_info.py +70 -38
- gcore/resources/waap/ip_info/metrics.py +11 -7
- gcore/resources/waap/organizations.py +17 -13
- gcore/resources/waap/statistics.py +9 -5
- gcore/resources/waap/tags.py +17 -17
- gcore/resources/waap/waap.py +5 -5
- gcore/types/cdn/__init__.py +80 -0
- gcore/types/cdn/audit_log_list_params.py +73 -0
- gcore/types/cdn/ca_certificate.py +53 -0
- gcore/types/cdn/ca_certificate_list.py +10 -0
- gcore/types/cdn/cdn_account.py +86 -0
- gcore/types/cdn/cdn_account_limits.py +27 -0
- gcore/types/cdn/cdn_audit_log_entry.py +66 -0
- gcore/types/cdn/cdn_available_features.py +46 -0
- gcore/types/cdn/cdn_list_purge_statuses_params.py +67 -0
- gcore/types/cdn/cdn_log_entry.py +70 -0
- gcore/types/cdn/cdn_metrics.py +22 -0
- gcore/types/cdn/cdn_metrics_groups.py +13 -0
- gcore/types/cdn/cdn_metrics_values.py +19 -0
- gcore/types/cdn/cdn_resource.py +1977 -0
- gcore/types/cdn/cdn_resource_list.py +10 -0
- gcore/types/cdn/cdn_update_account_params.py +15 -0
- gcore/types/cdn/certificate_create_params.py +51 -0
- gcore/types/cdn/certificate_get_status_params.py +14 -0
- gcore/types/cdn/certificate_list_params.py +29 -0
- gcore/types/cdn/certificate_replace_params.py +39 -0
- gcore/types/cdn/log_download_params.py +279 -0
- gcore/types/cdn/log_list_params.py +273 -0
- gcore/types/cdn/logs/__init__.py +7 -0
- gcore/types/cdn/logs/log_settings.py +172 -0
- gcore/types/cdn/logs/setting_create_params.py +200 -0
- gcore/types/cdn/logs/setting_update_params.py +200 -0
- gcore/types/cdn/logs_aggregated_stats.py +23 -0
- gcore/types/cdn/logs_uploader/__init__.py +23 -0
- gcore/types/cdn/logs_uploader/config_create_params.py +32 -0
- gcore/types/cdn/logs_uploader/config_list_params.py +16 -0
- gcore/types/cdn/logs_uploader/config_replace_params.py +32 -0
- gcore/types/cdn/logs_uploader/config_update_params.py +32 -0
- gcore/types/cdn/logs_uploader/logs_uploader_config.py +51 -0
- gcore/types/cdn/logs_uploader/logs_uploader_config_list.py +10 -0
- gcore/types/cdn/logs_uploader/logs_uploader_policy.py +73 -0
- gcore/types/cdn/logs_uploader/logs_uploader_policy_list.py +10 -0
- gcore/types/cdn/logs_uploader/logs_uploader_target.py +236 -0
- gcore/types/cdn/logs_uploader/logs_uploader_target_list.py +10 -0
- gcore/types/cdn/logs_uploader/policy_create_params.py +61 -0
- gcore/types/cdn/logs_uploader/policy_list_fields_response.py +8 -0
- gcore/types/cdn/logs_uploader/policy_list_params.py +16 -0
- gcore/types/cdn/logs_uploader/policy_replace_params.py +61 -0
- gcore/types/cdn/logs_uploader/policy_update_params.py +61 -0
- gcore/types/cdn/logs_uploader/target_create_params.py +249 -0
- gcore/types/cdn/logs_uploader/target_list_params.py +16 -0
- gcore/types/cdn/logs_uploader/target_replace_params.py +249 -0
- gcore/types/cdn/logs_uploader/target_update_params.py +249 -0
- gcore/types/cdn/logs_uploader_validation.py +23 -0
- gcore/types/cdn/metric_list_params.py +168 -0
- gcore/types/cdn/network_capacity.py +22 -0
- gcore/types/cdn/origin_group_create_params.py +184 -0
- gcore/types/cdn/origin_group_list_params.py +24 -0
- gcore/types/cdn/origin_group_replace_params.py +190 -0
- gcore/types/cdn/origin_group_update_params.py +190 -0
- gcore/types/cdn/origin_groups.py +212 -0
- gcore/types/cdn/origin_groups_list.py +10 -0
- gcore/types/cdn/public_ip_list.py +15 -0
- gcore/types/cdn/public_network_list.py +15 -0
- gcore/types/cdn/purge_status.py +55 -0
- gcore/types/cdn/resource_aggregated_stats.py +80 -0
- gcore/types/cdn/resource_create_params.py +1825 -0
- gcore/types/cdn/resource_list_params.py +107 -0
- gcore/types/cdn/resource_prefetch_params.py +17 -0
- gcore/types/cdn/resource_purge_params.py +71 -0
- gcore/types/cdn/resource_replace_params.py +1803 -0
- gcore/types/cdn/resource_update_params.py +1794 -0
- gcore/types/cdn/resource_usage_stats.py +111 -0
- gcore/types/cdn/resources/__init__.py +11 -0
- gcore/types/cdn/resources/cdn_resource_rule.py +1695 -0
- gcore/types/cdn/resources/origin_shielding.py +15 -0
- gcore/types/cdn/resources/rule_create_params.py +1652 -0
- gcore/types/cdn/resources/rule_list_response.py +10 -0
- gcore/types/cdn/resources/rule_replace_params.py +1654 -0
- gcore/types/cdn/resources/rule_update_params.py +1654 -0
- gcore/types/cdn/resources/shield_replace_params.py +16 -0
- gcore/types/cdn/rule_template.py +1666 -0
- gcore/types/cdn/rule_template_create_params.py +1636 -0
- gcore/types/cdn/rule_template_list.py +10 -0
- gcore/types/cdn/rule_template_replace_params.py +1636 -0
- gcore/types/cdn/rule_template_update_params.py +1636 -0
- gcore/types/cdn/shield_aggregated_stats.py +23 -0
- gcore/types/cdn/shield_list_response.py +25 -0
- gcore/types/cdn/ssl_detail.py +62 -0
- gcore/types/cdn/ssl_detail_list.py +10 -0
- gcore/types/cdn/ssl_request_status.py +135 -0
- gcore/types/cdn/statistic_get_logs_usage_aggregated_params.py +42 -0
- gcore/types/cdn/statistic_get_logs_usage_series_params.py +35 -0
- gcore/types/cdn/statistic_get_resource_usage_aggregated_params.py +151 -0
- gcore/types/cdn/statistic_get_resource_usage_series_params.py +131 -0
- gcore/types/cdn/statistic_get_shield_usage_aggregated_params.py +42 -0
- gcore/types/cdn/statistic_get_shield_usage_series_params.py +25 -0
- gcore/types/cdn/trusted_ca_certificate_create_params.py +23 -0
- gcore/types/cdn/trusted_ca_certificate_list_params.py +29 -0
- gcore/types/cdn/trusted_ca_certificate_replace_params.py +15 -0
- gcore/types/cdn/usage_series_stats.py +31 -0
- gcore/types/cloud/__init__.py +2 -0
- gcore/types/cloud/file_share.py +4 -0
- gcore/types/cloud/file_share_create_params.py +20 -0
- gcore/types/cloud/file_share_update_params.py +40 -3
- gcore/types/cloud/floating_ip.py +1 -1
- gcore/types/cloud/floating_ip_detailed.py +1 -1
- gcore/types/cloud/floating_ip_update_params.py +43 -0
- gcore/types/cloud/gpu_baremetal_cluster_action_params.py +46 -0
- gcore/types/cloud/inference/inference_deployment.py +3 -1
- gcore/types/cloud/instance_create_params.py +3 -1
- gcore/types/cloud/k8s/cluster_create_params.py +46 -4
- gcore/types/cloud/k8s/cluster_update_params.py +60 -6
- gcore/types/cloud/k8s/clusters/pool_update_params.py +1 -1
- gcore/types/cloud/k8s/k8s_cluster.py +40 -3
- gcore/types/cloud/load_balancer_update_params.py +3 -1
- gcore/types/cloud/network_update_params.py +3 -1
- gcore/types/cloud/networks/subnet_update_params.py +3 -1
- gcore/types/cloud/registries/user_create_multiple_params.py +5 -3
- gcore/types/cloud/registries/user_create_params.py +5 -3
- gcore/types/cloud/registry_create_params.py +5 -3
- gcore/types/cloud/security_group_update_params.py +3 -1
- gcore/types/cloud/ssh_key_created.py +6 -3
- gcore/types/cloud/volume_update_params.py +3 -1
- gcore/types/dns/zone_get_statistics_params.py +12 -9
- gcore/types/dns/zone_get_statistics_response.py +3 -1
- gcore/types/dns/zone_import_params.py +21 -15
- gcore/types/dns/zones/dns_output_rrset.py +7 -3
- gcore/types/iam/account_overview.py +7 -2
- gcore/types/iam/user.py +7 -2
- gcore/types/iam/user_detailed.py +7 -2
- gcore/types/iam/user_invite_params.py +4 -1
- gcore/types/iam/user_update.py +7 -2
- gcore/types/iam/user_update_params.py +7 -2
- gcore/types/streaming/ai_contentmoderation_hardnudity.py +6 -4
- gcore/types/streaming/ai_contentmoderation_nsfw.py +6 -4
- gcore/types/streaming/ai_contentmoderation_softnudity.py +6 -4
- gcore/types/streaming/ai_contentmoderation_sport.py +6 -4
- gcore/types/streaming/ai_task.py +20 -11
- gcore/types/streaming/ai_task_create_params.py +20 -11
- gcore/types/streaming/ai_task_get_response.py +5 -4
- gcore/types/streaming/ai_task_list_params.py +11 -5
- gcore/types/streaming/clip.py +33 -22
- gcore/types/streaming/create_video_param.py +75 -43
- gcore/types/streaming/playlist.py +7 -5
- gcore/types/streaming/playlist_create_params.py +7 -5
- gcore/types/streaming/playlist_update_params.py +7 -5
- gcore/types/streaming/playlist_video.py +75 -43
- gcore/types/streaming/statistic_get_unique_viewers_cdn_params.py +7 -4
- gcore/types/streaming/stream.py +207 -136
- gcore/types/streaming/stream_create_clip_params.py +33 -22
- gcore/types/streaming/stream_create_params.py +41 -24
- gcore/types/streaming/stream_update_params.py +41 -24
- gcore/types/streaming/video.py +138 -76
- gcore/types/streaming/video_list_params.py +4 -2
- gcore/types/streaming/video_update_params.py +75 -43
- gcore/types/waap/__init__.py +2 -1
- gcore/types/waap/domain_update_params.py +2 -2
- gcore/types/waap/domains/advanced_rule_create_params.py +26 -18
- gcore/types/waap/domains/advanced_rule_list_params.py +10 -7
- gcore/types/waap/domains/advanced_rule_update_params.py +22 -17
- gcore/types/waap/domains/api_path_create_params.py +0 -3
- gcore/types/waap/domains/api_path_update_params.py +1 -3
- gcore/types/waap/domains/custom_rule_create_params.py +36 -35
- gcore/types/waap/domains/custom_rule_update_params.py +31 -33
- gcore/types/waap/domains/firewall_rule_create_params.py +6 -6
- gcore/types/waap/domains/firewall_rule_update_params.py +5 -5
- gcore/types/waap/domains/waap_advanced_rule.py +17 -9
- gcore/types/waap/domains/waap_custom_rule.py +5 -2
- gcore/types/waap/domains/waap_firewall_rule.py +1 -1
- gcore/types/waap/domains/waap_insight.py +1 -1
- gcore/types/waap/insight_list_types_params.py +1 -1
- gcore/types/waap/ip_info_get_top_urls_response.py +3 -12
- gcore/types/waap/{ip_info_get_ip_info_response.py → waap_ip_info.py} +2 -2
- gcore/types/waap/waap_top_url.py +13 -0
- {gcore-0.12.0.dist-info → gcore-0.14.0.dist-info}/METADATA +1 -1
- {gcore-0.12.0.dist-info → gcore-0.14.0.dist-info}/RECORD +340 -218
- {gcore-0.12.0.dist-info → gcore-0.14.0.dist-info}/WHEEL +0 -0
- {gcore-0.12.0.dist-info → gcore-0.14.0.dist-info}/licenses/LICENSE +0 -0
gcore/types/streaming/stream.py
CHANGED
|
@@ -11,9 +11,12 @@ __all__ = ["Stream"]
|
|
|
11
11
|
|
|
12
12
|
class Stream(BaseModel):
|
|
13
13
|
name: str
|
|
14
|
-
"""
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
"""Stream name.
|
|
15
|
+
|
|
16
|
+
Often used as a human-readable name for the stream, but can contain any text you
|
|
17
|
+
wish. The values are not unique and may be repeated.
|
|
18
|
+
|
|
19
|
+
Examples:
|
|
17
20
|
|
|
18
21
|
- Conference in July
|
|
19
22
|
- Stream #10003
|
|
@@ -28,8 +31,10 @@ class Stream(BaseModel):
|
|
|
28
31
|
"""Stream switch between on and off.
|
|
29
32
|
|
|
30
33
|
This is not an indicator of the status "stream is receiving and it is LIVE", but
|
|
31
|
-
rather an on/off switch.
|
|
32
|
-
|
|
34
|
+
rather an on/off switch.
|
|
35
|
+
|
|
36
|
+
When stream is switched off, there is no way to process it: PULL is deactivated
|
|
37
|
+
and PUSH will return an error.
|
|
33
38
|
|
|
34
39
|
- true – stream can be processed
|
|
35
40
|
- false – stream is off, and cannot be processed
|
|
@@ -38,9 +43,12 @@ class Stream(BaseModel):
|
|
|
38
43
|
auto_record: Optional[bool] = None
|
|
39
44
|
"""Enables autotomatic recording of the stream when it started.
|
|
40
45
|
|
|
41
|
-
So you don't need to call recording manually.
|
|
42
|
-
|
|
43
|
-
|
|
46
|
+
So you don't need to call recording manually.
|
|
47
|
+
|
|
48
|
+
Result of recording is automatically added to video hosting. For details see the
|
|
49
|
+
/streams/`start_recording` method and in knowledge base
|
|
50
|
+
|
|
51
|
+
Values:
|
|
44
52
|
|
|
45
53
|
- true – auto recording is enabled
|
|
46
54
|
- false – auto recording is disabled
|
|
@@ -49,23 +57,28 @@ class Stream(BaseModel):
|
|
|
49
57
|
backup_live: Optional[bool] = None
|
|
50
58
|
"""
|
|
51
59
|
State of receiving and transcoding master stream from source by backup server if
|
|
52
|
-
you pushing stream to "`backup_push_url`" or "`backup_push_url_srt`".
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
60
|
+
you pushing stream to "`backup_push_url`" or "`backup_push_url_srt`".
|
|
61
|
+
|
|
62
|
+
Displays the backup server status of PUSH method only. For PULL a "live" field
|
|
63
|
+
is always used, even when origin servers are switched using round robin
|
|
64
|
+
scheduling (look "uri" field for details).
|
|
56
65
|
"""
|
|
57
66
|
|
|
58
67
|
backup_push_url: Optional[str] = None
|
|
59
68
|
"""URL to PUSH master stream to our backup server using RTMP/S protocols.
|
|
60
69
|
|
|
61
|
-
Servers for the main and backup streams are distributed geographically.
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
70
|
+
Servers for the main and backup streams are distributed geographically.
|
|
71
|
+
|
|
72
|
+
Mainly sending one stream to main server is enough. But if you need a backup
|
|
73
|
+
stream, then this is the field to PUSH it.
|
|
74
|
+
|
|
75
|
+
To use RTMPS just manually change the protocol name from "rtmp://" to
|
|
76
|
+
"rtmps://".
|
|
77
|
+
|
|
78
|
+
The backup logs are as follows: In PUSH mode, you initiate sending a stream from
|
|
79
|
+
your machine. If your stream stops or breaks for some reason and it stops coming
|
|
80
|
+
to the main server, then after 3-10 seconds of waiting the stream will turn off
|
|
81
|
+
or the backup one will be automatically turned on, if you are pushing it too.
|
|
69
82
|
"""
|
|
70
83
|
|
|
71
84
|
backup_push_url_srt: Optional[str] = None
|
|
@@ -105,12 +118,15 @@ class Stream(BaseModel):
|
|
|
105
118
|
dash_url: Optional[str] = None
|
|
106
119
|
"""MPEG-DASH output.
|
|
107
120
|
|
|
108
|
-
URL for transcoded result stream in MPEG-DASH format, with .mpd link.
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
121
|
+
URL for transcoded result stream in MPEG-DASH format, with .mpd link.
|
|
122
|
+
|
|
123
|
+
Low Latency support: YES.
|
|
124
|
+
|
|
125
|
+
This is CMAF-based MPEG-DASH stream. Encoder and packager dynamically assemble
|
|
126
|
+
the video stream with fMP4 fragments. Chunks have ±2-4 seconds duration
|
|
127
|
+
depending on the settings. All chunks for DASH are transferred through CDN using
|
|
128
|
+
chunk transfer technology, which allows to use all the advantages of low latency
|
|
129
|
+
delivery of DASH.
|
|
114
130
|
|
|
115
131
|
- by default low latency is ±4 sec, because it's stable for almost all last-mile
|
|
116
132
|
use cases.
|
|
@@ -124,8 +140,11 @@ class Stream(BaseModel):
|
|
|
124
140
|
"""DVR duration in seconds if DVR feature is enabled for the stream.
|
|
125
141
|
|
|
126
142
|
So this is duration of how far the user can rewind the live stream.
|
|
127
|
-
|
|
128
|
-
|
|
143
|
+
|
|
144
|
+
`dvr_duration` range is [30...14400].
|
|
145
|
+
|
|
146
|
+
Maximum value is 4 hours = 14400 seconds. If you need more, ask the Support Team
|
|
147
|
+
please.
|
|
129
148
|
"""
|
|
130
149
|
|
|
131
150
|
dvr_enabled: Optional[bool] = None
|
|
@@ -136,16 +155,17 @@ class Stream(BaseModel):
|
|
|
136
155
|
"""
|
|
137
156
|
|
|
138
157
|
finished_at_primary: Optional[str] = None
|
|
139
|
-
"""Time when the stream ended for the last time.
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
158
|
+
"""Time when the stream ended for the last time. Datetime in ISO 8601.
|
|
159
|
+
|
|
160
|
+
After restarting the stream, this value is not reset to "null", and the time of
|
|
161
|
+
the last/previous end is always displayed here. That is, when the start time is
|
|
162
|
+
greater than the end time, it means the current session is still ongoing and the
|
|
163
|
+
stream has not ended yet.
|
|
164
|
+
|
|
165
|
+
If you want to see all information about acitivity of the stream, you can get it
|
|
166
|
+
from another method /streaming/statistics/ffprobe. This method shows aggregated
|
|
167
|
+
activity parameters during a time, when stream was alive and transcoded. Also
|
|
168
|
+
you can create graphs to see the activity. For example
|
|
149
169
|
/streaming/statistics/ffprobe?interval=6000&`date_from`=2023-10-01&`date_to`=2023-10-11&`stream_id`=12345
|
|
150
170
|
"""
|
|
151
171
|
|
|
@@ -156,12 +176,15 @@ class Stream(BaseModel):
|
|
|
156
176
|
"""HLS output.
|
|
157
177
|
|
|
158
178
|
URL for transcoded result of stream in HLS CMAF format, with .m3u8 link.
|
|
159
|
-
Recommended for use for all HLS streams.
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
179
|
+
Recommended for use for all HLS streams.
|
|
180
|
+
|
|
181
|
+
Low Latency support: YES.
|
|
182
|
+
|
|
183
|
+
This is CMAF-based HLS stream. Encoder and packager dynamically assemble the
|
|
184
|
+
video stream with fMP4 fragments. Chunks have ±2-4 seconds duration depending on
|
|
185
|
+
the settings. All chunks for LL-HLS are transferred through CDN via dividing
|
|
186
|
+
into parts (small segments `#EXT-X-PART` of 0.5-1.0 sec duration), which allows
|
|
187
|
+
to use all the advantages of low latency delivery of LL-HLS.
|
|
165
188
|
|
|
166
189
|
- by default low latency is ±5 sec, because it's stable for almost all last-mile
|
|
167
190
|
use cases.
|
|
@@ -185,12 +208,18 @@ class Stream(BaseModel):
|
|
|
185
208
|
"""HLS output for legacy devices.
|
|
186
209
|
|
|
187
210
|
URL for transcoded result of stream in HLS MPEG-TS (.ts) format, with .m3u8
|
|
188
|
-
link.
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
211
|
+
link.
|
|
212
|
+
|
|
213
|
+
Low Latency support: NO.
|
|
214
|
+
|
|
215
|
+
Some legacy devices or software may require MPEG-TS (.ts) segments as a format
|
|
216
|
+
for streaming, so we provide this options keeping backward compatibility with
|
|
217
|
+
any of your existing workflows. For other cases it's better to use
|
|
218
|
+
"`hls_cmaf_url`" instead.
|
|
219
|
+
|
|
220
|
+
You can use this legacy HLSv6 format based on MPEG-TS segmenter in parallel with
|
|
221
|
+
main HLS CMAF. Both formats are sharing same segments size, manifest length
|
|
222
|
+
(DVR), etc.
|
|
194
223
|
|
|
195
224
|
It is also possible to use additional modifier-attributes:
|
|
196
225
|
|
|
@@ -200,10 +229,13 @@ class Stream(BaseModel):
|
|
|
200
229
|
length multiple of whole seconds, or a fractional number separated by a dot
|
|
201
230
|
for chunks that are not multiples of seconds. This attribute allows you to
|
|
202
231
|
determine duration in seconds at the level of analyzing the logs of CDN
|
|
203
|
-
requests and compare it with file size (so to use it in your analytics).
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
232
|
+
requests and compare it with file size (so to use it in your analytics).
|
|
233
|
+
|
|
234
|
+
Such modifier attributes are applied manually and added to the link obtained
|
|
235
|
+
from this field. I.e. `<hls_url>?get_duration_sec=true`
|
|
236
|
+
|
|
237
|
+
Example:
|
|
238
|
+
`https://demo.gvideo.io/mpegts/2675_19146/master_mpegts.m3u8?get_duration_sec=true`
|
|
207
239
|
|
|
208
240
|
```
|
|
209
241
|
#EXTM3U
|
|
@@ -230,14 +262,19 @@ class Stream(BaseModel):
|
|
|
230
262
|
"""A URL to a built-in HTML web player with the stream inside.
|
|
231
263
|
|
|
232
264
|
It can be inserted into an iframe on your website and the video will
|
|
233
|
-
automatically play in all browsers.
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
with
|
|
240
|
-
|
|
265
|
+
automatically play in all browsers.
|
|
266
|
+
|
|
267
|
+
Please, remember that transcoded streams from "`hls_cmaf_url`" with .m3u8 at the
|
|
268
|
+
end, and from "`dash_url`" with .mpd at the end are to be played inside video
|
|
269
|
+
players only. For example: AVplayer on iOS, Exoplayer on Android, HTML web
|
|
270
|
+
player in browser, etc. General bowsers like Chrome, Firefox, etc cannot play
|
|
271
|
+
transcoded streams with .m3u8 and .mpd at the end. The only exception is Safari,
|
|
272
|
+
which can only play Apple's HLS .m3u8 format with limits.
|
|
273
|
+
|
|
274
|
+
That's why you may need to use this HTML web player. Please, look Knowledge Base
|
|
275
|
+
for details.
|
|
276
|
+
|
|
277
|
+
Example of usage on a web page:
|
|
241
278
|
|
|
242
279
|
<iframe width="560" height="315" src="https://player.gvideo.co/streams/2675_201693" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
|
|
243
280
|
"""
|
|
@@ -249,7 +286,9 @@ class Stream(BaseModel):
|
|
|
249
286
|
"""
|
|
250
287
|
Visualization mode for 360° streams, how the stream is rendered in our web
|
|
251
288
|
player ONLY. If you would like to show video 360° in an external video player,
|
|
252
|
-
then use parameters of that video player.
|
|
289
|
+
then use parameters of that video player.
|
|
290
|
+
|
|
291
|
+
Modes:
|
|
253
292
|
|
|
254
293
|
- regular – regular “flat” stream
|
|
255
294
|
- vr360 – display stream in 360° mode
|
|
@@ -270,9 +309,11 @@ class Stream(BaseModel):
|
|
|
270
309
|
"""
|
|
271
310
|
|
|
272
311
|
push_url: Optional[str] = None
|
|
273
|
-
"""
|
|
274
|
-
|
|
275
|
-
use RTMPS just manually change the protocol name from "rtmp://" to
|
|
312
|
+
"""URL to PUSH master stream to our main server using RTMP and RTMPS protocols.
|
|
313
|
+
|
|
314
|
+
To use RTMPS just manually change the protocol name from "rtmp://" to
|
|
315
|
+
"rtmps://".
|
|
316
|
+
|
|
276
317
|
Use only 1 protocol of sending a master stream: eitheronly RTMP/S (`push_url`),
|
|
277
318
|
or only SRT (`push_url_srt`).
|
|
278
319
|
|
|
@@ -287,8 +328,9 @@ class Stream(BaseModel):
|
|
|
287
328
|
|
|
288
329
|
Please note that 1 connection and 1 protocol can be used at a single moment in
|
|
289
330
|
time per unique stream key input. Trying to send 2+ connection requests into
|
|
290
|
-
`push_url` to once, or 2+ protocols at once will not lead to a result.
|
|
291
|
-
|
|
331
|
+
`push_url` to once, or 2+ protocols at once will not lead to a result.
|
|
332
|
+
|
|
333
|
+
For example, transcoding process will fail if:
|
|
292
334
|
|
|
293
335
|
- you are pushing primary and backup RTMP to the same single `push_url`
|
|
294
336
|
simultaneously
|
|
@@ -303,31 +345,37 @@ class Stream(BaseModel):
|
|
|
303
345
|
"""
|
|
304
346
|
|
|
305
347
|
push_url_srt: Optional[str] = None
|
|
306
|
-
"""
|
|
307
|
-
|
|
308
|
-
protocol of sending a master stream: eitheronly RTMP/S (`push_url`),
|
|
309
|
-
(`push_url_srt`).
|
|
348
|
+
"""URL to PUSH master stream to our main server using SRT protocol.
|
|
349
|
+
|
|
350
|
+
Use only 1 protocol of sending a master stream: eitheronly RTMP/S (`push_url`),
|
|
351
|
+
or only SRT (`push_url_srt`).
|
|
352
|
+
|
|
353
|
+
**Setup SRT latency on your sender side**
|
|
310
354
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
end-to-end delay.
|
|
318
|
-
|
|
355
|
+
SRT is designed as a low-latency transport protocol, but real networks are not
|
|
356
|
+
always stable and in some cases the end-to-end path from the venue to the ingest
|
|
357
|
+
point can be long. For this reason, it is important to configure the latency
|
|
358
|
+
parameter carefully to match the actual network conditions.
|
|
359
|
+
|
|
360
|
+
Small latency values may lead to packet loss when jitter or retransmissions
|
|
361
|
+
occur, while very large values introduce unnecessary end-to-end delay.
|
|
362
|
+
\\**Incorrect or low default value is one of the most common reasons for packet
|
|
363
|
+
loss, frames loss, and bad picture.\\**
|
|
319
364
|
|
|
320
365
|
We therefore recommend setting latency manually rather than relying on the
|
|
321
366
|
default, to ensure the buffer is correctly sized for your environment. A
|
|
322
367
|
practical range is 400–2000 ms, with the exact value chosen based on RTT,
|
|
323
|
-
jitter, and expected packet loss.
|
|
324
|
-
|
|
325
|
-
|
|
368
|
+
jitter, and expected packet loss.
|
|
369
|
+
|
|
370
|
+
Be sure to check and test SRT settings on your sender side. The default values
|
|
371
|
+
do not take into account your specific scenarios and do not work well. If
|
|
372
|
+
necessary, ask us and we will help you.
|
|
326
373
|
|
|
327
374
|
Please note that 1 connection and 1 protocol can be used at a single moment in
|
|
328
375
|
time per unique stream key input. Trying to send 2+ connection requests into
|
|
329
|
-
`push_url_srt` to once, or 2+ protocols at once will not lead to a result.
|
|
330
|
-
|
|
376
|
+
`push_url_srt` to once, or 2+ protocols at once will not lead to a result.
|
|
377
|
+
|
|
378
|
+
For example, transcoding process will fail if:
|
|
331
379
|
|
|
332
380
|
- you are pushing primary and backup SRT to the same single `push_url_srt`
|
|
333
381
|
simultaneously
|
|
@@ -340,37 +388,52 @@ class Stream(BaseModel):
|
|
|
340
388
|
push_url_whip: Optional[str] = None
|
|
341
389
|
"""URL to PUSH WebRTC stream to our server using WHIP protocol.
|
|
342
390
|
|
|
343
|
-
**WebRTC WHIP to LL-HLS and DASH**
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
WebRTC
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
391
|
+
**WebRTC WHIP to LL-HLS and DASH**
|
|
392
|
+
|
|
393
|
+
Video Streaming supports WebRTC HTTP Ingest Protocol (WHIP), and WebRTC to
|
|
394
|
+
HLS/DASH converter. As a result you can stream from web broswers natively.
|
|
395
|
+
|
|
396
|
+
**WebRTC WHIP server**
|
|
397
|
+
|
|
398
|
+
We have dedicated WebRTC WHIP servers in our infrastructure. WebRTC WHIP server
|
|
399
|
+
organizes both signaling and receives video data. Signaling is a term to
|
|
400
|
+
describe communication between WebRTC endpoints, needed to initiate and maintain
|
|
401
|
+
a session. WHIP is an open specification for a simple signaling protocol for
|
|
402
|
+
starting WebRTC sessions in an outgoing direction, (i.e., streaming from your
|
|
403
|
+
device).
|
|
404
|
+
|
|
405
|
+
There is the primary link only for WHIP, so no backup link.
|
|
406
|
+
|
|
407
|
+
**WebRTC stream encoding parameters**
|
|
408
|
+
|
|
409
|
+
At least one video and audio track both must be present in the stream:
|
|
353
410
|
|
|
354
411
|
- Video must be encoded with H.264.
|
|
355
|
-
- Audio must be encoded with OPUS.
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
412
|
+
- Audio must be encoded with OPUS.
|
|
413
|
+
|
|
414
|
+
Note. Specifically for WebRTC mode a method of constant transcoding with an
|
|
415
|
+
initial given resolution is used. This means that if WebRTC in the end-user's
|
|
416
|
+
browser decides to reduce the quality or resolution of the master stream (to let
|
|
417
|
+
say 360p) due to restrictions on the end-user's device (network conditions, CPU
|
|
418
|
+
consumption, etc.), the transcoder will still continue to transcode the reduced
|
|
419
|
+
stream to the initial resolution (let say 1080p ABR). When the restrictions on
|
|
420
|
+
the end-user's device are removed, quiality will improve again.
|
|
421
|
+
|
|
422
|
+
**WebRTC WHIP Client**
|
|
423
|
+
|
|
424
|
+
We provide a convenient WebRTC WHIP library for working in browsers. You can use
|
|
425
|
+
our library, or any other you prefer. Simple example of usage is here:
|
|
426
|
+
https://stackblitz.com/edit/stackblitz-starters-j2r9ar?file=index.html
|
|
427
|
+
|
|
428
|
+
Also try to use the feature in UI of the Customer Portal. In the Streaming
|
|
429
|
+
section inside the settings of a specific live stream, a new section "Quick
|
|
430
|
+
start in browser" has been added.
|
|
369
431
|
|
|
370
432
|
Please note that 1 connection and 1 protocol can be used at a single moment in
|
|
371
433
|
time per unique stream key input. Trying to send 2+ connection requests into
|
|
372
|
-
`push_url_whip` to once, or 2+ protocols at once will not lead to a result.
|
|
373
|
-
|
|
434
|
+
`push_url_whip` to once, or 2+ protocols at once will not lead to a result.
|
|
435
|
+
|
|
436
|
+
For example, transcoding process will fail if:
|
|
374
437
|
|
|
375
438
|
- you are pushing primary and backup WHIP to the same single `push_url_whip`
|
|
376
439
|
simultaneously
|
|
@@ -389,7 +452,9 @@ class Stream(BaseModel):
|
|
|
389
452
|
"""Method of recording a stream.
|
|
390
453
|
|
|
391
454
|
Specifies the source from which the stream will be recorded: original or
|
|
392
|
-
transcoded.
|
|
455
|
+
transcoded.
|
|
456
|
+
|
|
457
|
+
Types:
|
|
393
458
|
|
|
394
459
|
- "origin" – To record RMTP/SRT/etc original clean media source.
|
|
395
460
|
- "transcoded" – To record the output transcoded version of the stream,
|
|
@@ -403,10 +468,12 @@ class Stream(BaseModel):
|
|
|
403
468
|
"""
|
|
404
469
|
An instant screenshot taken from a live stream, and available as a static JPEG
|
|
405
470
|
image. Resolution 1080 pixels wide, or less if the original stream has a lower
|
|
406
|
-
resolution.
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
471
|
+
resolution.
|
|
472
|
+
|
|
473
|
+
Screenshot is taken every 10 seconds while the stream is live. This field
|
|
474
|
+
contains a link to the last screenshot created by the system. Screenshot history
|
|
475
|
+
is not stored, so if you need a series of screenshots over time, then download
|
|
476
|
+
them.
|
|
410
477
|
"""
|
|
411
478
|
|
|
412
479
|
started_at_backup: Optional[str] = None
|
|
@@ -418,36 +485,40 @@ class Stream(BaseModel):
|
|
|
418
485
|
started_at_primary: Optional[str] = None
|
|
419
486
|
"""Time of the last session when main server started receiving the stream.
|
|
420
487
|
|
|
421
|
-
Datetime in ISO 8601.
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
488
|
+
Datetime in ISO 8601.
|
|
489
|
+
|
|
490
|
+
This means that if the stream was started 1 time, then here will be the time it
|
|
491
|
+
was started. If the stream was started several times, or restarted on your side,
|
|
492
|
+
then only the time of the last session is displayed here.
|
|
425
493
|
"""
|
|
426
494
|
|
|
427
495
|
transcoded_qualities: Optional[List[str]] = None
|
|
428
496
|
"""Array of qualities to which live stream is transcoded"""
|
|
429
497
|
|
|
430
498
|
transcoding_speed: Optional[float] = None
|
|
431
|
-
"""Speed of transcoding the stream.
|
|
499
|
+
"""Speed of transcoding the stream.
|
|
432
500
|
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
501
|
+
Mainly it must be 1.0 for real-time processing. May be less than 1.0 if your
|
|
502
|
+
stream has problems in delivery due to your local internet provider's
|
|
503
|
+
conditions, or the stream does not meet stream inbound requirements. See
|
|
504
|
+
Knowledge Base for details.
|
|
436
505
|
"""
|
|
437
506
|
|
|
438
507
|
uri: Optional[str] = None
|
|
439
|
-
"""
|
|
440
|
-
|
|
441
|
-
multiple addresses separated by a space (" "), so you can
|
|
442
|
-
plan. In this case, the specified addresses will be selected
|
|
443
|
-
round robin scheduling. If the first address does not respond,
|
|
444
|
-
in the list will be automatically requested, returning to the
|
|
445
|
-
a circle. Also, if the sucessfully working stream stops
|
|
446
|
-
next one will be selected according to the same scheme.
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
508
|
+
"""When using PULL method, this is the URL to pull a stream from.
|
|
509
|
+
|
|
510
|
+
You can specify multiple addresses separated by a space (" "), so you can
|
|
511
|
+
organize a backup plan. In this case, the specified addresses will be selected
|
|
512
|
+
one by one using round robin scheduling. If the first address does not respond,
|
|
513
|
+
then the next one in the list will be automatically requested, returning to the
|
|
514
|
+
first and so on in a circle. Also, if the sucessfully working stream stops
|
|
515
|
+
sending data, then the next one will be selected according to the same scheme.
|
|
516
|
+
|
|
517
|
+
After 2 hours of inactivity of your original stream, the system stops PULL
|
|
518
|
+
requests and the stream is deactivated (the "active" field switches to "false").
|
|
519
|
+
|
|
520
|
+
Please, note that this field is for PULL only, so is not suitable for PUSH. Look
|
|
521
|
+
at fields "`push_url`" and "`push_url_srt`" from GET method.
|
|
451
522
|
"""
|
|
452
523
|
|
|
453
524
|
video_height: Optional[float] = None
|
|
@@ -9,40 +9,51 @@ __all__ = ["StreamCreateClipParams"]
|
|
|
9
9
|
|
|
10
10
|
class StreamCreateClipParams(TypedDict, total=False):
|
|
11
11
|
duration: Required[int]
|
|
12
|
-
"""
|
|
13
|
-
|
|
14
|
-
based on the idea of instantly creating a clip,
|
|
15
|
-
final segment may be:
|
|
12
|
+
"""Requested segment duration in seconds to be cut.
|
|
13
|
+
|
|
14
|
+
Please, note that cutting is based on the idea of instantly creating a clip,
|
|
15
|
+
instead of precise timing. So final segment may be:
|
|
16
16
|
|
|
17
17
|
- Less than the specified value if there is less data in the DVR than the
|
|
18
18
|
requested segment.
|
|
19
19
|
- Greater than the specified value, because segment is aligned to the first and
|
|
20
20
|
last key frames of already stored fragment in DVR, this way -1 and +1 chunks
|
|
21
|
-
can be added to left and right.
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
can be added to left and right.
|
|
22
|
+
|
|
23
|
+
Duration of cutted segment cannot be greater than DVR duration for this stream.
|
|
24
|
+
Therefore, to change the maximum, use "`dvr_duration`" parameter of this stream.
|
|
24
25
|
"""
|
|
25
26
|
|
|
26
27
|
expiration: int
|
|
27
|
-
"""
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
"""Expire time of the clip via a public link.
|
|
29
|
+
|
|
30
|
+
Unix timestamp in seconds, absolute value.
|
|
31
|
+
|
|
32
|
+
This is the time how long the instant clip will be stored in the server memory
|
|
33
|
+
and can be accessed via public HLS/MP4 links. Download and/or use the instant
|
|
34
|
+
clip before this time expires.
|
|
35
|
+
|
|
36
|
+
After the time has expired, the clip is deleted from memory and is no longer
|
|
37
|
+
available via the link. You need to create a new segment, or use
|
|
38
|
+
`vod_required: true` attribute.
|
|
39
|
+
|
|
40
|
+
If value is omitted, then expiration is counted as +3600 seconds (1 hour) to the
|
|
41
|
+
end of the clip (i.e. `unix timestamp = <start> + <duration> + 3600`).
|
|
42
|
+
|
|
43
|
+
Allowed range: 1m <= expiration <= 4h.
|
|
44
|
+
|
|
45
|
+
Example:
|
|
37
46
|
`24.05.2024 14:00:00 (GMT) + 60 seconds of duration + 3600 seconds of expiration = 24.05.2024 15:01:00 (GMT) is Unix timestamp = 1716562860`
|
|
38
47
|
"""
|
|
39
48
|
|
|
40
49
|
start: int
|
|
41
|
-
"""
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
50
|
+
"""Starting point of the segment to cut.
|
|
51
|
+
|
|
52
|
+
Unix timestamp in seconds, absolute value. Example:
|
|
53
|
+
`24.05.2024 14:00:00 (GMT) is Unix timestamp = 1716559200`
|
|
54
|
+
|
|
55
|
+
If a value from the past is specified, it is used as the starting point for the
|
|
56
|
+
segment to cut. If the value is omitted, then clip will start from now.
|
|
46
57
|
"""
|
|
47
58
|
|
|
48
59
|
vod_required: bool
|