├── .github
└── PULL_REQUEST_TEMPLATE.md
├── .gitignore
├── LICENSE
├── README.md
├── bitmovin
├── __init__.py
├── bitmovin.py
├── bitmovin_object.py
├── errors
│ ├── __init__.py
│ ├── bitmovin_api_error.py
│ ├── bitmovin_error.py
│ ├── bitmovin_resource_not_found_error.py
│ ├── functionality_not_available_error.py
│ ├── invalid_status_error.py
│ ├── invalid_type_error.py
│ ├── missing_argument_error.py
│ ├── timeout_error.py
│ └── unique_constraint_violation_error.py
├── package_information.py
├── resources
│ ├── __init__.py
│ ├── abstract_custom_data_resource.py
│ ├── abstract_id_resource.py
│ ├── abstract_name_description_resource.py
│ ├── enums
│ │ ├── __init__.py
│ │ ├── aac_channel_layout.py
│ │ ├── ac3_channel_layout.py
│ │ ├── acl_permission.py
│ │ ├── audio_mix_filter_channel_layout.py
│ │ ├── audio_mix_filter_channel_type.py
│ │ ├── audio_video_sync_mode.py
│ │ ├── av1_adaptive_quant_mode.py
│ │ ├── av1_key_placement_mode.py
│ │ ├── av1_rate_control_mode.py
│ │ ├── aws_cloud_region.py
│ │ ├── badapt.py
│ │ ├── caption_character_encoding.py
│ │ ├── channel_layout.py
│ │ ├── chroma_location.py
│ │ ├── cloud_region.py
│ │ ├── color_primaries.py
│ │ ├── color_range.py
│ │ ├── color_space.py
│ │ ├── color_transfer.py
│ │ ├── crop_filter_unit.py
│ │ ├── dash_manifest_profile.py
│ │ ├── deinterlace_mode.py
│ │ ├── encoder_version.py
│ │ ├── encoding_mode.py
│ │ ├── encoding_status_values.py
│ │ ├── fmp4_representation_type.py
│ │ ├── font.py
│ │ ├── ftp_transfer_version.py
│ │ ├── google_cloud_region.py
│ │ ├── h264_Preset.py
│ │ ├── h264_adaptive_quantization_mode.py
│ │ ├── h264_b_pyramid.py
│ │ ├── h264_interlace_mode.py
│ │ ├── h264_level.py
│ │ ├── h264_motion_estimation_method.py
│ │ ├── h264_nal_hrd.py
│ │ ├── h264_partition.py
│ │ ├── h264_profile.py
│ │ ├── h264_sub_me.py
│ │ ├── h264_trellis.py
│ │ ├── h265_adaptive_quantization_mode.py
│ │ ├── h265_level.py
│ │ ├── h265_profile.py
│ │ ├── he_aac_signaling.py
│ │ ├── hls_version.py
│ │ ├── id3_tag_position_mode.py
│ │ ├── input_color_range.py
│ │ ├── input_color_space.py
│ │ ├── interlace_mode.py
│ │ ├── internal_chunk_length_mode.py
│ │ ├── iv_size.py
│ │ ├── live_encoding_mode.py
│ │ ├── max_ctu_size.py
│ │ ├── motion_search.py
│ │ ├── mp2_channel_layout.py
│ │ ├── mp4_muxing_manifest_type.py
│ │ ├── mv_prediction_mode.py
│ │ ├── picture_field_parity.py
│ │ ├── pixel_format.py
│ │ ├── playready_method.py
│ │ ├── position_mode.py
│ │ ├── s3_sig_version.py
│ │ ├── scaling_algorithm.py
│ │ ├── selection_mode.py
│ │ ├── set_rai_on_au.py
│ │ ├── status.py
│ │ ├── stream_conditions_mode.py
│ │ ├── stream_decoding_error_mode.py
│ │ ├── stream_mode.py
│ │ ├── thumbnail_unit.py
│ │ ├── tu_inter_depth.py
│ │ ├── tu_intra_depth.py
│ │ ├── vertical_low_pass_filtering_mode.py
│ │ ├── video_format.py
│ │ ├── vp9_aq_mode.py
│ │ ├── vp9_arnr_type.py
│ │ ├── vp9_quality.py
│ │ ├── watermark_unit.py
│ │ └── webm_representation_type.py
│ ├── factories
│ │ ├── H264CodecConfigurationFactory.py
│ │ └── __init__.py
│ ├── link.py
│ ├── message.py
│ ├── models
│ │ ├── __init__.py
│ │ ├── abstract_model.py
│ │ ├── analytics
│ │ │ ├── __init__.py
│ │ │ ├── analytics_domain.py
│ │ │ └── analytics_license.py
│ │ ├── codecconfigurations
│ │ │ ├── __init__.py
│ │ │ ├── aac_codec_configuration.py
│ │ │ ├── abstract_codec_configuration.py
│ │ │ ├── ac3_codec_configuration.py
│ │ │ ├── audio_codec_configuration.py
│ │ │ ├── av1_codec_configuration.py
│ │ │ ├── cea_608_708_subtitle_config.py
│ │ │ ├── color_config.py
│ │ │ ├── eac3_codec_configuration.py
│ │ │ ├── h264_codec_configuration.py
│ │ │ ├── h265_codec_configuration.py
│ │ │ ├── he_aac_v1.py
│ │ │ ├── he_aac_v2.py
│ │ │ ├── mjpeg_codec_configuration.py
│ │ │ ├── mp2_codec_configuration.py
│ │ │ ├── mp3_codec_configuration.py
│ │ │ ├── opus_codec_configuration.py
│ │ │ ├── video_codec_configuration.py
│ │ │ ├── vorbis_codec_configuration.py
│ │ │ └── vp9_codec_configuration.py
│ │ ├── custom_data.py
│ │ ├── encodings
│ │ │ ├── __init__.py
│ │ │ ├── acl_entry.py
│ │ │ ├── captions
│ │ │ │ ├── __init__.py
│ │ │ │ └── burn_in_srt_subtitle.py
│ │ │ ├── conditions
│ │ │ │ ├── __init__.py
│ │ │ │ ├── abstract_condition.py
│ │ │ │ ├── abstract_conjunction.py
│ │ │ │ ├── and_conjunction.py
│ │ │ │ ├── condition.py
│ │ │ │ ├── condition_json_converter.py
│ │ │ │ ├── condition_type.py
│ │ │ │ └── or_conjunction.py
│ │ │ ├── drms
│ │ │ │ ├── __init__.py
│ │ │ │ ├── aes_drm.py
│ │ │ │ ├── cenc_drm.py
│ │ │ │ ├── cenc_fairplay_entry.py
│ │ │ │ ├── cenc_marlin_entry.py
│ │ │ │ ├── cenc_playready_entry.py
│ │ │ │ ├── cenc_widevine_entry.py
│ │ │ │ ├── clearkey_drm.py
│ │ │ │ ├── drm.py
│ │ │ │ ├── drm_status.py
│ │ │ │ ├── fairplay_drm.py
│ │ │ │ ├── marlin_drm.py
│ │ │ │ ├── playready_drm.py
│ │ │ │ ├── playready_drm_additional_information.py
│ │ │ │ ├── primetime_drm.py
│ │ │ │ └── widevine_drm.py
│ │ │ ├── encoding.py
│ │ │ ├── encoding_input.py
│ │ │ ├── encoding_live_details.py
│ │ │ ├── encoding_output.py
│ │ │ ├── encoding_status.py
│ │ │ ├── id3
│ │ │ │ ├── __init__.py
│ │ │ │ ├── frame_id_id3_tag.py
│ │ │ │ ├── id3_tag.py
│ │ │ │ ├── plain_text_id3_tag.py
│ │ │ │ └── raw_id3_tag.py
│ │ │ ├── ignored_by.py
│ │ │ ├── ignored_by_type.py
│ │ │ ├── infrastructure.py
│ │ │ ├── inputstreams
│ │ │ │ ├── __init__.py
│ │ │ │ ├── abstract_trimming_input_stream.py
│ │ │ │ ├── concatenation_input_stream.py
│ │ │ │ ├── concatenation_input_stream_configuration.py
│ │ │ │ ├── h264_picture_timing_trimming_input_stream.py
│ │ │ │ ├── ingest_input_stream.py
│ │ │ │ ├── time_based_trimming_input_stream.py
│ │ │ │ └── time_code_track_trimming_input_stream.py
│ │ │ ├── keyframe.py
│ │ │ ├── live
│ │ │ │ ├── __init__.py
│ │ │ │ ├── auto_restart_configuration.py
│ │ │ │ ├── live_dash_manifest.py
│ │ │ │ ├── live_hls_manifest.py
│ │ │ │ └── live_stream_configuration.py
│ │ │ ├── muxings
│ │ │ │ ├── __init__.py
│ │ │ │ ├── broadcast_ts
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── broadcast_input_stream_configuration.py
│ │ │ │ │ ├── broadcast_ts_audio_stream_configuration.py
│ │ │ │ │ ├── broadcast_ts_muxing.py
│ │ │ │ │ ├── broadcast_ts_muxing_configuration.py
│ │ │ │ │ ├── broadcast_ts_program_configuration.py
│ │ │ │ │ ├── broadcast_ts_transport_configuration.py
│ │ │ │ │ └── broadcast_ts_video_stream_configuration.py
│ │ │ │ ├── fmp4_muxing.py
│ │ │ │ ├── information
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── byte_range.py
│ │ │ │ │ ├── mp4_muxing_information.py
│ │ │ │ │ ├── muxing_information_audio_track.py
│ │ │ │ │ ├── muxing_information_video_track.py
│ │ │ │ │ └── progressive_ts_information.py
│ │ │ │ ├── internal_chunk_length.py
│ │ │ │ ├── mp4_muxing.py
│ │ │ │ ├── muxing.py
│ │ │ │ ├── muxing_stream.py
│ │ │ │ ├── progressive_mov_muxing.py
│ │ │ │ ├── progressive_ts_muxing.py
│ │ │ │ ├── progressive_webm_muxing.py
│ │ │ │ ├── time_code.py
│ │ │ │ ├── ts_muxing.py
│ │ │ │ └── webm_muxing.py
│ │ │ ├── pertitle
│ │ │ │ ├── __init__.py
│ │ │ │ ├── auto_representation.py
│ │ │ │ ├── h264_per_title_configuration.py
│ │ │ │ ├── h265_per_title_configuration.py
│ │ │ │ ├── per_title.py
│ │ │ │ ├── per_title_configuration.py
│ │ │ │ └── vp9_per_title_configuration.py
│ │ │ ├── sprite.py
│ │ │ ├── start
│ │ │ │ ├── __init__.py
│ │ │ │ ├── manifests
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── start_manifest.py
│ │ │ │ │ ├── vod_dash_start_manifest.py
│ │ │ │ │ ├── vod_hls_start_manifest.py
│ │ │ │ │ └── vod_start_manifest.py
│ │ │ │ ├── scheduling.py
│ │ │ │ ├── start_encoding_request.py
│ │ │ │ ├── start_encoding_trimming.py
│ │ │ │ └── tweaks.py
│ │ │ ├── stream.py
│ │ │ ├── stream_filter.py
│ │ │ ├── stream_input.py
│ │ │ ├── stream_metadata.py
│ │ │ └── thumbnail.py
│ │ ├── filters
│ │ │ ├── __init__.py
│ │ │ ├── abstract_filter.py
│ │ │ ├── audio_mix_channel.py
│ │ │ ├── audio_mix_filter.py
│ │ │ ├── audio_mix_source_channel.py
│ │ │ ├── crop_filter.py
│ │ │ ├── deinterlace_filter.py
│ │ │ ├── denoise_hqdn3d_filter.py
│ │ │ ├── enhanced_watermark_filter.py
│ │ │ ├── interlace_filter.py
│ │ │ ├── rotate_filter.py
│ │ │ ├── scale_filter.py
│ │ │ ├── text_filter.py
│ │ │ ├── unsharp_filter.py
│ │ │ └── watermark_filter.py
│ │ ├── infrastructures
│ │ │ ├── __init__.py
│ │ │ ├── abstract_infrastructure.py
│ │ │ └── kubernetes_infrastructure.py
│ │ ├── inputs
│ │ │ ├── __init__.py
│ │ │ ├── abstract_input.py
│ │ │ ├── analysis
│ │ │ │ ├── __init__.py
│ │ │ │ ├── analysis.py
│ │ │ │ ├── analysis_audio_stream.py
│ │ │ │ ├── analysis_details.py
│ │ │ │ ├── analysis_message.py
│ │ │ │ ├── analysis_meta_stream.py
│ │ │ │ ├── analysis_status.py
│ │ │ │ ├── analysis_status_subtask.py
│ │ │ │ ├── analysis_stream.py
│ │ │ │ ├── analysis_stream_details.py
│ │ │ │ ├── analysis_subtitle_stream.py
│ │ │ │ ├── analysis_video_stream.py
│ │ │ │ ├── stream_analysis_details.py
│ │ │ │ └── stream_input_analysis.py
│ │ │ ├── aspera_input.py
│ │ │ ├── azure_input.py
│ │ │ ├── ftp_input.py
│ │ │ ├── gcs_input.py
│ │ │ ├── generic_s3_input.py
│ │ │ ├── http_input.py
│ │ │ ├── https_input.py
│ │ │ ├── local_input.py
│ │ │ ├── rtmp_input.py
│ │ │ ├── s3_input.py
│ │ │ ├── s3_role_based_input.py
│ │ │ ├── sftp_input.py
│ │ │ └── zixi_input.py
│ │ ├── manifests
│ │ │ ├── __init__.py
│ │ │ ├── abstract_manifest.py
│ │ │ ├── dash
│ │ │ │ ├── __init__.py
│ │ │ │ ├── abstract_adaptation_set.py
│ │ │ │ ├── abstract_dash_mp4_representation.py
│ │ │ │ ├── abstract_fmp4_representation.py
│ │ │ │ ├── audio_adaptation_set.py
│ │ │ │ ├── content_protection.py
│ │ │ │ ├── custom_xml_element.py
│ │ │ │ ├── dash_manifest.py
│ │ │ │ ├── dash_mp4_representation.py
│ │ │ │ ├── dash_name_space.py
│ │ │ │ ├── drm_fmp4_representation.py
│ │ │ │ ├── fmp4_representation.py
│ │ │ │ ├── period.py
│ │ │ │ ├── subtitle_adaptation_set.py
│ │ │ │ ├── video_adaptation_set.py
│ │ │ │ ├── vtt_representation.py
│ │ │ │ └── webm_representation.py
│ │ │ ├── hls
│ │ │ │ ├── __init__.py
│ │ │ │ ├── abstract_media.py
│ │ │ │ ├── abstract_standard_media.py
│ │ │ │ ├── audio_media.py
│ │ │ │ ├── closed_captions_media.py
│ │ │ │ ├── custom_tag.py
│ │ │ │ ├── hls_manifest.py
│ │ │ │ ├── subtitles_media.py
│ │ │ │ ├── variant_stream.py
│ │ │ │ ├── video_media.py
│ │ │ │ └── vtt_media.py
│ │ │ ├── manifest_status.py
│ │ │ └── smooth
│ │ │ │ ├── __init__.py
│ │ │ │ ├── abstract_mp4_representation.py
│ │ │ │ ├── content_protection.py
│ │ │ │ ├── mp4_representation.py
│ │ │ │ └── smooth_manifest.py
│ │ ├── minimal_model.py
│ │ └── outputs
│ │ │ ├── __init__.py
│ │ │ ├── abstract_output.py
│ │ │ ├── akamai_netstorage_output.py
│ │ │ ├── azure_output.py
│ │ │ ├── ftp_output.py
│ │ │ ├── gcs_output.py
│ │ │ ├── generic_s3_output.py
│ │ │ ├── local_output.py
│ │ │ ├── s3_output.py
│ │ │ ├── s3_role_based_output.py
│ │ │ └── sftp_output.py
│ ├── resource.py
│ ├── resource_response.py
│ ├── response.py
│ ├── response_data.py
│ ├── response_error_data.py
│ ├── response_error_data_detail.py
│ └── response_success_data.py
├── rest
│ ├── __init__.py
│ ├── http_client.py
│ └── utils.py
├── services
│ ├── __init__.py
│ ├── analytics
│ │ ├── __init__.py
│ │ ├── analytics_domain_service.py
│ │ ├── analytics_license_service.py
│ │ └── analytics_service.py
│ ├── codecconfigurations
│ │ ├── __init__.py
│ │ ├── aac_codec_configuration_service.py
│ │ ├── ac3_codec_configuration_service.py
│ │ ├── av1_codec_configuration_service.py
│ │ ├── codec_configuration_service.py
│ │ ├── eac3_codec_configuration_service.py
│ │ ├── h264_codec_configuration_service.py
│ │ ├── h265_codec_configuration_service.py
│ │ ├── he_aac_v1_codec_configuration_service.py
│ │ ├── he_aac_v2_codec_configuration_service.py
│ │ ├── mjpeg_codec_configuration_service.py
│ │ ├── mp2_codec_configuration_service.py
│ │ ├── mp3_codec_configuration_service.py
│ │ ├── opus_codec_configuration_service.py
│ │ ├── vorbis_codec_configuration_service.py
│ │ └── vp9_codec_configuration_service.py
│ ├── encodings
│ │ ├── __init__.py
│ │ ├── aes_drm_service.py
│ │ ├── broadcast_ts_muxing_service.py
│ │ ├── burn_in_srt_subtitle_service.py
│ │ ├── cenc_drm_service.py
│ │ ├── clearkey_drm_service.py
│ │ ├── concatenation_input_stream_service.py
│ │ ├── drm_service.py
│ │ ├── encoding_control_service.py
│ │ ├── encoding_service.py
│ │ ├── fairplay_drm_service.py
│ │ ├── fmp4_drm_service.py
│ │ ├── fmp4_muxing_service.py
│ │ ├── frame_id_id3_tag_service.py
│ │ ├── generic_drm_service.py
│ │ ├── generic_id3_tag_service.py
│ │ ├── generic_muxing_service.py
│ │ ├── h264_picture_timing_trimming_input_stream_service.py
│ │ ├── id3_tag_service.py
│ │ ├── ingest_input_stream_service.py
│ │ ├── input_analysis_service.py
│ │ ├── keyframe_service.py
│ │ ├── marlin_drm_service.py
│ │ ├── mp4_drm_service.py
│ │ ├── mp4_muxing_service.py
│ │ ├── muxing_service.py
│ │ ├── plain_text_id3_tag_service.py
│ │ ├── playready_drm_service.py
│ │ ├── primetime_drm_service.py
│ │ ├── progressive_mov_muxing_service.py
│ │ ├── progressive_ts_id3_service.py
│ │ ├── progressive_ts_muxing_service.py
│ │ ├── progressive_webm_muxing_service.py
│ │ ├── raw_id3_tag_service.py
│ │ ├── service.py
│ │ ├── sprite_service.py
│ │ ├── stream_filter_service.py
│ │ ├── stream_service.py
│ │ ├── thumbnail_service.py
│ │ ├── time_based_trimming_input_stream_service.py
│ │ ├── time_code_track_trimming_input_stream_service.py
│ │ ├── ts_drm_service.py
│ │ ├── ts_muxing_service.py
│ │ ├── webm_drm_service.py
│ │ ├── webm_muxing_service.py
│ │ └── widevine_drm_service.py
│ ├── filters
│ │ ├── __init__.py
│ │ ├── audiomix_filter_service.py
│ │ ├── crop_filter_service.py
│ │ ├── deinterlace_filter_service.py
│ │ ├── denoise_hqdn3d_filter_service.py
│ │ ├── enhanced_watermark_filter_service.py
│ │ ├── filter_service.py
│ │ ├── interlace_filter_service.py
│ │ ├── rotate_filter_service.py
│ │ ├── scale_filter_service.py
│ │ ├── text_filter_service.py
│ │ ├── unsharp_filter_service.py
│ │ └── watermark_filter_service.py
│ ├── infrastructures
│ │ ├── __init__.py
│ │ ├── infrastructure_service.py
│ │ └── kubernetes_infrastructure_service.py
│ ├── inputs
│ │ ├── __init__.py
│ │ ├── analyse_service.py
│ │ ├── aspera_input_service.py
│ │ ├── azure_input_service.py
│ │ ├── ftp_input_service.py
│ │ ├── gcs_input_service.py
│ │ ├── generic_s3_input_service.py
│ │ ├── http_input_service.py
│ │ ├── https_input_service.py
│ │ ├── input_service.py
│ │ ├── local_input_service.py
│ │ ├── rtmp_input_service.py
│ │ ├── s3_input_service.py
│ │ ├── s3_role_based_input_service.py
│ │ ├── sftp_input_service.py
│ │ └── zixi_input_service.py
│ ├── manifests
│ │ ├── __init__.py
│ │ ├── audio_media_service.py
│ │ ├── closed_captions_media_service.py
│ │ ├── dash_manifest_service.py
│ │ ├── generic_custom_tag_service.py
│ │ ├── generic_manifest_service.py
│ │ ├── generic_media_service.py
│ │ ├── hls_manifest_service.py
│ │ ├── manifest_control_service.py
│ │ ├── manifest_service.py
│ │ ├── media_custom_tag_service.py
│ │ ├── smooth_content_protection_service.py
│ │ ├── smooth_manifest_service.py
│ │ ├── smooth_representation_service.py
│ │ ├── stream_custom_tag_service.py
│ │ ├── subtitles_media_service.py
│ │ ├── variant_stream_service.py
│ │ ├── video_media_service.py
│ │ └── vtt_media_service.py
│ ├── outputs
│ │ ├── __init__.py
│ │ ├── akamai_netstorage_output_service.py
│ │ ├── azure_output_service.py
│ │ ├── ftp_output_service.py
│ │ ├── gcs_output_service.py
│ │ ├── generic_s3_output_service.py
│ │ ├── local_output_service.py
│ │ ├── output_service.py
│ │ ├── s3_output_service.py
│ │ ├── s3_role_based_output_service.py
│ │ └── sftp_output_service.py
│ ├── parsing_utils.py
│ └── rest_service.py
└── utils
│ ├── __init__.py
│ ├── serialization
│ ├── __init__.py
│ ├── bitmovin_json_encoder.py
│ └── serializable.py
│ └── timeout_utils.py
├── examples
├── analytics
│ └── add_domain.py
└── encoding
│ ├── .gitignore
│ ├── create_av1_encoding.py
│ ├── create_broadcast_ts_muxing.py
│ ├── create_concatenated_encoding.py
│ ├── create_concatenated_encoding_with_trimming.py
│ ├── create_dash_multiperiod_from_keyframes_and_ad.py
│ ├── create_drm_encoding.py
│ ├── create_encoding_dash_and_hls_with_vtt_subtitles.py
│ ├── create_encoding_dash_cenc_hls_fairplay.py
│ ├── create_encoding_with_multiple_audio_and_stream_conditions.py
│ ├── create_encoding_with_offset_and_duration.py
│ ├── create_encoding_with_s3_input_and_akamai_netstorage_output.py
│ ├── create_encoding_with_text_filter.py
│ ├── create_encoding_with_video_audio_and_stream_conditions.py
│ ├── create_encoding_with_video_audio_and_stream_conditions_auto_aspect.py
│ ├── create_hevc_encoding_with_dash_and_hls.py
│ ├── create_hls_fairplay_encoding.py
│ ├── create_hls_hevc_cenc_fairplay_encoding.py
│ ├── create_hls_with_keyframes_and_discontinuities.py
│ ├── create_mp4_encoding_and_get_information.py
│ ├── create_mp4_encoding_with_burned_in_srt_subtitle.py
│ ├── create_mp4_encoding_with_md5_meta_tag.py
│ ├── create_mp4_encoding_with_stream_metadata.py
│ ├── create_mp4_encoding_with_timecode.py
│ ├── create_multi_tenant_encoding.py
│ ├── create_per_title_encoding.py
│ ├── create_per_title_encoding_dash_hls_cenc_fairplay.py
│ ├── create_per_title_encoding_mp4.py
│ ├── create_progessive_ts_encoding_with_id3_tags.py
│ ├── create_progressive_ts_encoding_and_get_information.py
│ ├── create_progressive_webm_encoding_with_vp9_and_opus_codecs.py
│ ├── create_simple_crf_encoding.py
│ ├── create_simple_encoding.py
│ ├── create_simple_encoding_crop_filter.py
│ ├── create_simple_encoding_with_audio_mix_filter.py
│ ├── create_simple_encoding_with_deinterlace_filter.py
│ ├── create_simple_encoding_with_denoise_hqdn3d_filter.py
│ ├── create_simple_encoding_with_keyframes.py
│ ├── create_simple_encoding_with_sprite.py
│ ├── create_simple_fmp4_hls_dash_encoding.py
│ ├── create_simple_fmp4_hls_encoding.py
│ ├── create_simple_mp4_smooth_encoding.py
│ ├── create_simple_mp4_smooth_playready_encoding.py
│ ├── create_simple_ts_hls_encoding.py
│ ├── create_simple_vp9_encoding.py
│ ├── drm_integrations
│ └── create_drm_encoding_with_verimatrix.py
│ ├── get_encodings_by_status.py
│ ├── get_status_of_encoding.py
│ ├── infrastructure
│ ├── create_infrastructure.py
│ ├── create_simple_encoding_generics3_output.py
│ ├── create_simple_encoding_kubernetes.py
│ ├── create_simple_encoding_local_input_output.py
│ └── pull_infrastructure_status.py
│ ├── keyframe_archive_encoding.py
│ ├── live
│ ├── live_to_vod.py
│ ├── start_live_encoding.py
│ ├── start_live_encoding_dash_hls.py
│ ├── start_live_encoding_dash_manifest.py
│ ├── start_live_encoding_on_infrastructure_hls_manifest.py
│ ├── start_live_encoding_with_zixi_input.py
│ └── stop_live_encoding.py
│ ├── merge_audio_streams.py
│ ├── multiple_audio_dash_mpd.py
│ ├── multiple_audio_dash_mpd_auto_analysis.py
│ ├── multiple_audio_progressive_mp4.py
│ ├── retrieve_audio_language_from_analysis.py
│ └── retrieve_progressive_ts_information.py
├── requirements.txt
├── setup.py
└── tests
├── __init__.py
├── bitmovin
├── __init__.py
├── bitmovin_object_tests.py
├── bitmovin_test_case.py
├── bitmovin_tests.py
└── services
│ ├── __init__.py
│ ├── analytics
│ ├── analytics_domain_service_tests.py
│ └── analytics_license_service_tests.py
│ ├── codecconfigurations
│ ├── __init__.py
│ ├── aac_codec_configuration_tests.py
│ ├── ac3_codec_configuration_tests.py
│ ├── av1_codec_configuration_tests.py
│ ├── eac3_codec_configuration_tests.py
│ ├── h264_codec_configuration_tests.py
│ ├── h265_codec_configuration_tests.py
│ ├── he_aac_v1_codec_configuration_tests.py
│ ├── he_aac_v2_codec_configurations_tests.py
│ ├── mjpeg_codec_configuration_tests.py
│ ├── mp2_codec_configuration_tests.py
│ ├── mp3_codec_configuration_tests.py
│ ├── opus_codec_configuration_tests.py
│ ├── vorbis_codec_configuration_tests.py
│ └── vp9_codec_configuration_tests.py
│ ├── encodings
│ ├── __init__.py
│ ├── broadcast_ts_muxing_tests.py
│ ├── captions
│ │ ├── __init__.py
│ │ └── caption_tests.py
│ ├── concatenation_input_stream_tests.py
│ ├── drms
│ │ ├── __init__.py
│ │ ├── aes_drm_tests.py
│ │ ├── cenc_drm_tests.py
│ │ ├── clearkey_drm_tests.py
│ │ ├── fairplay_drm_tests.py
│ │ ├── marlin_drm_tests.py
│ │ ├── playready_drm_tests.py
│ │ ├── primetime_drm_tests.py
│ │ └── widevine_drm_tests.py
│ ├── encoding_cloud_region_tests.py
│ ├── encoding_sprite_tests.py
│ ├── encoding_start_tests.py
│ ├── encoding_tests.py
│ ├── encoding_thumbnail_tests.py
│ ├── fmp4_muxing_tests.py
│ ├── h264_picture_timing_trimming_input_stream_tests.py
│ ├── id3
│ │ ├── __init__.py
│ │ ├── frame_id_id3_tag_tests.py
│ │ ├── plain_text_id3_tag_tests.py
│ │ └── raw_id3_tag_tests.py
│ ├── ingest_input_stream_tests.py
│ ├── keyframe_tests.py
│ ├── mp4_muxing_tests.py
│ ├── progressive_mov_muxing_tests.py
│ ├── progressive_ts_muxing_tests.py
│ ├── progressive_webm_muxing_tests.py
│ ├── stream_tests.py
│ ├── time_based_trimming_input_stream_tests.py
│ ├── time_code_track_trimming_input_stream_tests.py
│ ├── ts_muxing_tests.py
│ └── webm_muxing_tests.py
│ ├── filters
│ ├── __init__.py
│ ├── audio_mix_filter_tests.py
│ ├── crop_filter_tests.py
│ ├── deinterlace_filter_tests.py
│ ├── denoise_hqdn3d_filter_tests.py
│ ├── enhanced_watermark_filter_tests.py
│ ├── interlace_filter_tests.py
│ ├── rotate_filter_tests.py
│ ├── scale_filter_tests.py
│ ├── text_filter_tests.py
│ ├── unsharp_filter_tests.py
│ └── watermark_filter_tests.py
│ ├── infrastructures
│ ├── __init__.py
│ └── kubernetes_infrastructure_tests.py
│ ├── inputs
│ ├── __init__.py
│ ├── analyze_service_tests.py
│ ├── aspera_input_service_tests.py
│ ├── azure_input_service_tests.py
│ ├── ftp_input_service_tests.py
│ ├── gcs_input_service_tests.py
│ ├── generic_s3_input_service_tests.py
│ ├── http_input_service_tests.py
│ ├── https_input_service_tests.py
│ ├── local_input_service_tests.py
│ ├── s3_input_service_tests.py
│ ├── s3_role_based_input_service_tests.py
│ ├── sftp_input_service_tests.py
│ └── zixi_input_service_tests.py
│ ├── manifests
│ ├── __init__.py
│ ├── dash
│ │ ├── __init__.py
│ │ ├── adaptationset_tests.py
│ │ ├── content_protection_tests.py
│ │ ├── dash_manifest_tests.py
│ │ ├── period_tests.py
│ │ └── representation_tests.py
│ ├── hls
│ │ ├── __init__.py
│ │ ├── audio_media_tests.py
│ │ ├── closed_captions_media_tests.py
│ │ ├── hls_manifest_tests.py
│ │ ├── subtitles_media_tests.py
│ │ ├── variant_stream_tests.py
│ │ ├── video_media_tests.py
│ │ └── vtt_media_tests.py
│ └── smooth
│ │ ├── __init__.py
│ │ ├── contentprotection_tests.py
│ │ ├── mp4_representation_tests.py
│ │ └── smooth_manifest_tests.py
│ └── outputs
│ ├── __init__.py
│ ├── akamai_netstorage_output_service_tests.py
│ ├── azure_output_service_tests.py
│ ├── ftp_output_service_tests.py
│ ├── gcs_output_service_tests.py
│ ├── generic_s3_output_service_tests.py
│ ├── local_output_service_tests.py
│ ├── s3_output_service_tests.py
│ ├── s3_role_based_output_service_tests.py
│ └── sftp_output_service_tests.py
└── utils.py
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ### PR Checklist
2 |
3 | - [ ] Code is PEP8 conform (https://www.python.org/dev/peps/pep-0008/)
4 | - [ ] PR contains tests for code changes
5 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | This is free and unencumbered software released into the public domain.
2 |
3 | Anyone is free to copy, modify, publish, use, compile, sell, or
4 | distribute this software, either in source code form or as a compiled
5 | binary, for any purpose, commercial or non-commercial, and by any
6 | means.
7 |
8 | In jurisdictions that recognize copyright laws, the author or authors
9 | of this software dedicate any and all copyright interest in the
10 | software to the public domain. We make this dedication for the benefit
11 | of the public at large and to the detriment of our heirs and
12 | successors. We intend this dedication to be an overt act of
13 | relinquishment in perpetuity of all present and future rights to this
14 | software under copyright law.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 | OTHER DEALINGS IN THE SOFTWARE.
23 |
24 | For more information, please refer to
25 |
--------------------------------------------------------------------------------
/bitmovin/__init__.py:
--------------------------------------------------------------------------------
1 | from .bitmovin import Bitmovin
2 | from .resources import *
3 |
--------------------------------------------------------------------------------
/bitmovin/bitmovin.py:
--------------------------------------------------------------------------------
1 | from .bitmovin_object import BitmovinObject
2 | from .rest import BitmovinHttpClient
3 | from .services import InputService, OutputService, FilterService, CodecConfigurationService, EncodingService, \
4 | ManifestService, InfrastructureService, AnalyticsService
5 |
6 |
7 | class Bitmovin(BitmovinObject):
8 | def __init__(self, api_key, api_base_url=None, tenant_org_id=None):
9 | super().__init__()
10 | self._api_key = api_key
11 | self._api_base_url = api_base_url
12 | self._tenant_org_id = tenant_org_id
13 | self._http_client = BitmovinHttpClient(api_key=self._api_key, base_url=self._api_base_url, tenant_org_id=self._tenant_org_id)
14 | self.inputs = InputService(http_client=self._http_client)
15 | self.outputs = OutputService(http_client=self._http_client)
16 | self.filters = FilterService(http_client=self._http_client)
17 | self.codecConfigurations = CodecConfigurationService(http_client=self._http_client)
18 | self.encodings = EncodingService(http_client=self._http_client)
19 | self.manifests = ManifestService(http_client=self._http_client)
20 | self.infrastructures = InfrastructureService(http_client=self._http_client)
21 | self.analytics = AnalyticsService(http_client=self._http_client)
22 |
--------------------------------------------------------------------------------
/bitmovin/bitmovin_object.py:
--------------------------------------------------------------------------------
1 | import logging
2 | import sys
3 |
4 |
5 | class BitmovinObject(object):
6 | def __init__(self, *args, **kwargs):
7 | self.logger = logging.getLogger(self.__class__.__module__ + "." + self.__class__.__name__)
8 | self._attach_console_logging_handler_if_not_existing()
9 |
10 | def _attach_console_logging_handler_if_not_existing(self):
11 | handlers = self.logger.handlers
12 | handler_already_exists = any(handler.name == 'bitmovin_console_handler' for handler in handlers)
13 |
14 | if handler_already_exists:
15 | return
16 |
17 | self.logger.setLevel(logging.DEBUG)
18 | console_handler = logging.StreamHandler(sys.stdout)
19 | console_handler.name = 'bitmovin_console_handler'
20 | formatter = logging.Formatter('%(asctime)-15s %(name)-5s %(levelname)-8s %(message)s')
21 | console_handler.setFormatter(formatter)
22 | self.logger.addHandler(console_handler)
23 |
--------------------------------------------------------------------------------
/bitmovin/errors/__init__.py:
--------------------------------------------------------------------------------
1 | from .bitmovin_error import BitmovinError
2 | from .bitmovin_api_error import BitmovinApiError
3 | from .invalid_status_error import InvalidStatusError
4 | from .invalid_type_error import InvalidTypeError
5 | from .unique_constraint_violation_error import UniqueConstraintViolationException
6 | from .missing_argument_error import MissingArgumentError
7 | from .functionality_not_available_error import FunctionalityNotAvailableError
8 | from .timeout_error import TimeoutError
9 |
--------------------------------------------------------------------------------
/bitmovin/errors/bitmovin_api_error.py:
--------------------------------------------------------------------------------
1 | from . import BitmovinError
2 |
3 |
4 | class BitmovinApiError(BitmovinError):
5 | def __init__(self, message, response=None):
6 | self.message = message
7 | self.response = response
8 |
9 |
--------------------------------------------------------------------------------
/bitmovin/errors/bitmovin_error.py:
--------------------------------------------------------------------------------
1 | class BitmovinError(Exception):
2 | pass
3 |
--------------------------------------------------------------------------------
/bitmovin/errors/bitmovin_resource_not_found_error.py:
--------------------------------------------------------------------------------
1 | from . import BitmovinError
2 |
3 |
4 | class BitmovinApiResourceNotFoundError(BitmovinError):
5 | def __init__(self, message, resource_type, resource_id):
6 | super().__init__()
7 | self.message = message
8 | self.resource_type = resource_type
9 | self.resource_id = resource_id
10 |
11 |
--------------------------------------------------------------------------------
/bitmovin/errors/functionality_not_available_error.py:
--------------------------------------------------------------------------------
1 | from . import BitmovinError
2 |
3 |
4 | class FunctionalityNotAvailableError(BitmovinError):
5 | pass
6 |
7 |
--------------------------------------------------------------------------------
/bitmovin/errors/invalid_status_error.py:
--------------------------------------------------------------------------------
1 | from . import BitmovinError
2 |
3 | class InvalidStatusError(BitmovinError):
4 | pass
5 |
6 |
--------------------------------------------------------------------------------
/bitmovin/errors/invalid_type_error.py:
--------------------------------------------------------------------------------
1 | from . import BitmovinError
2 |
3 | class InvalidTypeError(BitmovinError):
4 | pass
5 |
6 |
--------------------------------------------------------------------------------
/bitmovin/errors/missing_argument_error.py:
--------------------------------------------------------------------------------
1 | from . import BitmovinError
2 |
3 | class MissingArgumentError(BitmovinError):
4 | pass
5 |
6 |
--------------------------------------------------------------------------------
/bitmovin/errors/timeout_error.py:
--------------------------------------------------------------------------------
1 | from . import BitmovinError
2 |
3 |
4 | class TimeoutError(BitmovinError):
5 | def __init__(self, message):
6 | self.message = message
7 |
--------------------------------------------------------------------------------
/bitmovin/errors/unique_constraint_violation_error.py:
--------------------------------------------------------------------------------
1 | from . import BitmovinError
2 |
3 | class UniqueConstraintViolationException(BitmovinError):
4 | pass
5 |
6 |
--------------------------------------------------------------------------------
/bitmovin/package_information.py:
--------------------------------------------------------------------------------
1 | NAME = 'bitmovin-python'
2 | VERSION = '1.60.1'
3 |
--------------------------------------------------------------------------------
/bitmovin/resources/__init__.py:
--------------------------------------------------------------------------------
1 | from .enums import Status
2 | from .resource import Resource
3 | from .abstract_custom_data_resource import AbstractCustomDataResource
4 | from .abstract_id_resource import AbstractIdResource
5 | from .abstract_name_description_resource import AbstractNameDescriptionResource
6 | from .enums import *
7 | from .link import Link
8 | from .message import Message
9 | from .models import *
10 | from .resource_response import ResourceResponse
11 | from .response import Response
12 | from .response_data import ResponseData
13 | from .response_error_data import ResponseErrorData
14 | from .response_error_data_detail import ResponseErrorDataDetail
15 | from .response_success_data import ResponseSuccessData
16 |
17 |
--------------------------------------------------------------------------------
/bitmovin/resources/abstract_custom_data_resource.py:
--------------------------------------------------------------------------------
1 | import abc
2 |
3 | from .resource import Resource
4 |
5 |
6 | class AbstractCustomDataResource(Resource):
7 | __metaclass__ = abc.ABCMeta
8 |
9 | def __init__(self, custom_data=None, **kwargs):
10 | self.customData = custom_data
11 | super().__init__(**kwargs)
12 |
13 | def parse_from_json_object(self, json_object):
14 | raise NotImplementedError()
15 |
--------------------------------------------------------------------------------
/bitmovin/resources/abstract_id_resource.py:
--------------------------------------------------------------------------------
1 | import abc
2 |
3 | from .resource import Resource
4 |
5 |
6 | class AbstractIdResource(Resource):
7 | __metaclass__ = abc.ABCMeta
8 |
9 | def __init__(self, id_=None, **kwargs):
10 | self.id = id_
11 | super().__init__(**kwargs)
12 |
13 | def parse_from_json_object(self, json_object):
14 | raise NotImplementedError()
15 |
--------------------------------------------------------------------------------
/bitmovin/resources/abstract_name_description_resource.py:
--------------------------------------------------------------------------------
1 | import abc
2 |
3 | from .resource import Resource
4 |
5 | class AbstractNameDescriptionResource(Resource):
6 | __metaclass__ = abc.ABCMeta
7 |
8 | def __init__(self, name=None, description=None, **kwargs):
9 | self.name = name
10 | self.description = description
11 | super().__init__(**kwargs)
12 |
13 | def parse_from_json_object(self, json_object):
14 | raise NotImplementedError()
15 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/aac_channel_layout.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class AACChannelLayout(enum.Enum):
5 | NONE = 'NONE'
6 | CL_MONO = 'MONO'
7 | CL_STEREO = 'STEREO'
8 | CL_2_1 = '2.1'
9 | CL_SURROUND = 'SURROUND'
10 | CL_3_1 = '3.1'
11 | CL_4_0 = '4.0'
12 | CL_4_1 = '4.1'
13 | CL_2_2 = '2.2'
14 | CL_QUAD = 'QUAD'
15 | CL_5_0 = '5.0'
16 | CL_5_1 = '5.1'
17 | CL_5_0_BACK = '5.0_BACK'
18 | CL_5_1_BACK = '5.1_BACK'
19 | CL_6_0 = '6.0'
20 | CL_6_0_FRONT = '6.0_FRONT'
21 | CL_HEXAGONAL = 'HEXAGONAL'
22 | CL_6_1 = '6.1'
23 | CL_6_1_BACK = '6.1_BACK'
24 | CL_6_1_FRONT = '6.1_FRONT'
25 | CL_7_0 = '7.0'
26 | CL_7_0_FRONT = '7.0_FRONT'
27 | CL_7_1 = '7.1'
28 | CL_7_1_WIDE = '7.1_WIDE'
29 | CL_7_1_WIDE_BACK = '7.1_WIDE_BACK'
30 | CL_OCTAGONAL = 'OCTAGONAL'
31 | CL_STEREO_DOWNMIX = 'STEREO_DOWNMIX'
32 |
33 | @staticmethod
34 | def default():
35 | return AACChannelLayout.NONE
36 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/ac3_channel_layout.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class AC3ChannelLayout(enum.Enum):
5 | NONE = 'NONE'
6 | CL_MONO = 'MONO'
7 | CL_STEREO = 'STEREO'
8 | CL_2_1 = '2.1'
9 | CL_SURROUND = 'SURROUND'
10 | CL_3_1 = '3.1'
11 | CL_4_0 = '4.0'
12 | CL_4_1 = '4.1'
13 | CL_2_2 = '2.2'
14 | CL_QUAD = 'QUAD'
15 | CL_5_0 = '5.0'
16 | CL_5_1 = '5.1'
17 | CL_5_0_BACK = '5.0_BACK'
18 | CL_5_1_BACK = '5.1_BACK'
19 | CL_6_0 = '6.0'
20 | CL_6_0_FRONT = '6.0_FRONT'
21 | CL_HEXAGONAL = 'HEXAGONAL'
22 | CL_6_1 = '6.1'
23 | CL_6_1_BACK = '6.1_BACK'
24 | CL_6_1_FRONT = '6.1_FRONT'
25 | CL_7_0 = '7.0'
26 | CL_7_0_FRONT = '7.0_FRONT'
27 | CL_7_1 = '7.1'
28 | CL_7_1_WIDE = '7.1_WIDE'
29 | CL_7_1_WIDE_BACK = '7.1_WIDE_BACK'
30 | CL_OCTAGONAL = 'OCTAGONAL'
31 | CL_STEREO_DOWNMIX = 'STEREO_DOWNMIX'
32 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/acl_permission.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class ACLPermission(enum.Enum):
5 | PUBLIC_READ = 'PUBLIC_READ'
6 | PRIVATE = 'PRIVATE'
7 |
8 | @staticmethod
9 | def default():
10 | return ACLPermission.PUBLIC_READ
11 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/audio_mix_filter_channel_layout.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class AudioMixFilterChannelLayout(enum.Enum):
5 | NONE = 'NONE'
6 | CL_MONO = 'MONO'
7 | CL_STEREO = 'STEREO'
8 | CL_2_1 = '2.1'
9 | CL_SURROUND = 'SURROUND'
10 | CL_3_1 = '3.1'
11 | CL_4_0 = '4.0'
12 | CL_4_1 = '4.1'
13 | CL_2_2 = '2.2'
14 | CL_QUAD = 'QUAD'
15 | CL_5_0 = '5.0'
16 | CL_5_1 = '5.1'
17 | CL_5_0_BACK = '5.0_BACK'
18 | CL_5_1_BACK = '5.1_BACK'
19 | CL_6_0 = '6.0'
20 | CL_6_0_FRONT = '6.0_FRONT'
21 | CL_HEXAGONAL = 'HEXAGONAL'
22 | CL_6_1 = '6.1'
23 | CL_6_1_BACK = '6.1_BACK'
24 | CL_6_1_FRONT = '6.1_FRONT'
25 | CL_7_0 = '7.0'
26 | CL_7_0_FRONT = '7.0_FRONT'
27 | CL_7_1 = '7.1'
28 | CL_7_1_WIDE = '7.1_WIDE'
29 | CL_7_1_WIDE_BACK = '7.1_WIDE_BACK'
30 | CL_OCTAGONAL = 'OCTAGONAL'
31 | CL_STEREO_DOWNMIX = 'STEREO_DOWNMIX'
32 |
33 | @staticmethod
34 | def default():
35 | return AudioMixFilterChannelLayout.NONE
36 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/audio_mix_filter_channel_type.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class AudioMixFilterChannelType(enum.Enum):
5 | CHANNEL_NUMBER = 'CHANNEL_NUMBER'
6 | FRONT_LEFT = 'FRONT_LEFT'
7 | FRONT_RIGHT = 'FRONT_RIGHT'
8 | CENTER = 'CENTER'
9 | LOW_FREQUENCY = 'LOW_FREQUENCY'
10 | BACK_LEFT = 'BACK_LEFT'
11 | BACK_RIGHT = 'BACK_RIGHT'
12 | SURROUND_LEFT = 'SURROUND_LEFT'
13 | SURROUND_RIGHT = 'SURROUND_RIGHT'
14 |
15 | @staticmethod
16 | def default():
17 | return AudioMixFilterChannelType.CHANNEL_NUMBER
18 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/audio_video_sync_mode.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class AudioVideoSyncMode(enum.Enum):
5 | STANDARD = 'STANDARD'
6 | RESYNC_AT_START = 'RESYNC_AT_START'
7 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/av1_adaptive_quant_mode.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class AV1AdaptiveQuantMode(enum.Enum):
5 | OFF = 'OFF'
6 | VARIANCE = 'VARIANCE'
7 | COMPLEXITY = 'COMPLEXITY'
8 | CYCLIC_REFRESH = 'CYCLIC_REFRESH'
9 | DELTA_QUANT = 'DELTA_QUANT'
10 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/av1_key_placement_mode.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class AV1KeyPlacementMode(enum.Enum):
5 | AUTO = 'AUTO'
6 | FIXED = 'FIXED'
7 | DISABLED = 'DISABLED'
8 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/av1_rate_control_mode.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class AV1RateControlMode(enum.Enum):
5 | VARIABLE = 'VARIABLE'
6 | CONSTANT = 'CONSTANT'
7 | CONSTRAINED_QUALITY = 'CONSTRAINED_QUALITY'
8 | CONSTANT_QUALITY = 'CONSTANT_QUALITY'
9 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/aws_cloud_region.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class AWSCloudRegion(enum.Enum):
5 | AP_NORTHEAST_1 = 'AP_NORTHEAST_1'
6 | AP_NORTHEAST_2 = 'AP_NORTHEAST_2'
7 | AP_SOUTHEAST_1 = 'AP_SOUTHEAST_1'
8 | AP_SOUTHEAST_2 = 'AP_SOUTHEAST_2'
9 | AP_SOUTH_1 = 'AP_SOUTH_1'
10 | EU_CENTRAL_1 = 'EU_CENTRAL_1'
11 | EU_WEST_1 = 'EU_WEST_1'
12 | SA_EAST_1 = 'SA_EAST_1'
13 | US_EAST_1 = 'US_EAST_1'
14 | US_WEST_1 = 'US_WEST_1'
15 | US_WEST_2 = 'US_WEST_2'
16 |
17 | @staticmethod
18 | def default():
19 | return AWSCloudRegion.EU_WEST_1
20 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/badapt.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class BAdapt(enum.Enum):
5 | NONE = 'NONE'
6 | FAST = 'FAST'
7 | FULL = 'FULL'
8 |
9 | @staticmethod
10 | def default():
11 | return BAdapt.FULL
12 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/channel_layout.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class ChannelLayout(enum.Enum):
5 | NONE = 'NONE'
6 | CL_MONO = 'MONO'
7 | CL_STEREO = 'STEREO'
8 | CL_2_1 = '2.1'
9 | CL_SURROUND = 'SURROUND'
10 | CL_3_1 = '3.1'
11 | CL_4_0 = '4.0'
12 | CL_4_1 = '4.1'
13 | CL_2_2 = '2.2'
14 | CL_QUAD = 'QUAD'
15 | CL_5_0 = '5.0'
16 | CL_5_1 = '5.1'
17 | CL_5_0_BACK = '5.0_BACK'
18 | CL_5_1_BACK = '5.1_BACK'
19 | CL_6_0 = '6.0'
20 | CL_6_0_FRONT = '6.0_FRONT'
21 | CL_HEXAGONAL = 'HEXAGONAL'
22 | CL_6_1 = '6.1'
23 | CL_6_1_BACK = '6.1_BACK'
24 | CL_6_1_FRONT = '6.1_FRONT'
25 | CL_7_0 = '7.0'
26 | CL_7_0_FRONT = '7.0_FRONT'
27 | CL_7_1 = '7.1'
28 | CL_7_1_WIDE = '7.1_WIDE'
29 | CL_7_1_WIDE_BACK = '7.1_WIDE_BACK'
30 | CL_OCTAGONAL = 'OCTAGONAL'
31 | CL_STEREO_DOWNMIX = 'STEREO_DOWNMIX'
32 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/chroma_location.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class ChromaLocation(enum.Enum):
5 | UNSPECIFIED = 'UNSPECIFIED'
6 | LEFT = 'LEFT'
7 | CENTER = 'CENTER'
8 | TOPLEFT = 'TOPLEFT'
9 | TOP = 'TOP'
10 | BOTTOMLEFT = 'BOTTOMLEFT'
11 | BOTTOM = 'BOTTOM'
12 |
13 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/cloud_region.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class CloudRegion(enum.Enum):
5 | AUTO = 'AUTO'
6 | AZURE_EUROPE_WEST = 'AZURE_EUROPE_WEST'
7 | AWS_AP_NORTHEAST_1 = 'AWS_AP_NORTHEAST_1'
8 | AWS_AP_NORTHEAST_2 = 'AWS_AP_NORTHEAST_2'
9 | AWS_AP_SOUTHEAST_1 = 'AWS_AP_SOUTHEAST_1'
10 | AWS_AP_SOUTHEAST_2 = 'AWS_AP_SOUTHEAST_2'
11 | AWS_AP_SOUTH_1 = 'AWS_AP_SOUTH_1'
12 | AWS_EU_CENTRAL_1 = 'AWS_EU_CENTRAL_1'
13 | AWS_EU_WEST_1 = 'AWS_EU_WEST_1'
14 | AWS_SA_EAST_1 = 'AWS_SA_EAST_1'
15 | AWS_US_EAST_1 = 'AWS_US_EAST_1'
16 | AWS_US_WEST_1 = 'AWS_US_WEST_1'
17 | AWS_US_WEST_2 = 'AWS_US_WEST_2'
18 | GOOGLE_ASIA_EAST_1 = 'GOOGLE_ASIA_EAST_1'
19 | GOOGLE_EUROPE_WEST_1 = 'GOOGLE_EUROPE_WEST_1'
20 | GOOGLE_US_CENTRAL_1 = 'GOOGLE_US_CENTRAL_1'
21 | GOOGLE_US_WEST_1 = 'GOOGLE_US_WEST_1'
22 | GOOGLE_US_EAST_1 = 'GOOGLE_US_EAST_1'
23 | NORTH_AMERICA = 'NORTH_AMERICA'
24 | SOUTH_AMERICA = 'SOUTH_AMERICA'
25 | EUROPE = 'EUROPE'
26 | AFRICA = 'AFRICA'
27 | ASIA = 'ASIA'
28 | AUSTRALIA = 'AUSTRALIA'
29 | AWS = 'AWS'
30 | GOOGLE = 'GOOGLE'
31 | KUBERNETES = 'KUBERNETES'
32 | EXTERNAL = 'EXTERNAL'
33 |
34 | @staticmethod
35 | def default():
36 | return CloudRegion.GOOGLE_EUROPE_WEST_1
37 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/color_primaries.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class ColorPrimaries(enum.Enum):
5 | UNSPECIFIED = 'UNSPECIFIED'
6 | BT709 = 'BT709'
7 | BT470M = 'BT470M'
8 | BT470BG = 'BT470BG'
9 | SMPTE170M = 'SMPTE170M'
10 | SMPTE240M = 'SMPTE240M'
11 | FILM = 'FILM'
12 | BT2020 = 'BT2020'
13 | SMPTE428 = 'SMPTE428'
14 | SMPTEST428_1 = 'SMPTEST428_1'
15 | SMPTE431 = 'SMPTE431'
16 | SMPTE432 = 'SMPTE432'
17 | JEDEC_P22 = 'JEDEC_P22'
18 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/color_range.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class ColorRange(enum.Enum):
5 | UNSPECIFIED = 'UNSPECIFIED'
6 | MPEG = 'MPEG'
7 | JPEG = 'JPEG'
8 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/color_space.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class ColorSpace(enum.Enum):
5 | UNSPECIFIED = 'UNSPECIFIED'
6 | RGB = 'RGB'
7 | BT709 = 'BT709'
8 | FCC = 'FCC'
9 | BT470BG = 'BT470BG'
10 | SMPTE170M = 'SMPTE170M'
11 | SMPTE240M = 'SMPTE240M'
12 | YCGCO = 'YCGCO'
13 | YCOCG = 'YCOCG'
14 | BT2020_NCL = 'BT2020_NCL'
15 | BT2020_CL = 'BT2020_CL'
16 | SMPTE2085 = 'SMPTE2085'
17 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/color_transfer.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class ColorTransfer(enum.Enum):
5 | UNSPECIFIED = 'UNSPECIFIED'
6 | BT709 = 'BT709'
7 | GAMMA22 = 'GAMMA22'
8 | GAMMA28 = 'GAMMA28'
9 | SMPTE170M = 'SMPTE170M'
10 | SMPTE240M = 'SMPTE240M'
11 | LINEAR = 'LINEAR'
12 | LOG = 'LOG'
13 | LOG_SQRT = 'LOG_SQRT'
14 | IEC61966_2_4 = 'IEC61966_2_4'
15 | BT1361_ECG = 'BT1361_ECG'
16 | IEC61966_2_1 = 'IEC61966_2_1'
17 | BT2020_10 = 'BT2020_10'
18 | BT2020_12 = 'BT2020_12'
19 | SMPTE2084 = 'SMPTE2084'
20 | SMPTE428 = 'SMPTE428'
21 | ARIB_STD_B67 = 'ARIB_STD_B67'
22 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/crop_filter_unit.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class CropFilterUnit(enum.Enum):
5 | PIXELS = 'PIXELS'
6 | PERCENTS = 'PERCENTS'
7 |
8 | @staticmethod
9 | def default():
10 | return CropFilterUnit.PIXELS
11 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/dash_manifest_profile.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class DashManifestProfile(enum.Enum):
5 | LIVE = 'LIVE'
6 | ON_DEMAND = 'ON_DEMAND'
7 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/deinterlace_mode.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class DeinterlaceMode(enum.Enum):
5 | FRAME = 'FRAME'
6 | FIELD = 'FIELD'
7 | FRAME_NOSPATIAL = 'FRAME_NOSPATIAL'
8 | FIELD_NOSPATIAL = 'FIELD_NOSPATIAL'
9 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/encoder_version.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class EncoderVersion(enum.Enum):
5 | STABLE = 'STABLE'
6 | BETA = 'BETA'
7 | V0_16_0 = '0.16.0'
8 | V0_17_0 = '0.17.0'
9 |
10 | @staticmethod
11 | def default():
12 | return EncoderVersion.STABLE
13 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/encoding_mode.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class EncodingMode(enum.Enum):
5 | STANDARD = 'STANDARD'
6 | SINGLE_PASS = 'SINGLE_PASS'
7 | TWO_PASS = 'TWO_PASS'
8 | THREE_PASS = 'THREE_PASS'
9 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/encoding_status_values.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class EncodingStatusValues(enum.Enum):
5 | RUNNING = 'RUNNING'
6 | QUEUED = 'QUEUED'
7 | CREATED = 'CREATED'
8 | FINISHED = 'FINISHED'
9 | ERROR = 'ERROR'
10 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/fmp4_representation_type.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class FMP4RepresentationType(enum.Enum):
5 | TEMPLATE = 'TEMPLATE'
6 | LIST = 'LIST'
7 | TIMELINE = 'TIMELINE'
8 |
9 | @staticmethod
10 | def default():
11 | return FMP4RepresentationType.TEMPLATE
12 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/font.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class Font(enum.Enum):
5 | DEJAVUSANS = 'DEJAVUSANS'
6 | DEJAVUSERIF = 'DEJAVUSERIF'
7 | DEJAVUSANSMONO = 'DEJAVUSANSMONO'
8 | ROBOTOMONO = 'ROBOTOMONO'
9 | ROBOTOBLACK = 'ROBOTOBLACK'
10 | ROBOTO = 'ROBOTO'
11 | ROBOTOCONDENSED = 'ROBOTOCONDENSED'
12 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/ftp_transfer_version.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class FTPTransferVersion(enum.Enum):
5 | V1_0_0 = '1.0.0'
6 | V1_1_0 = '1.1.0'
7 |
8 | @staticmethod
9 | def default():
10 | return FTPTransferVersion.V1_0_0
11 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/google_cloud_region.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class GoogleCloudRegion(enum.Enum):
5 | ASIA_EAST_1 = 'ASIA_EAST_1'
6 | EUROPE_WEST_1 = 'EUROPE_WEST_1'
7 | US_CENTRAL_1 = 'US_CENTRAL_1'
8 | US_EAST_1 = 'US_EAST_1'
9 | US_WEST_1 = 'US_WEST_1'
10 |
11 | @staticmethod
12 | def default():
13 | return GoogleCloudRegion.EUROPE_WEST_1
14 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/h264_Preset.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class H264Preset(enum.Enum):
5 | ULTRAFAST = 'ULTRAFAST'
6 | SUPERFAST = 'SUPERFAST'
7 | VERYFAST = 'VERYFAST'
8 | FASTER = 'FASTER'
9 | FAST = 'FAST'
10 | MEDIUM = 'MEDIUM'
11 | SLOW = 'SLOW'
12 | SLOWER = 'SLOWER'
13 | VERYSLOW = 'VERYSLOW'
14 | PLACEBO = 'PLACEBO'
15 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/h264_adaptive_quantization_mode.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class H264AdaptiveQuantizationMode(enum.Enum):
5 | DISABLED = 'DISABLED'
6 | VARIANCE = 'VARIANCE'
7 | AUTO_VARIANCE = 'AUTO_VARIANCE'
8 | AUTO_VARIANCE_DARK_SCENES = 'AUTO_VARIANCE_DARK_SCENES'
9 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/h264_b_pyramid.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class H264BPyramid(enum.Enum):
5 | NONE = 'NONE'
6 | STRICT = 'STRICT'
7 | NORMAL = 'NORMAL'
8 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/h264_interlace_mode.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class H264InterlaceMode(enum.Enum):
5 | NONE = 'NONE'
6 | TOP_FIELD_FIRST = 'TOP_FIELD_FIRST'
7 | BOTTOM_FIELD_FIRST = 'BOTTOM_FIELD_FIRST'
8 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/h264_level.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class H264Level(enum.Enum):
5 | L1 = '1'
6 | L1b = '1b'
7 | L1_1 = '1.1'
8 | L1_2 = '1.2'
9 | L1_3 = '1.3'
10 | L2 = '2'
11 | L2_1 = '2.1'
12 | L2_2 = '2.2'
13 | L3 = '3'
14 | L3_1 = '3.1'
15 | L3_2 = '3.2'
16 | L4 = '4'
17 | L4_1 = '4.1'
18 | L4_2 = '4.2'
19 | L5 = '5'
20 | L5_1 = '5.1'
21 | L5_2 = '5.2'
22 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/h264_motion_estimation_method.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class H264MotionEstimationMethod(enum.Enum):
5 | DIA = 'DIA'
6 | HEX = 'HEX'
7 | UMH = 'UMH'
8 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/h264_nal_hrd.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class H264NalHrd(enum.Enum):
5 | NONE = 'NONE'
6 | VBR = 'VBR'
7 | CBR = 'CBR'
8 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/h264_partition.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class H264Partition(enum.Enum):
5 | NONE = 'NONE'
6 | P8X8 = 'P8X8'
7 | P4X4 = 'P4X4'
8 | B8X8 = 'B8X8'
9 | I8X8 = 'I8X8'
10 | I4X4 = 'I4X4'
11 | ALL = 'ALL'
12 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/h264_profile.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class H264Profile(enum.Enum):
5 | BASELINE = 'BASELINE'
6 | MAIN = 'MAIN'
7 | HIGH = 'HIGH'
8 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/h264_sub_me.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class H264SubMe(enum.Enum):
5 | FULLPEL = 'FULLPEL'
6 | SAD = 'SAD'
7 | SATD = 'SATD'
8 | QPEL3 = 'QPEL3'
9 | QPEL4 = 'QPEL4'
10 | QPEL5 = 'QPEL5'
11 | RD_IP = 'RD_IP'
12 | RD_ALL = 'RD_ALL'
13 | RD_REF_IP = 'RD_REF_IP'
14 | RD_REF_ALL = 'RD_REF_ALL'
15 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/h264_trellis.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class H264Trellis(enum.Enum):
5 | DISABLED = 'DISABLED'
6 | ENABLED_FINAL_MB = 'ENABLED_FINAL_MB'
7 | ENABLED_ALL = 'ENABLED_ALL'
8 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/h265_adaptive_quantization_mode.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class H265AdaptiveQuantizationMode(enum.Enum):
5 | DISABLED = 'DISABLED'
6 | VARIANCE = 'VARIANCE'
7 | AUTO_VARIANCE = 'AUTO_VARIANCE'
8 | AUTO_VARIANCE_DARK_SCENES = 'AUTO_VARIANCE_DARK_SCENES'
9 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/h265_level.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class H265Level(enum.Enum):
5 | L1 = '1'
6 | L2 = '2'
7 | L2_1 = '2.1'
8 | L3 = '3'
9 | L3_1 = '3.1'
10 | L4 = '4'
11 | L4_1 = '4.1'
12 | L5 = '5'
13 | L5_1 = '5.1'
14 | L5_2 = '5.2'
15 | L6 = '6'
16 | L6_1 = '6.1'
17 | L6_2 = '6.2'
18 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/h265_profile.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class H265Profile(enum.Enum):
5 | main = 'main'
6 | main10 = 'main10'
7 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/he_aac_signaling.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class HeAacSignaling(enum.Enum):
5 | DEFAULT = 'DEFAULT'
6 | IMPLICIT = 'IMPLICIT'
7 | EXPLICIT_SBR = 'EXPLICIT_SBR'
8 | EXPLICIT_HIERARCHICAL = 'EXPLICIT_HIERARCHICAL'
9 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/hls_version.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class HlsVersion(enum.Enum):
5 | HLS_VERSION_3 = 3
6 | HLS_VERSION_4 = 4
7 | HLS_VERSION_5 = 5
8 | HLS_VERSION_6 = 6
9 | HLS_VERSION_7 = 7
10 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/id3_tag_position_mode.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class ID3TagPositionMode(enum.Enum):
5 | TIME = 'TIME'
6 | FRAME = 'FRAME'
7 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/input_color_range.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class InputColorRange(enum.Enum):
5 | UNSPECIFIED = 'UNSPECIFIED'
6 | MPEG = 'MPEG'
7 | JPEG = 'JPEG'
8 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/input_color_space.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class InputColorSpace(enum.Enum):
5 | UNSPECIFIED = 'UNSPECIFIED'
6 | RGB = 'RGB'
7 | BT709 = 'BT709'
8 | FCC = 'FCC'
9 | BT470BG = 'BT470BG'
10 | SMPTE170M = 'SMPTE170M'
11 | SMPTE240M = 'SMPTE240M'
12 | YCGCO = 'YCGCO'
13 | YCOCG = 'YCOCG'
14 | BT2020_NCL = 'BT2020_NCL'
15 | BT2020_CL = 'BT2020_CL'
16 | SMPTE2085 = 'SMPTE2085'
17 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/interlace_mode.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class InterlaceMode(enum.Enum):
5 | TOP = 'TOP'
6 | BOTTOM = 'BOTTOM'
7 | MERGE = 'MERGE'
8 | DROP_EVEN = 'DROP_EVEN'
9 | DROP_ODD = 'DROP_ODD'
10 | PAD = 'PAD'
11 | INTERLACE_X2 = 'INTERLACE_X2'
12 | MERGE_X2 = 'MERGE_X2'
13 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/internal_chunk_length_mode.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class InternalChunkLengthMode(enum.Enum):
5 | SPEED_OPTIMIZED = 'SPEED_OPTIMIZED'
6 | CUSTOM = 'CUSTOM'
7 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/iv_size.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class IvSize(enum.Enum):
5 | EIGHT_BYTES = '8_BYTES'
6 | SIXTEEN_BYTES = '16_BYTES'
7 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/live_encoding_mode.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class LiveEncodingMode(enum.Enum):
5 | STANDARD = 'STANDARD'
6 | SINGLE_PASS = 'SINGLE_PASS'
7 | TWO_PASS = 'TWO_PASS'
8 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/max_ctu_size.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class MaxCTUSize(enum.Enum):
5 | S16 = '16'
6 | S32 = '32'
7 | S64 = '64'
8 |
9 | @staticmethod
10 | def default():
11 | return MaxCTUSize.S64
12 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/motion_search.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class MotionSearch(enum.Enum):
5 | DIA = 'DIA'
6 | HEX = 'HEX'
7 | UMH = 'UMH'
8 | STAR = 'STAR'
9 | FULL = 'FULL'
10 |
11 | @staticmethod
12 | def default():
13 | return MotionSearch.HEX
14 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/mp2_channel_layout.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class MP2ChannelLayout(enum.Enum):
5 | NONE = 'NONE'
6 | CL_MONO = 'MONO'
7 | CL_STEREO = 'STEREO'
8 | CL_2_1 = '2.1'
9 | CL_SURROUND = 'SURROUND'
10 | CL_3_1 = '3.1'
11 | CL_4_0 = '4.0'
12 | CL_4_1 = '4.1'
13 | CL_2_2 = '2.2'
14 | CL_QUAD = 'QUAD'
15 | CL_5_0 = '5.0'
16 | CL_5_1 = '5.1'
17 | CL_5_0_BACK = '5.0_BACK'
18 | CL_5_1_BACK = '5.1_BACK'
19 | CL_6_0 = '6.0'
20 | CL_6_0_FRONT = '6.0_FRONT'
21 | CL_HEXAGONAL = 'HEXAGONAL'
22 | CL_6_1 = '6.1'
23 | CL_6_1_BACK = '6.1_BACK'
24 | CL_6_1_FRONT = '6.1_FRONT'
25 | CL_7_0 = '7.0'
26 | CL_7_0_FRONT = '7.0_FRONT'
27 | CL_7_1 = '7.1'
28 | CL_7_1_WIDE = '7.1_WIDE'
29 | CL_7_1_WIDE_BACK = '7.1_WIDE_BACK'
30 | CL_OCTAGONAL = 'OCTAGONAL'
31 | CL_STEREO_DOWNMIX = 'STEREO_DOWNMIX'
32 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/mp4_muxing_manifest_type.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class MP4MuxingManifestType(enum.Enum):
5 | SMOOTH = 'SMOOTH'
6 | DASH_ON_DEMAND = 'DASH_ON_DEMAND'
7 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/mv_prediction_mode.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class MVPredictionMode(enum.Enum):
5 | NONE = 'NONE'
6 | SPATIAL = 'SPATIAL'
7 | TEMPORAL = 'TEMPORAL'
8 | AUTO = 'AUTO'
9 |
10 | @staticmethod
11 | def default():
12 | return MVPredictionMode.SPATIAL
13 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/picture_field_parity.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class PictureFieldParity(enum.Enum):
5 | AUTO = 'AUTO'
6 | TOP_FIELD_FIRST = 'TOP_FIELD_FIRST'
7 | BOTTOM_FIELD_FIRST = 'BOTTOM_FIELD_FIRST'
8 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/pixel_format.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class PixelFormat(enum.Enum):
5 | YUV410P = 'YUV410P'
6 | YUV411P = 'YUV411P'
7 | YUV420P = 'YUV420P'
8 | YUV422P = 'YUV422P'
9 | YUV440P = 'YUV440P'
10 | YUV444P = 'YUV444P'
11 | YUVJ411P = 'YUVJ411P'
12 | YUVJ420P = 'YUVJ420P'
13 | YUVJ422P = 'YUVJ422P'
14 | YUVJ440P = 'YUVJ440P'
15 | YUVJ444P = 'YUVJ444P'
16 | YUV420P10LE = 'YUV420P10LE'
17 | YUV422P10LE = 'YUV422P10LE'
18 | YUV440P10LE = 'YUV440P10LE'
19 | YUV444P10LE = 'YUV444P10LE'
20 | YUV420P12LE = 'YUV420P12LE'
21 | YUV422P12LE = 'YUV422P12LE'
22 | YUV440P12LE = 'YUV440P12LE'
23 | YUV444P12LE = 'YUV444P12LE'
24 | YUV420P10BE = 'YUV420P10BE'
25 | YUV422P10BE = 'YUV422P10BE'
26 | YUV440P10BE = 'YUV440P10BE'
27 | YUV444P10BE = 'YUV444P10BE'
28 | YUV420P12BE = 'YUV420P12BE'
29 | YUV422P12BE = 'YUV422P12BE'
30 | YUV440P12BE = 'YUV440P12BE'
31 | YUV444P12BE = 'YUV444P12BE'
32 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/playready_method.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class PlayReadyMethod(enum.Enum):
5 | MPEG_CENC = 'MPEG_CENC'
6 | PIFF_CTR = 'PIFF_CTR'
7 |
8 | @staticmethod
9 | def default():
10 | return PlayReadyMethod.MPEG_CENC
11 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/position_mode.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class PositionMode(enum.Enum):
5 | KEYFRAME = 'KEYFRAME'
6 | SEGMENT = 'SEGMENT'
7 | TIME = 'TIME'
8 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/s3_sig_version.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class S3SignatureVersion(enum.Enum):
5 | S3_V2 = 'S3_V2'
6 | S3_V4 = 'S3_V4'
7 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/scaling_algorithm.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class ScalingAlgorithm(enum.Enum):
5 | FAST_BILINEAR = 'FAST_BILINEAR'
6 | BILINEAR = 'BILINEAR'
7 | BICUBIC = 'BICUBIC'
8 | EXPERIMENTAL = 'EXPERIMENTAL'
9 | NEAREST_NEIGHBOR = 'NEAREST_NEIGHBOR'
10 | AVERAGING_AREA = 'AVERAGING_AREA'
11 | BICUBIC_LUMA_BILINEAR_CHROMA = 'BICUBIC_LUMA_BILINEAR_CHROMA'
12 | GAUSS = 'GAUSS'
13 | SINC = 'SINC'
14 | LANCZOS = 'LANCZOS'
15 | SPLINE = 'SPLINE'
16 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/selection_mode.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class SelectionMode(enum.Enum):
5 | AUTO = 'AUTO'
6 | POSITION_ABSOLUTE = 'POSITION_ABSOLUTE'
7 | VIDEO_RELATIVE = 'VIDEO_RELATIVE'
8 | AUDIO_RELATIVE = 'AUDIO_RELATIVE'
9 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/set_rai_on_au.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class SetRaiOnAu(enum.Enum):
5 | NONE = 'NONE'
6 | ALL_PES_PACKETS = 'ALL_PES_PACKETS'
7 | ACQUISITION_POINT_PACKETS = 'ACQUISITION_POINT_PACKETS'
8 | ACCORDING_TO_INPUT = 'ACCORDING_TO_INPUT'
9 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/status.py:
--------------------------------------------------------------------------------
1 | from enum import Enum
2 |
3 |
4 | class Status(Enum):
5 | SUCCESS = "SUCCESS"
6 | ERROR = "ERROR"
7 |
8 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/stream_conditions_mode.py:
--------------------------------------------------------------------------------
1 | from enum import Enum
2 |
3 |
4 | class StreamConditionsMode(Enum):
5 | DROP_MUXING = 'DROP_MUXING'
6 | DROP_STREAM = 'DROP_STREAM'
7 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/stream_decoding_error_mode.py:
--------------------------------------------------------------------------------
1 | from enum import Enum
2 |
3 |
4 | class StreamDecodingErrorMode(Enum):
5 | FAIL_ON_ERROR = 'FAIL_ON_ERROR'
6 | DUPLICATE_FRAMES = 'DUPLICATE_FRAMES'
7 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/stream_mode.py:
--------------------------------------------------------------------------------
1 | from enum import Enum
2 |
3 |
4 | class StreamMode(Enum):
5 | PER_TITLE_TEMPLATE = 'PER_TITLE_TEMPLATE'
6 | STANDARD = 'STANDARD'
7 | PER_TITLE_RESULT = 'PER_TITLE_RESULT'
8 | PER_TITLE_TEMPLATE_FIXED_RESOLUTION = 'PER_TITLE_TEMPLATE_FIXED_RESOLUTION'
9 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/thumbnail_unit.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class ThumbnailUnit(enum.Enum):
5 | SECONDS = 'SECONDS'
6 | PERCENTS = 'PERCENTS'
7 |
8 | @staticmethod
9 | def default():
10 | return ThumbnailUnit.SECONDS
11 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/tu_inter_depth.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class TUInterDepth(enum.Enum):
5 | D1 = '1'
6 | D2 = '2'
7 | D3 = '3'
8 | D4 = '4'
9 |
10 | @staticmethod
11 | def default():
12 | return TUInterDepth.D1
13 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/tu_intra_depth.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class TUIntraDepth(enum.Enum):
5 | D1 = '1'
6 | D2 = '2'
7 | D3 = '3'
8 | D4 = '4'
9 |
10 | @staticmethod
11 | def default():
12 | return TUIntraDepth.D1
13 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/vertical_low_pass_filtering_mode.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class VerticalLowPassFilteringMode(enum.Enum):
5 | DISABLED = 'DISABLED'
6 | LOW_PASS = 'LOW_PASS'
7 | COMPLEX = 'COMPLEX'
8 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/video_format.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class VideoFormat(enum.Enum):
5 | COMPONENT = 'COMPONENT'
6 | PAL = 'PAL'
7 | NTSC = 'NTSC'
8 | SECAM = 'SECAM'
9 | MAC = 'MAC'
10 | UNDEFINED = 'UNDEFINED'
11 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/vp9_aq_mode.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class VP9AQMode(enum.Enum):
5 | NONE = 'NONE'
6 | VARIANCE = 'VARIANCE'
7 | COMPLEXITY = 'COMPLEXITY'
8 | CYCLIC = 'CYCLIC'
9 |
10 | @staticmethod
11 | def default():
12 | return VP9AQMode.NONE
13 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/vp9_arnr_type.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class VP9ARNRType(enum.Enum):
5 | BACKWARD = 'BACKWARD'
6 | FORWARD = 'FORWARD'
7 | CENTERED = 'CENTERED'
8 |
9 | @staticmethod
10 | def default():
11 | return VP9ARNRMode.CENTERED
12 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/vp9_quality.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class VP9Quality(enum.Enum):
5 | REALTIME = 'REALTIME'
6 | GOOD = 'GOOD'
7 | BEST = 'BEST'
8 |
9 | @staticmethod
10 | def default():
11 | return VP9Quality.GOOD
12 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/watermark_unit.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class WatermarkUnit(enum.Enum):
5 | PIXELS = 'PIXELS'
6 | PERCENTS = 'PERCENTS'
7 |
--------------------------------------------------------------------------------
/bitmovin/resources/enums/webm_representation_type.py:
--------------------------------------------------------------------------------
1 | import enum
2 |
3 |
4 | class WebMRepresentationType(enum.Enum):
5 | TEMPLATE = 'TEMPLATE'
6 | LIST = 'LIST'
7 | TIMELINE = 'TIMELINE'
8 |
9 | @staticmethod
10 | def default():
11 | return WebMRepresentationType.TEMPLATE
12 |
--------------------------------------------------------------------------------
/bitmovin/resources/factories/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bitmovin/bitmovin-python/d183718d640117dd75141da261901dc2f60433b0/bitmovin/resources/factories/__init__.py
--------------------------------------------------------------------------------
/bitmovin/resources/link.py:
--------------------------------------------------------------------------------
1 | from .resource import Resource
2 |
3 |
4 | class Link(Resource):
5 |
6 | def __init__(self, href, title):
7 | super().__init__()
8 | self.href = href
9 | self.title = title
10 |
11 | @classmethod
12 | def parse_from_json_object(cls, json_object):
13 | href = json_object.get('href')
14 | title = json_object.get('title')
15 | link = Link(href=href, title=title)
16 | return link
17 |
18 |
--------------------------------------------------------------------------------
/bitmovin/resources/message.py:
--------------------------------------------------------------------------------
1 | from .resource import Resource
2 |
3 |
4 | class Message(Resource):
5 |
6 | def __init__(self, timestamp, type_, text):
7 | super().__init__()
8 | self.timestamp = timestamp
9 | self.type = type_
10 | self.text = text
11 |
12 | @classmethod
13 | def parse_from_json_object(cls, json_object):
14 | timestamp = json_object.get('timestamp')
15 | type_ = json_object.get('type')
16 | text = json_object.get('text')
17 | message = Message(timestamp=timestamp, type_=type_, text=text)
18 | return message
19 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/__init__.py:
--------------------------------------------------------------------------------
1 | from .abstract_model import AbstractModel
2 | from .minimal_model import MinimalModel
3 | from .custom_data import CustomData
4 | from .inputs import *
5 | from .outputs import *
6 | from .filters import *
7 | from .codecconfigurations import *
8 | from .encodings import *
9 | from .manifests import *
10 | from .infrastructures import *
11 | from .analytics import *
12 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/abstract_model.py:
--------------------------------------------------------------------------------
1 | import abc
2 |
3 | from bitmovin.resources import AbstractCustomDataResource, AbstractIdResource
4 |
5 |
6 | class AbstractModel(AbstractCustomDataResource, AbstractIdResource):
7 | __metaclass__ = abc.ABCMeta
8 |
9 | def __init__(self, id_=None, custom_data=None):
10 | super().__init__(id_=id_, custom_data=custom_data)
11 |
12 | def parse_from_json_object(self, json_object):
13 | raise NotImplementedError()
14 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/analytics/__init__.py:
--------------------------------------------------------------------------------
1 | from .analytics_license import AnalyticsLicense
2 | from .analytics_domain import AnalyticsDomain
3 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/analytics/analytics_domain.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import AbstractModel
2 |
3 |
4 | class AnalyticsDomain(AbstractModel):
5 | def __init__(self, url, id_=None):
6 | super().__init__(id_=id_)
7 | self.url = url
8 |
9 | @classmethod
10 | def parse_from_json_object(cls, json_object):
11 | id_ = json_object.get('id')
12 | url = json_object.get('url')
13 | return AnalyticsDomain(id_=id_, url=url)
14 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/codecconfigurations/__init__.py:
--------------------------------------------------------------------------------
1 | from .aac_codec_configuration import AACCodecConfiguration
2 | from .ac3_codec_configuration import AC3CodecConfiguration
3 | from .eac3_codec_configuration import EAC3CodecConfiguration
4 | from .h264_codec_configuration import H264CodecConfiguration
5 | from .h265_codec_configuration import H265CodecConfiguration
6 | from .av1_codec_configuration import AV1CodecConfiguration
7 | from .vp9_codec_configuration import VP9CodecConfiguration
8 | from .mjpeg_codec_configuration import MJPEGCodecConfiguration
9 | from .color_config import ColorConfig
10 | from .he_aac_v1 import HeAACv1CodecConfiguration
11 | from .he_aac_v2 import HeAACv2CodecConfiguration
12 | from .mp2_codec_configuration import MP2CodecConfiguration
13 | from .mp3_codec_configuration import MP3CodecConfiguration
14 | from .opus_codec_configuration import OpusCodecConfiguration
15 | from .vorbis_codec_configuration import VorbisCodecConfiguration
16 | from .cea_608_708_subtitle_config import Cea608708SubtitleConfig
17 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/codecconfigurations/abstract_codec_configuration.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import AbstractModel
2 | from bitmovin.resources import AbstractNameDescriptionResource
3 |
4 |
5 | class AbstractCodecConfiguration(AbstractNameDescriptionResource, AbstractModel):
6 |
7 | def __init__(self, id_, name, description=None, custom_data=None):
8 | super().__init__(id_=id_, custom_data=custom_data, name=name, description=description)
9 |
10 | @classmethod
11 | def parse_from_json_object(cls, json_object):
12 | id_ = json_object['id']
13 | name = json_object.get('name')
14 | description = json_object.get('description')
15 | custom_data = json_object.get('customData')
16 | abstract_codec_configuration = AbstractCodecConfiguration(
17 | id_=id_, name=name, description=description, custom_data=custom_data)
18 | return abstract_codec_configuration
19 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/codecconfigurations/audio_codec_configuration.py:
--------------------------------------------------------------------------------
1 | from .abstract_codec_configuration import AbstractCodecConfiguration
2 |
3 |
4 | class AudioCodecConfiguration(AbstractCodecConfiguration):
5 |
6 | def __init__(self, id_, name, bitrate, rate, description=None, custom_data=None):
7 | super().__init__(id_=id_, custom_data=custom_data, name=name, description=description)
8 | self.bitrate = bitrate
9 | self.rate = rate
10 |
11 | @classmethod
12 | def parse_from_json_object(cls, json_object):
13 | abstract_codec_configuration = AbstractCodecConfiguration.parse_from_json_object(json_object=json_object)
14 | id_ = abstract_codec_configuration.id
15 | name = abstract_codec_configuration.name
16 | description = abstract_codec_configuration.description
17 | custom_data = abstract_codec_configuration.customData
18 | rate = json_object.get('rate')
19 | bitrate = json_object['bitrate']
20 |
21 | audio_codec_configuration = AudioCodecConfiguration(id_=id_, name=name, description=description,
22 | custom_data=custom_data, bitrate=bitrate, rate=rate)
23 |
24 | return audio_codec_configuration
25 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/codecconfigurations/cea_608_708_subtitle_config.py:
--------------------------------------------------------------------------------
1 | from bitmovin.utils import Serializable
2 |
3 |
4 | class Cea608708SubtitleConfig(Serializable):
5 | def __init__(self, passthrough_activated=None):
6 | super().__init__()
7 |
8 | self.passthroughActivated = passthrough_activated
9 |
10 | @classmethod
11 | def parse_from_json_object(cls, json_object):
12 | passthrough_activated = json_object['passthroughActivated']
13 |
14 | return Cea608708SubtitleConfig(passthrough_activated=passthrough_activated)
15 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/custom_data.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources import AbstractCustomDataResource
2 |
3 |
4 | class CustomData(AbstractCustomDataResource):
5 |
6 | def __init__(self, created_at, modified_at, custom_data):
7 | super().__init__(custom_data=custom_data)
8 | self.createdAt = created_at
9 | self.modifiedAt = modified_at
10 |
11 | @classmethod
12 | def parse_from_json_object(cls, json_object):
13 | created_at = json_object.get('createdAt')
14 | modified_at = json_object.get('modifiedAt')
15 | data = json_object.get('customData')
16 | custom_data = CustomData(created_at=created_at, modified_at=modified_at, custom_data=data)
17 | return custom_data
18 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/captions/__init__.py:
--------------------------------------------------------------------------------
1 | from .burn_in_srt_subtitle import BurnInSrtSubtitle
2 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/conditions/__init__.py:
--------------------------------------------------------------------------------
1 | from .abstract_condition import AbstractCondition
2 | from .abstract_conjunction import AbstractConjunction
3 | from .condition_type import ConditionType
4 | from .condition import Condition
5 | from .and_conjunction import AndConjunction
6 | from .or_conjunction import OrConjunction
7 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/conditions/abstract_condition.py:
--------------------------------------------------------------------------------
1 | from bitmovin.errors import InvalidTypeError
2 | from bitmovin.utils import Serializable
3 | from .condition_type import ConditionType
4 |
5 |
6 | class AbstractCondition(Serializable):
7 |
8 | def __init__(self, type_):
9 | super().__init__()
10 |
11 | self._type = None
12 | self.type = type_
13 |
14 | @property
15 | def type(self):
16 | return self._type
17 |
18 | @type.setter
19 | def type(self, new_type):
20 | if new_type is None:
21 | return
22 | if isinstance(new_type, str):
23 | self._type = new_type
24 | elif isinstance(new_type, ConditionType):
25 | self._type = new_type.value
26 | else:
27 | raise InvalidTypeError(
28 | 'Invalid type {} for type: must be either str or ConditionType!'.format(type(new_type)))
29 |
30 | def serialize(self):
31 | serialized = super().serialize()
32 | serialized['type'] = self._type
33 | return serialized
34 |
35 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/conditions/abstract_conjunction.py:
--------------------------------------------------------------------------------
1 | from bitmovin.errors import InvalidTypeError
2 | from .abstract_condition import AbstractCondition
3 |
4 |
5 | class AbstractConjunction(AbstractCondition):
6 |
7 | @property
8 | def conditions(self):
9 | return self._conditions
10 |
11 | def __init__(self, type_, conditions):
12 | super().__init__(type_=type_)
13 | self._conditions = None
14 | self.conditions=conditions
15 |
16 | @conditions.setter
17 | def conditions(self, new_conditions):
18 | if new_conditions is None:
19 | return
20 |
21 | if not isinstance(new_conditions, list):
22 | raise InvalidTypeError('new_conditions has to be a list')
23 |
24 | if all(isinstance(new_condition, AbstractCondition) for new_condition in new_conditions):
25 | self._conditions = new_conditions
26 | else:
27 | raise InvalidTypeError('Invalid type for conditions list')
28 |
29 | def serialize(self):
30 | serialized = super().serialize()
31 | serialized['conditions'] = self._conditions
32 | return serialized
33 |
34 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/conditions/and_conjunction.py:
--------------------------------------------------------------------------------
1 | from .condition_type import ConditionType
2 | from .abstract_conjunction import AbstractConjunction
3 |
4 |
5 | class AndConjunction(AbstractConjunction):
6 |
7 | def __init__(self, conditions):
8 | super().__init__(type_=ConditionType.AND.value, conditions=conditions)
9 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/conditions/condition.py:
--------------------------------------------------------------------------------
1 | from .abstract_condition import AbstractCondition
2 | from .condition_type import ConditionType
3 |
4 |
5 | class Condition(AbstractCondition):
6 |
7 | def __init__(self, attribute, operator, value):
8 | super().__init__(type_=ConditionType.CONDITION.value)
9 | self.attribute = attribute
10 | self.operator = operator
11 | self.value = value
12 |
13 | @classmethod
14 | def parse_from_json_object(cls, json_object):
15 | attribute = json_object.get('attribute')
16 | operator = json_object.get('operator')
17 | value = json_object.get('value')
18 | return Condition(attribute=attribute, operator=operator, value=value)
19 |
20 | def serialize(self):
21 | serialized = super().serialize()
22 | return serialized
23 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/conditions/condition_type.py:
--------------------------------------------------------------------------------
1 | from enum import Enum
2 |
3 |
4 | class ConditionType(Enum):
5 | CONDITION = 'CONDITION'
6 | AND = 'AND'
7 | OR = 'OR'
8 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/conditions/or_conjunction.py:
--------------------------------------------------------------------------------
1 | from .abstract_conjunction import AbstractConjunction
2 | from .condition_type import ConditionType
3 |
4 |
5 | class OrConjunction(AbstractConjunction):
6 |
7 | def __init__(self, conditions):
8 | super().__init__(type_=ConditionType.OR.value, conditions=conditions)
9 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/drms/__init__.py:
--------------------------------------------------------------------------------
1 | from .drm import DRM
2 | from .aes_drm import AESDRM
3 | from .playready_drm_additional_information import PlayReadyDRMAdditionalInformation
4 | from .clearkey_drm import ClearKeyDRM
5 | from .fairplay_drm import FairPlayDRM
6 | from .marlin_drm import MarlinDRM
7 | from .playready_drm import PlayReadyDRM
8 | from .primetime_drm import PrimeTimeDRM
9 | from .widevine_drm import WidevineDRM
10 | from .drm_status import DRMStatus
11 | from .cenc_drm import CENCDRM
12 | from .cenc_playready_entry import CENCPlayReadyEntry
13 | from .cenc_widevine_entry import CENCWidevineEntry
14 | from .cenc_marlin_entry import CENCMarlinEntry
15 | from .cenc_fairplay_entry import CENCFairPlayEntry
16 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/drms/aes_drm.py:
--------------------------------------------------------------------------------
1 | from .drm import DRM
2 |
3 |
4 | class AESDRM(DRM):
5 |
6 | def __init__(self, method, key, key_file_uri=None, iv=None, outputs=None, id_=None, custom_data=None,
7 | description=None, name=None):
8 |
9 | super().__init__(id_=id_, custom_data=custom_data, outputs=outputs, name=name, description=description)
10 | self.method = method
11 | self.key = key
12 | self.keyFileUri = key_file_uri
13 | self.iv = iv
14 |
15 | @classmethod
16 | def parse_from_json_object(cls, json_object):
17 | drm = super().parse_from_json_object(json_object=json_object)
18 | id_ = drm.id
19 | custom_data = drm.customData
20 | outputs = drm.outputs
21 | name = drm.name
22 | description = drm.description
23 | method = json_object['method']
24 | key = json_object['key']
25 | key_file_uri = json_object.get('keyFileUri')
26 | iv = json_object.get('iv')
27 |
28 | aes_drm = AESDRM(method=method, key=key, key_file_uri=key_file_uri, iv=iv, outputs=outputs, id_=id_,
29 | custom_data=custom_data, name=name, description=description)
30 |
31 | return aes_drm
32 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/drms/cenc_fairplay_entry.py:
--------------------------------------------------------------------------------
1 | from bitmovin.utils import Serializable
2 |
3 |
4 | class CENCFairPlayEntry(Serializable):
5 |
6 | def __init__(self, iv, uri):
7 | super().__init__()
8 | self.iv = iv
9 | self.uri = uri
10 |
11 | @classmethod
12 | def parse_from_json_object(cls, json_object):
13 | iv = json_object.get('iv')
14 | uri = json_object.get('uri')
15 | cenc_fairplay_entry = CENCFairPlayEntry(iv=iv, uri=uri)
16 |
17 | return cenc_fairplay_entry
18 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/drms/cenc_marlin_entry.py:
--------------------------------------------------------------------------------
1 | from bitmovin.utils import Serializable
2 |
3 |
4 | class CENCMarlinEntry(Serializable):
5 |
6 | def __init__(self):
7 | super().__init__()
8 |
9 | @classmethod
10 | def parse_from_json_object(cls, json_object):
11 | cenc_marlin_entry = CENCMarlinEntry()
12 | return cenc_marlin_entry
13 |
14 | def serialize(self):
15 | serialized = super().serialize()
16 | return serialized
17 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/drms/cenc_widevine_entry.py:
--------------------------------------------------------------------------------
1 | from bitmovin.utils import Serializable
2 |
3 |
4 | class CENCWidevineEntry(Serializable):
5 |
6 | def __init__(self, pssh):
7 | super().__init__()
8 | self.pssh = pssh
9 |
10 | @classmethod
11 | def parse_from_json_object(cls, json_object):
12 | pssh = json_object.get('pssh')
13 | cenc_widevine_entry = CENCWidevineEntry(pssh)
14 | return cenc_widevine_entry
15 |
16 | def serialize(self):
17 | serialized = super().serialize()
18 | serialized['pssh'] = self.pssh
19 | return serialized
20 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/drms/clearkey_drm.py:
--------------------------------------------------------------------------------
1 | from .drm import DRM
2 |
3 |
4 | class ClearKeyDRM(DRM):
5 |
6 | def __init__(self, key, kid, outputs=None, id_=None, custom_data=None, name=None, description=None):
7 |
8 | super().__init__(id_=id_, custom_data=custom_data, outputs=outputs, name=name, description=description)
9 | self.key = key
10 | self.kid = kid
11 |
12 | @classmethod
13 | def parse_from_json_object(cls, json_object):
14 | drm = super().parse_from_json_object(json_object=json_object)
15 | id_ = drm.id
16 | custom_data = drm.customData
17 | outputs = drm.outputs
18 | name = drm.name
19 | description = drm.description
20 | key = json_object['key']
21 | kid = json_object['kid']
22 |
23 | clearkey_drm = ClearKeyDRM(key=key, kid=kid, outputs=outputs, id_=id_, custom_data=custom_data,
24 | name=name, description=description)
25 |
26 | return clearkey_drm
27 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/drms/drm_status.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources import AbstractIdResource
2 |
3 |
4 | class DRMStatus(AbstractIdResource):
5 |
6 | def __init__(self, status, id_=None):
7 | super().__init__(id_=id_)
8 | self.status = status
9 |
10 | @classmethod
11 | def parse_from_json_object(cls, json_object):
12 | id_ = json_object.get('id')
13 | status = json_object['status']
14 |
15 | drm_status = DRMStatus(status=status, id_=id_)
16 | return drm_status
17 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/drms/fairplay_drm.py:
--------------------------------------------------------------------------------
1 | from .drm import DRM
2 |
3 |
4 | class FairPlayDRM(DRM):
5 |
6 | def __init__(self, key, iv=None, uri=None, outputs=None, id_=None, custom_data=None, name=None, description=None):
7 |
8 | super().__init__(id_=id_, custom_data=custom_data, outputs=outputs, name=name, description=description)
9 | self.key = key
10 | self.iv = iv
11 | self.uri = uri
12 |
13 | @classmethod
14 | def parse_from_json_object(cls, json_object):
15 | drm = super().parse_from_json_object(json_object=json_object)
16 | id_ = drm.id
17 | custom_data = drm.customData
18 | outputs = drm.outputs
19 | name = drm.name
20 | description = drm.description
21 | key = json_object['key']
22 | iv = json_object.get('iv')
23 | uri = json_object.get('uri')
24 |
25 | fairplay_drm = FairPlayDRM(key=key, iv=iv, uri=uri, outputs=outputs, id_=id_, custom_data=custom_data,
26 | name=name, description=description)
27 |
28 | return fairplay_drm
29 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/drms/marlin_drm.py:
--------------------------------------------------------------------------------
1 | from .drm import DRM
2 |
3 |
4 | class MarlinDRM(DRM):
5 |
6 | def __init__(self, key, kid, outputs=None, id_=None, custom_data=None, name=None, description=None):
7 |
8 | super().__init__(id_=id_, custom_data=custom_data, outputs=outputs, name=name, description=description)
9 | self.key = key
10 | self.kid = kid
11 |
12 | @classmethod
13 | def parse_from_json_object(cls, json_object):
14 | drm = super().parse_from_json_object(json_object=json_object)
15 | id_ = drm.id
16 | custom_data = drm.customData
17 | outputs = drm.outputs
18 | name = drm.name
19 | description = drm.description
20 | key = json_object['key']
21 | kid = json_object['kid']
22 |
23 | marlin_drm = MarlinDRM(key=key, kid=kid, outputs=outputs, id_=id_, custom_data=custom_data,
24 | name=name, description=description)
25 |
26 | return marlin_drm
27 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/drms/playready_drm_additional_information.py:
--------------------------------------------------------------------------------
1 | from bitmovin.utils import Serializable
2 |
3 |
4 | class PlayReadyDRMAdditionalInformation(Serializable):
5 |
6 | def __init__(self, wrm_header_custom_attributes=None):
7 | super().__init__()
8 | self.wrmHeaderCustomAttributes = wrm_header_custom_attributes
9 |
10 | @classmethod
11 | def parse_from_json_object(cls, json_object):
12 | wrm_header_custom_attributes = json_object.get('wrmHeaderCustomAttributes')
13 |
14 | playready_drm_additional_information = PlayReadyDRMAdditionalInformation(
15 | wrm_header_custom_attributes=wrm_header_custom_attributes)
16 |
17 | return playready_drm_additional_information
18 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/drms/primetime_drm.py:
--------------------------------------------------------------------------------
1 | from .drm import DRM
2 |
3 |
4 | class PrimeTimeDRM(DRM):
5 |
6 | def __init__(self, key, kid, pssh, outputs=None, id_=None, custom_data=None, name=None, description=None):
7 |
8 | super().__init__(id_=id_, custom_data=custom_data, outputs=outputs, name=name, description=description)
9 | self.key = key
10 | self.kid = kid
11 | self.pssh = pssh
12 |
13 | @classmethod
14 | def parse_from_json_object(cls, json_object):
15 | drm = super().parse_from_json_object(json_object=json_object)
16 | id_ = drm.id
17 | custom_data = drm.customData
18 | outputs = drm.outputs
19 | name = drm.name
20 | description = drm.description
21 | key = json_object['key']
22 | kid = json_object['kid']
23 | pssh = json_object['pssh']
24 |
25 | primetime_drm = PrimeTimeDRM(key=key, kid=kid, pssh=pssh, outputs=outputs, id_=id_, custom_data=custom_data,
26 | name=name, description=description)
27 |
28 | return primetime_drm
29 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/drms/widevine_drm.py:
--------------------------------------------------------------------------------
1 | from .drm import DRM
2 |
3 |
4 | class WidevineDRM(DRM):
5 |
6 | def __init__(self, key, kid, pssh, outputs=None, id_=None, custom_data=None, name=None, description=None):
7 |
8 | super().__init__(id_=id_, custom_data=custom_data, outputs=outputs, name=name, description=description)
9 | self.key = key
10 | self.kid = kid
11 | self.pssh = pssh
12 |
13 | @classmethod
14 | def parse_from_json_object(cls, json_object):
15 | drm = super().parse_from_json_object(json_object=json_object)
16 | id_ = drm.id
17 | custom_data = drm.customData
18 | outputs = drm.outputs
19 | name = drm.name
20 | description = drm.description
21 | key = json_object['key']
22 | kid = json_object['kid']
23 | pssh = json_object['pssh']
24 |
25 | widevine_drm = WidevineDRM(key=key, kid=kid, pssh=pssh, outputs=outputs, id_=id_, custom_data=custom_data,
26 | name=name, description=description)
27 |
28 | return widevine_drm
29 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/encoding_input.py:
--------------------------------------------------------------------------------
1 | from bitmovin.utils import Serializable
2 |
3 |
4 | class EncodingInput(Serializable):
5 |
6 | def __init__(self, input_id, input_path=None):
7 | super().__init__()
8 | self.inputId = input_id
9 | self.inputPath = input_path
10 |
11 | @classmethod
12 | def parse_from_json_object(cls, json_object):
13 | input_id = json_object['inputId']
14 | input_path = json_object.get('inputPath')
15 |
16 | encoding_input = EncodingInput(input_id=input_id, input_path=input_path)
17 | return encoding_input
18 |
19 | def serialize(self):
20 | serialized = super().serialize()
21 | serialized['inputId'] = self.inputId
22 | serialized['inputPath'] = self.inputPath
23 | return serialized
24 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/encoding_live_details.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources import Resource
2 |
3 |
4 | class EncodingLiveDetails(Resource):
5 |
6 | def __init__(self, stream_key, encoder_ip):
7 | super().__init__()
8 | self.streamKey = stream_key
9 | self.encoderIp = encoder_ip
10 |
11 | @classmethod
12 | def parse_from_json_object(cls, json_object):
13 | stream_key = json_object['streamKey']
14 | encoder_ip = json_object['encoderIp']
15 | encoding_live_details = EncodingLiveDetails(stream_key=stream_key, encoder_ip=encoder_ip)
16 | return encoding_live_details
17 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/id3/__init__.py:
--------------------------------------------------------------------------------
1 | from .id3_tag import ID3Tag
2 | from .raw_id3_tag import RawID3Tag
3 | from .frame_id_id3_tag import FrameIdID3Tag
4 | from .plain_text_id3_tag import PlainTextID3Tag
5 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/id3/frame_id_id3_tag.py:
--------------------------------------------------------------------------------
1 | from .id3_tag import ID3Tag
2 |
3 |
4 | class FrameIdID3Tag(ID3Tag):
5 |
6 | def __init__(self, position_mode, frame_id, bytes_, time=None, frame=None, id_=None, custom_data=None, name=None, description=None):
7 |
8 | super().__init__(id_=id_, custom_data=custom_data, name=name, description=description,
9 | position_mode=position_mode, time=time, frame=frame)
10 | self.bytes = bytes_
11 | self.frameId = frame_id
12 |
13 | @classmethod
14 | def parse_from_json_object(cls, json_object):
15 | id3_tag = super().parse_from_json_object(json_object=json_object)
16 |
17 | id_ = id3_tag.id
18 | custom_data = id3_tag.customData
19 | name = id3_tag.name
20 | description = id3_tag.description
21 | position_mode = id3_tag.positionMode
22 | time = id3_tag.time
23 | frame = id3_tag.frame
24 |
25 | bytes_ = json_object.get('bytes')
26 | frame_id = json_object.get('frameId')
27 |
28 | frame_id_id3_tag = FrameIdID3Tag(bytes_=bytes_, frame_id=frame_id,
29 | position_mode=position_mode, time=time, frame=frame,
30 | id_=id_, custom_data=custom_data, name=name, description=description)
31 |
32 | return frame_id_id3_tag
33 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/id3/raw_id3_tag.py:
--------------------------------------------------------------------------------
1 | from .id3_tag import ID3Tag
2 |
3 |
4 | class RawID3Tag(ID3Tag):
5 |
6 | def __init__(self, position_mode, bytes_, time=None, frame=None, id_=None, custom_data=None, name=None, description=None):
7 |
8 | super().__init__(id_=id_, custom_data=custom_data, name=name, description=description,
9 | position_mode=position_mode, time=time, frame=frame)
10 | self.bytes = bytes_
11 |
12 | @classmethod
13 | def parse_from_json_object(cls, json_object):
14 | id3_tag = super().parse_from_json_object(json_object=json_object)
15 |
16 | id_ = id3_tag.id
17 | custom_data = id3_tag.customData
18 | name = id3_tag.name
19 | description = id3_tag.description
20 | position_mode = id3_tag.positionMode
21 | time = id3_tag.time
22 | frame = id3_tag.frame
23 |
24 | bytes_ = json_object.get('bytes')
25 |
26 | raw_id3_tag = RawID3Tag(bytes_=bytes_, position_mode=position_mode, time=time, frame=frame,
27 | id_=id_, custom_data=custom_data, name=name, description=description)
28 |
29 | return raw_id3_tag
30 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/ignored_by_type.py:
--------------------------------------------------------------------------------
1 | from enum import Enum
2 |
3 |
4 | class IgnoredByType(Enum):
5 | CONDITION = 'CONDITION'
6 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/inputstreams/__init__.py:
--------------------------------------------------------------------------------
1 | from .ingest_input_stream import IngestInputStream
2 | from .concatenation_input_stream_configuration import ConcatenationInputStreamConfiguration
3 | from .concatenation_input_stream import ConcatenationInputStream
4 | from .time_based_trimming_input_stream import TimeBasedTrimmingInputStream
5 | from .time_code_track_trimming_input_stream import TimeCodeTrackTrimmingInputStream
6 | from .h264_picture_timing_trimming_input_stream import H264PictureTimingTrimmingInputStream
7 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/inputstreams/abstract_trimming_input_stream.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources import AbstractNameDescriptionResource
2 | from bitmovin.resources.models import AbstractModel
3 | from bitmovin.utils import Serializable
4 |
5 |
6 | class AbstractTrimmingInputStream(AbstractNameDescriptionResource, AbstractModel, Serializable):
7 |
8 | def __init__(self, input_stream_id, id_=None, custom_data=None, name=None, description=None):
9 | super().__init__(id_=id_, custom_data=custom_data, name=name, description=description)
10 | self.inputStreamId = input_stream_id
11 |
12 | @classmethod
13 | def parse_from_json_object(cls, json_object):
14 | id_ = json_object.get('id')
15 | custom_data = json_object.get('customData')
16 | name = json_object.get('name')
17 | description = json_object.get('description')
18 | input_stream_id = json_object.get('inputStreamId')
19 |
20 | trimming_input_stream = AbstractTrimmingInputStream(
21 | input_stream_id=input_stream_id,
22 | id_=id_,
23 | custom_data=custom_data,
24 | name=name,
25 | description=description
26 | )
27 |
28 | return trimming_input_stream
29 |
30 | def serialize(self):
31 | serialized = super().serialize()
32 | return serialized
33 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/inputstreams/concatenation_input_stream_configuration.py:
--------------------------------------------------------------------------------
1 | from bitmovin.utils import Serializable
2 | from bitmovin.resources import Resource
3 |
4 |
5 | class ConcatenationInputStreamConfiguration(Resource, Serializable):
6 |
7 | def __init__(self, input_stream_id, is_main, position=None):
8 | super().__init__()
9 | self.inputStreamId = input_stream_id
10 | self.isMain = is_main
11 | self.position = position
12 |
13 | @classmethod
14 | def parse_from_json_object(cls, json_object):
15 | input_stream_id = json_object.get('inputStreamId')
16 | is_main = json_object.get('isMain')
17 | position = json_object.get('position')
18 |
19 | concatentation_input_stream_configuration = ConcatenationInputStreamConfiguration(
20 | input_stream_id=input_stream_id,
21 | is_main=is_main,
22 | position=position
23 | )
24 |
25 | return concatentation_input_stream_configuration
26 |
27 | def serialize(self):
28 | serialized = super().serialize()
29 | return serialized
30 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/keyframe.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import AbstractModel
2 |
3 |
4 | class Keyframe(AbstractModel):
5 |
6 | def __init__(self, time, segment_cut=None, id_=None):
7 | super().__init__(id_=id_)
8 | self.time = time
9 | self.segmentCut = segment_cut
10 |
11 | @classmethod
12 | def parse_from_json_object(cls, json_object):
13 | id_ = json_object['id']
14 | time = json_object.get('time')
15 | segment_cut = json_object.get('segmentCut')
16 |
17 | keyframe = Keyframe(id_=id_, time=time, segment_cut=segment_cut)
18 | return keyframe
19 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/live/__init__.py:
--------------------------------------------------------------------------------
1 | from .live_dash_manifest import LiveDashManifest
2 | from .live_hls_manifest import LiveHlsManifest
3 | from .live_stream_configuration import LiveStreamConfiguration
4 | from .auto_restart_configuration import AutoRestartConfiguration
5 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/live/auto_restart_configuration.py:
--------------------------------------------------------------------------------
1 | from bitmovin.utils import Serializable
2 |
3 |
4 | class AutoRestartConfiguration(Serializable):
5 | def __init__(self, segments_written_timeout: float = None, bytes_written_timeout: float = None,
6 | frames_written_timeout: float = None, hls_manifests_update_timeout: float = None,
7 | dash_manifests_update_timeout: float = None, schedule_expression: str = None):
8 | super().__init__()
9 | self.segmentsWrittenTimeout = segments_written_timeout
10 | self.bytesWrittenTimeout = bytes_written_timeout
11 | self.framesWrittenTimeout = frames_written_timeout
12 | self.hlsManifestsUpdateTimeout = hls_manifests_update_timeout
13 | self.dashManifestsUpdateTimeout = dash_manifests_update_timeout
14 | self.scheduleExpression = schedule_expression
15 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/live/live_dash_manifest.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | from bitmovin.utils import Serializable
4 |
5 |
6 | class LiveDashManifest(Serializable):
7 | def __init__(self, manifest_id: str, time_shift: float = None, live_edge_offset: float = None):
8 | super().__init__()
9 | self.manifestId = manifest_id
10 | self.timeshift = time_shift
11 | self.liveEdgeOffset = live_edge_offset
12 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/live/live_hls_manifest.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | from bitmovin.utils import Serializable
4 |
5 |
6 | class LiveHlsManifest(Serializable):
7 | def __init__(self, manifest_id: str, time_shift: float = None):
8 | super().__init__()
9 | self.manifestId = manifest_id
10 | self.timeshift = time_shift
11 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/muxings/__init__.py:
--------------------------------------------------------------------------------
1 | from .muxing import Muxing
2 | from .muxing_stream import MuxingStream
3 | from .fmp4_muxing import FMP4Muxing
4 | from .mp4_muxing import MP4Muxing
5 | from .ts_muxing import TSMuxing
6 | from .webm_muxing import WebMMuxing
7 | from .progressive_ts_muxing import ProgressiveTSMuxing
8 | from .progressive_mov_muxing import ProgressiveMOVMuxing
9 | from .information import ByteRange, MuxingInformationAudioTrack, MuxingInformationVideoTrack, \
10 | ProgressiveTSInformation, MP4MuxingInformation
11 | from .broadcast_ts import BroadcastTsInputStreamConfiguration, BroadcastTsMuxingConfiguration, \
12 | BroadcastTsTransportConfiguration, BroadcastTsProgramConfiguration, BroadcastTsVideoStreamConfiguration, \
13 | BroadcastTsAudioStreamConfiguration, BroadcastTsMuxing
14 | from .time_code import TimeCode
15 | from .internal_chunk_length import InternalChunkLength
16 | from .progressive_webm_muxing import ProgressiveWebMMuxing
17 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/muxings/broadcast_ts/__init__.py:
--------------------------------------------------------------------------------
1 | from .broadcast_ts_muxing import BroadcastTsMuxing
2 | from .broadcast_ts_transport_configuration import BroadcastTsTransportConfiguration
3 | from .broadcast_ts_audio_stream_configuration import BroadcastTsAudioStreamConfiguration
4 | from .broadcast_ts_video_stream_configuration import BroadcastTsVideoStreamConfiguration
5 | from .broadcast_ts_muxing_configuration import BroadcastTsMuxingConfiguration
6 | from .broadcast_ts_program_configuration import BroadcastTsProgramConfiguration
7 | from .broadcast_input_stream_configuration import BroadcastTsInputStreamConfiguration
8 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/muxings/broadcast_ts/broadcast_ts_program_configuration.py:
--------------------------------------------------------------------------------
1 | from bitmovin.utils import Serializable
2 |
3 |
4 | class BroadcastTsProgramConfiguration(Serializable):
5 |
6 | def __init__(self, program_number=None, pid_for_pmt=None, insert_program_clock_ref_on_pes=None):
7 | super().__init__()
8 | self.programNumber = program_number
9 | self.pidForPMT = pid_for_pmt
10 | self.insertProgramClockRefOnPes = insert_program_clock_ref_on_pes
11 |
12 | @classmethod
13 | def parse_from_json_object(cls, json_object):
14 | program_number = json_object.get('programNumber')
15 | pid_for_pmt = json_object.get('pidForPMT')
16 | insert_program_clock_ref_on_pes = json_object.get('insertProgramClockRefOnPes')
17 |
18 | broadcast_ts_program_configuration = BroadcastTsProgramConfiguration(
19 | program_number=program_number,
20 | pid_for_pmt=pid_for_pmt,
21 | insert_program_clock_ref_on_pes=insert_program_clock_ref_on_pes
22 | )
23 | return broadcast_ts_program_configuration
24 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/muxings/information/__init__.py:
--------------------------------------------------------------------------------
1 | from .byte_range import ByteRange
2 | from .mp4_muxing_information import MP4MuxingInformation
3 | from .muxing_information_audio_track import MuxingInformationAudioTrack
4 | from .muxing_information_video_track import MuxingInformationVideoTrack
5 | from .progressive_ts_information import ProgressiveTSInformation
6 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/muxings/information/byte_range.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources import Resource
2 |
3 |
4 | class ByteRange(Resource):
5 |
6 | def __init__(self, segment_number, start_bytes, end_bytes, duration, **kwargs):
7 | super().__init__(**kwargs)
8 |
9 | self.segment_number = segment_number
10 | self.start_bytes = start_bytes
11 | self.end_bytes = end_bytes
12 | self.duration = duration
13 |
14 | @classmethod
15 | def parse_from_json_object(cls, json_object):
16 | segment_number = json_object.get('segmentNumber')
17 | start_bytes = json_object.get('startBytes')
18 | end_bytes = json_object.get('endBytes')
19 | duration = json_object.get('duration')
20 |
21 | byte_range = ByteRange(segment_number=segment_number, start_bytes=start_bytes, end_bytes=end_bytes,
22 | duration=duration)
23 | return byte_range
24 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/muxings/information/muxing_information_audio_track.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources import Resource
2 |
3 |
4 | class MuxingInformationAudioTrack(Resource):
5 |
6 | def __init__(self, index, codec, codec_iso, bitrate, sampling_rate, channels):
7 | super().__init__()
8 |
9 | self.index = index
10 | self.codec = codec
11 | self.codec_iso = codec_iso
12 | self.bitrate = bitrate
13 | self.sampling_rate = sampling_rate
14 | self.channels = channels
15 |
16 | @classmethod
17 | def parse_from_json_object(cls, json_object):
18 | index = json_object.get('index')
19 | codec = json_object.get('codec')
20 | codec_iso = json_object.get('codecIso')
21 | bitrate = json_object.get('bitRate')
22 | sampling_rate = json_object.get('samplingRate')
23 | channels = json_object.get('channels')
24 |
25 | muxing_information_audio_track = MuxingInformationAudioTrack(
26 | index=index,
27 | codec=codec,
28 | codec_iso=codec_iso,
29 | bitrate=bitrate,
30 | sampling_rate=sampling_rate,
31 | channels=channels
32 | )
33 | return muxing_information_audio_track
34 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/muxings/muxing_stream.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources import AbstractIdResource
2 |
3 |
4 | class MuxingStream(AbstractIdResource):
5 |
6 | def __init__(self, stream_id, id_=None):
7 | super().__init__(id_=id_)
8 | self.streamId = stream_id
9 |
10 | @classmethod
11 | def parse_from_json_object(cls, json_object):
12 | id_ = json_object.get('id')
13 | stream_id = json_object['streamId']
14 |
15 | encoding_status = MuxingStream(stream_id=stream_id, id_=id_)
16 | return encoding_status
17 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/muxings/time_code.py:
--------------------------------------------------------------------------------
1 | from bitmovin.utils import Serializable
2 |
3 |
4 | class TimeCode(Serializable):
5 |
6 | def __init__(self, time_code_start):
7 | super().__init__()
8 | self.timeCodeStart = time_code_start
9 |
10 | @classmethod
11 | def parse_from_json_object(cls, json_object):
12 | time_code_start = json_object.get('timeCodeStart')
13 | time_code = TimeCode(time_code_start=time_code_start)
14 | return time_code
15 |
16 | def serialize(self):
17 | serialized = super().serialize()
18 | serialized['timeCodeStart'] = self.timeCodeStart
19 | return serialized
20 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/pertitle/__init__.py:
--------------------------------------------------------------------------------
1 | from .auto_representation import AutoRepresentation
2 | from .per_title import PerTitle
3 | from .h264_per_title_configuration import H264PerTitleConfiguration
4 | from .h265_per_title_configuration import H265PerTitleConfiguration
5 | from .vp9_per_title_configuration import VP9PerTitleConfiguration
6 | from .per_title_configuration import PerTitleConfiguration
7 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/pertitle/auto_representation.py:
--------------------------------------------------------------------------------
1 | from bitmovin.utils import Serializable
2 |
3 |
4 | class AutoRepresentation(Serializable):
5 | def __init__(self, adopt_configuration_threshold=None):
6 | self.adoptConfigurationThreshold = adopt_configuration_threshold
7 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/pertitle/h264_per_title_configuration.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models.encodings.pertitle.per_title_configuration import PerTitleConfiguration
2 |
3 |
4 | class H264PerTitleConfiguration(PerTitleConfiguration):
5 | def __init__(self, min_bitrate=None, max_bitrate=None, min_bitrate_step_size=None,
6 | max_bitrate_step_size=None, target_quality_crf=None, auto_representations=None,
7 | codec_min_bitrate_factor=None, codec_max_bitrate_factor=None, codec_bufsize_factor=None,
8 | complexity_factor=None):
9 | super().__init__(min_bitrate=min_bitrate, max_bitrate=max_bitrate, min_bitrate_step_size=min_bitrate_step_size,
10 | max_bitrate_step_size=max_bitrate_step_size, auto_representations=auto_representations,
11 | complexity_factor=complexity_factor)
12 | self.targetQualityCrf = target_quality_crf
13 | self.codecMinBitrateFactor = codec_min_bitrate_factor
14 | self.codecMaxBitrateFactor = codec_max_bitrate_factor
15 | self.codecBufsizeFactor = codec_bufsize_factor
16 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/pertitle/h265_per_title_configuration.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models.encodings.pertitle.per_title_configuration import PerTitleConfiguration
2 |
3 |
4 | class H265PerTitleConfiguration(PerTitleConfiguration):
5 | def __init__(self, min_bitrate=None, max_bitrate=None, min_bitrate_step_size=None,
6 | max_bitrate_step_size=None, target_quality_crf=None, auto_representations=None,
7 | codec_min_bitrate_factor=None, codec_max_bitrate_factor=None, codec_bufsize_factor=None,
8 | complexity_factor=None):
9 | super().__init__(min_bitrate=min_bitrate, max_bitrate=max_bitrate, min_bitrate_step_size=min_bitrate_step_size,
10 | max_bitrate_step_size=max_bitrate_step_size, auto_representations=auto_representations,
11 | complexity_factor=complexity_factor)
12 | self.targetQualityCrf = target_quality_crf
13 | self.codecMinBitrateFactor = codec_min_bitrate_factor
14 | self.codecMaxBitrateFactor = codec_max_bitrate_factor
15 | self.codecBufsizeFactor = codec_bufsize_factor
16 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/pertitle/vp9_per_title_configuration.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models.encodings.pertitle.per_title_configuration import PerTitleConfiguration
2 |
3 |
4 | class VP9PerTitleConfiguration(PerTitleConfiguration):
5 | def __init__(self, min_bitrate=None, max_bitrate=None, min_bitrate_step_size=None,
6 | max_bitrate_step_size=None, target_quality_crf=None, auto_representations=None,
7 | complexity_factor=None):
8 | super().__init__(min_bitrate=min_bitrate, max_bitrate=max_bitrate, min_bitrate_step_size=min_bitrate_step_size,
9 | max_bitrate_step_size=max_bitrate_step_size, auto_representations=auto_representations,
10 | complexity_factor=complexity_factor)
11 | self.targetQualityCrf = target_quality_crf
12 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/start/__init__.py:
--------------------------------------------------------------------------------
1 | from .start_encoding_trimming import StartEncodingTrimming
2 | from .scheduling import Scheduling
3 | from .tweaks import Tweaks
4 | from .start_encoding_request import StartEncodingRequest
5 | from .manifests import StartManifest, VodStartManifest, VodDashStartManifest, VodHlsStartManifest
6 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/start/manifests/__init__.py:
--------------------------------------------------------------------------------
1 | from .start_manifest import StartManifest
2 | from .vod_start_manifest import VodStartManifest
3 | from .vod_dash_start_manifest import VodDashStartManifest
4 | from .vod_hls_start_manifest import VodHlsStartManifest
5 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/start/manifests/start_manifest.py:
--------------------------------------------------------------------------------
1 | from bitmovin.utils import Serializable
2 |
3 |
4 | class StartManifest(Serializable):
5 |
6 | def __init__(self, manifest_id):
7 | super().__init__()
8 | self.manifestId = manifest_id
9 |
10 | def serialize(self):
11 | serialized = super().serialize()
12 | return serialized
13 |
14 | @classmethod
15 | def parse_from_json_object(cls, json_object):
16 | manifest_id = json_object.get('manifestId')
17 | start_manifest = StartManifest(manifest_id=manifest_id)
18 |
19 | return start_manifest
20 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/start/manifests/vod_dash_start_manifest.py:
--------------------------------------------------------------------------------
1 | from .vod_start_manifest import VodStartManifest
2 |
3 |
4 | class VodDashStartManifest(VodStartManifest):
5 |
6 | def __init__(self, manifest_id):
7 | super().__init__(manifest_id=manifest_id)
8 |
9 | def serialize(self):
10 | serialized = super().serialize()
11 | return serialized
12 |
13 | @classmethod
14 | def parse_from_json_object(cls, json_object):
15 | vod_start_manifest = VodStartManifest.parse_from_json_object(json_object=json_object)
16 | vod_dash_start_manifest = VodDashStartManifest(manifest_id=vod_start_manifest.manifestId)
17 |
18 | return vod_dash_start_manifest
19 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/start/manifests/vod_hls_start_manifest.py:
--------------------------------------------------------------------------------
1 | from .vod_start_manifest import VodStartManifest
2 |
3 |
4 | class VodHlsStartManifest(VodStartManifest):
5 |
6 | def __init__(self, manifest_id):
7 | super().__init__(manifest_id=manifest_id)
8 |
9 | def serialize(self):
10 | serialized = super().serialize()
11 | return serialized
12 |
13 | @classmethod
14 | def parse_from_json_object(cls, json_object):
15 | vod_start_manifest = VodStartManifest.parse_from_json_object(json_object=json_object)
16 | vod_hls_start_manifest = VodHlsStartManifest(manifest_id=vod_start_manifest.manifestId)
17 |
18 | return vod_hls_start_manifest
19 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/start/manifests/vod_start_manifest.py:
--------------------------------------------------------------------------------
1 | from .start_manifest import StartManifest
2 |
3 |
4 | class VodStartManifest(StartManifest):
5 |
6 | def __init__(self, manifest_id):
7 | super().__init__(manifest_id=manifest_id)
8 |
9 | def serialize(self):
10 | serialized = super().serialize()
11 | return serialized
12 |
13 | @classmethod
14 | def parse_from_json_object(cls, json_object):
15 | start_manifest = StartManifest.parse_from_json_object(json_object=json_object)
16 | vod_start_manifest = VodStartManifest(manifest_id=start_manifest.manifestId)
17 |
18 | return vod_start_manifest
19 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/start/start_encoding_trimming.py:
--------------------------------------------------------------------------------
1 | from bitmovin.utils import Serializable
2 |
3 |
4 | class StartEncodingTrimming(Serializable):
5 | def __init__(self, offset=None, duration=None, start_pic_timing=None, end_pic_timing=None):
6 | super().__init__()
7 | self.endPicTiming = end_pic_timing
8 | self.startPicTiming = start_pic_timing
9 | self.duration = duration
10 | self.offset = offset
11 |
12 | def serialize(self):
13 | return super().serialize()
14 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/stream_filter.py:
--------------------------------------------------------------------------------
1 | from bitmovin.utils import Serializable
2 |
3 |
4 | class StreamFilter(Serializable):
5 | def __init__(self, id=None, position=None):
6 | super().__init__()
7 | self.id = id
8 | self.position = position
9 |
10 | @classmethod
11 | def parse_from_json_object(cls, json_object):
12 | id_ = json_object['id']
13 | position = json_object.get('position')
14 |
15 | sprite = StreamFilter(id=id_, position=position)
16 | return sprite
17 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/encodings/stream_metadata.py:
--------------------------------------------------------------------------------
1 | from bitmovin.utils import Serializable
2 |
3 |
4 | class StreamMetadata(Serializable):
5 |
6 | def __init__(self, language):
7 | super().__init__()
8 | self.language = language
9 |
10 | @classmethod
11 | def parse_from_json_object(cls, json_object):
12 | language = json_object.get('language')
13 | stream_metadata = StreamMetadata(language=language)
14 | return stream_metadata
15 |
16 | def serialize(self):
17 | serialized = super().serialize()
18 | serialized['language'] = self.language
19 | return serialized
20 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/filters/__init__.py:
--------------------------------------------------------------------------------
1 | from .abstract_filter import AbstractFilter
2 | from .watermark_filter import WatermarkFilter
3 | from .crop_filter import CropFilter
4 | from .rotate_filter import RotateFilter
5 | from .audio_mix_source_channel import AudioMixSourceChannel
6 | from .audio_mix_channel import AudioMixChannel
7 | from .audio_mix_filter import AudioMixFilter
8 | from .deinterlace_filter import DeinterlaceFilter
9 | from .denoise_hqdn3d_filter import DenoiseHqdn3dFilter
10 | from .text_filter import TextFilter
11 | from .enhanced_watermark_filter import EnhancedWatermarkFilter
12 | from .interlace_filter import InterlaceFilter
13 | from .scale_filter import ScaleFilter
14 | from .unsharp_filter import UnsharpFilter
15 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/filters/abstract_filter.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import AbstractModel
2 | from bitmovin.resources import AbstractNameDescriptionResource
3 |
4 |
5 | class AbstractFilter(AbstractNameDescriptionResource, AbstractModel):
6 |
7 | def __init__(self, id_, name=None, custom_data=None, description=None):
8 | super().__init__(id_=id_, custom_data=custom_data, name=name, description=description)
9 |
10 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/filters/denoise_hqdn3d_filter.py:
--------------------------------------------------------------------------------
1 | from . import AbstractFilter
2 |
3 |
4 | class DenoiseHqdn3dFilter(AbstractFilter):
5 |
6 | def __init__(self, name=None, luma_spatial=None, chroma_spatial=None, luma_tmp=None, chroma_tmp=None, id_=None,
7 | custom_data=None, description=None):
8 | super().__init__(id_=id_, custom_data=custom_data, name=name, description=description)
9 | self.lumaSpatial = luma_spatial
10 | self.chromaSpatial = chroma_spatial
11 | self.lumaTmp = luma_tmp
12 | self.chromaTmp = chroma_tmp
13 |
14 | @classmethod
15 | def parse_from_json_object(cls, json_object):
16 | id_ = json_object['id']
17 | luma_spatial = json_object.get('lumaSpatial')
18 | chroma_spatial = json_object.get('chromaSpatial')
19 | luma_tmp = json_object.get('lumaTmp')
20 | chroma_tmp = json_object.get('chromaTmp')
21 | name = json_object.get('name')
22 | description = json_object.get('description')
23 | crop_filter = DenoiseHqdn3dFilter(
24 | luma_spatial=luma_spatial, chroma_spatial=chroma_spatial, luma_tmp=luma_tmp, chroma_tmp=chroma_tmp, id_=id_,
25 | name=name, description=description)
26 | return crop_filter
27 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/filters/rotate_filter.py:
--------------------------------------------------------------------------------
1 | from . import AbstractFilter
2 |
3 |
4 | class RotateFilter(AbstractFilter):
5 |
6 | def __init__(self, name=None, rotation=None, id_=None, custom_data=None, description=None):
7 | super().__init__(id_=id_, custom_data=custom_data, name=name, description=description)
8 | self.rotation = rotation
9 |
10 | @classmethod
11 | def parse_from_json_object(cls, json_object):
12 | id_ = json_object['id']
13 | rotation = json_object['rotation']
14 | name = json_object.get('name')
15 | description = json_object.get('description')
16 | rotate_filter = RotateFilter(rotation=rotation, id_=id_, name=name, description=description)
17 | return rotate_filter
18 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/infrastructures/__init__.py:
--------------------------------------------------------------------------------
1 | from .abstract_infrastructure import AbstractInfrastructure
2 | from .kubernetes_infrastructure import KubernetesInfrastructure
3 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/infrastructures/abstract_infrastructure.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import AbstractModel
2 | from bitmovin.resources import AbstractNameDescriptionResource
3 |
4 |
5 | class AbstractInfrastructure(AbstractNameDescriptionResource, AbstractModel):
6 |
7 | def __init__(self, id_, custom_data=None, name=None, description=None):
8 | super().__init__(id_=id_, custom_data=custom_data, name=name, description=description)
9 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/inputs/__init__.py:
--------------------------------------------------------------------------------
1 | from .abstract_input import AbstractInput
2 | from .s3_input import S3Input
3 | from .gcs_input import GCSInput
4 | from .azure_input import AzureInput
5 | from .ftp_input import FTPInput
6 | from .sftp_input import SFTPInput
7 | from .http_input import HTTPInput
8 | from .https_input import HTTPSInput
9 | from .aspera_input import AsperaInput
10 | from .rtmp_input import RTMPInput
11 | from .generic_s3_input import GenericS3Input
12 | from .local_input import LocalInput
13 | from .zixi_input import ZixiInput
14 | from .analysis import *
15 | from .s3_role_based_input import S3RoleBasedInput
16 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/inputs/abstract_input.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import AbstractModel
2 | from bitmovin.resources import AbstractNameDescriptionResource
3 |
4 |
5 | class AbstractInput(AbstractNameDescriptionResource, AbstractModel):
6 |
7 | def __init__(self, id_, name=None, description=None, custom_data=None):
8 | super().__init__(id_=id_, custom_data=custom_data, name=name, description=description)
9 |
10 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/inputs/analysis/__init__.py:
--------------------------------------------------------------------------------
1 | from .analysis import Analysis
2 | from .analysis_stream import AnalysisStream
3 | from .analysis_audio_stream import AnalysisAudioStream
4 | from .analysis_details import AnalysisDetails
5 | from .analysis_message import AnalysisMessage
6 | from .analysis_meta_stream import AnalysisMetaStream
7 | from .analysis_subtitle_stream import AnalysisSubtitleStream
8 | from .analysis_video_stream import AnalysisVideoStream
9 | from .analysis_stream_details import AnalysisStreamDetails
10 | from .analysis_status_subtask import AnalysisStatusSubTask
11 | from .analysis_status import AnalysisStatus
12 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/inputs/analysis/analysis_meta_stream.py:
--------------------------------------------------------------------------------
1 | from .analysis_stream import AnalysisStream
2 |
3 |
4 | class AnalysisMetaStream(AnalysisStream):
5 |
6 | def __init__(self, id_, position, duration, codec):
7 | super().__init__(id_=id_, position=position, duration=duration, codec=codec)
8 |
9 | @classmethod
10 | def parse_from_json_object(cls, json_object):
11 | analysis_stream = AnalysisStream.parse_from_json_object(json_object=json_object)
12 | analysis_meta_stream = AnalysisMetaStream(id_=analysis_stream.id, position=analysis_stream.position,
13 | duration=analysis_stream.duration, codec=analysis_stream.codec)
14 | return analysis_meta_stream
15 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/inputs/analysis/analysis_stream.py:
--------------------------------------------------------------------------------
1 | from bitmovin.errors import BitmovinApiError
2 | from bitmovin.resources import Resource
3 |
4 |
5 | class AnalysisStream(Resource):
6 |
7 | def __init__(self, id_, position, duration, codec):
8 | super().__init__()
9 | self.id = id_
10 | self.position = position
11 | self.duration = duration
12 | self.codec = codec
13 |
14 | @classmethod
15 | def parse_from_json_object(cls, json_object):
16 | id_ = json_object.get('id')
17 | if id_ is None:
18 | raise BitmovinApiError('Invalid json object: missing field \'id\'')
19 | position = json_object.get('position')
20 | duration = json_object.get('duration')
21 | codec = json_object.get('codec')
22 | stream = AnalysisStream(id_=id_, position=position, duration=duration, codec=codec)
23 | return stream
24 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/inputs/analysis/analysis_subtitle_stream.py:
--------------------------------------------------------------------------------
1 | from .analysis_stream import AnalysisStream
2 |
3 |
4 | class AnalysisSubtitleStream(AnalysisStream):
5 |
6 | def __init__(self, id_, position, duration, codec, language, hearing_impaired):
7 | super().__init__(id_=id_, position=position, duration=duration, codec=codec)
8 | self.language = language
9 | self.hearingImpaired = hearing_impaired
10 |
11 | @classmethod
12 | def parse_from_json_object(cls, json_object):
13 | analysis_stream = AnalysisStream.parse_from_json_object(json_object=json_object)
14 | language = json_object.get('language')
15 | hearing_impaired = json_object.get('hearingImpaired')
16 |
17 | analysis_subtitle_stream = AnalysisSubtitleStream(id_=analysis_stream.id, position=analysis_stream.position,
18 | duration=analysis_stream.duration,
19 | codec=analysis_stream.codec, language=language,
20 | hearing_impaired=hearing_impaired)
21 | return analysis_subtitle_stream
22 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/inputs/analysis/analysis_video_stream.py:
--------------------------------------------------------------------------------
1 | from .analysis_stream import AnalysisStream
2 |
3 |
4 | class AnalysisVideoStream(AnalysisStream):
5 |
6 | def __init__(self, id_, position, duration, codec, fps, bitrate, width, height):
7 | super().__init__(id_=id_, position=position, duration=duration, codec=codec)
8 | self.fps = fps
9 | self.bitrate = bitrate
10 | self.width = width
11 | self.height = height
12 |
13 | @classmethod
14 | def parse_from_json_object(cls, json_object):
15 | analysis_stream = AnalysisStream.parse_from_json_object(json_object=json_object)
16 | fps = json_object.get('fps')
17 | bitrate = json_object.get('bitrate')
18 | width = json_object.get('width')
19 | height = json_object.get('height')
20 |
21 | analysis_video_stream = AnalysisVideoStream(id_=analysis_stream.id, position=analysis_stream.position,
22 | duration=analysis_stream.duration, codec=analysis_stream.codec,
23 | fps=fps, bitrate=bitrate, width=width, height=height)
24 |
25 | return analysis_video_stream
26 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/inputs/aspera_input.py:
--------------------------------------------------------------------------------
1 | from . import AbstractInput
2 |
3 |
4 | class AsperaInput(AbstractInput):
5 |
6 | def __init__(self, host, username, password, min_bandwidth=None, max_bandwidth=None, id_=None,
7 | custom_data=None, name=None, description=None):
8 | super().__init__(id_=id_, custom_data=custom_data, name=name, description=description)
9 | self.host = host
10 | self.username = username
11 | self.password = password
12 | self.minBandwidth = min_bandwidth
13 | self.maxBandwidth = max_bandwidth
14 |
15 | @classmethod
16 | def parse_from_json_object(cls, json_object):
17 | id_ = json_object['id']
18 | host = json_object['host']
19 | username = json_object.get('username')
20 | password = json_object.get('password')
21 | min_bandwidth = json_object.get('minBandwidth')
22 | max_bandwidth = json_object.get('maxBandwidth')
23 | name = json_object.get('name')
24 | description = json_object.get('description')
25 |
26 | aspera_input = AsperaInput(
27 | host=host, username=username, password=password,
28 | min_bandwidth=min_bandwidth, max_bandwidth=max_bandwidth, id_=id_, name=name, description=description)
29 |
30 | return aspera_input
31 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/inputs/azure_input.py:
--------------------------------------------------------------------------------
1 | from . import AbstractInput
2 |
3 |
4 | class AzureInput(AbstractInput):
5 |
6 | def __init__(self, account_name, account_key, container, id_=None, custom_data=None, name=None, description=None):
7 | super().__init__(id_=id_, custom_data=custom_data, name=name, description=description)
8 | self.accountName = account_name
9 | self.accountKey = account_key
10 | self.container = container
11 |
12 | @classmethod
13 | def parse_from_json_object(cls, json_object):
14 | id_ = json_object['id']
15 | container = json_object['container']
16 | account_name = json_object.get('accountName')
17 | account_key = json_object.get('accountKey')
18 | name = json_object.get('name')
19 | description = json_object.get('description')
20 | azure_input = AzureInput(
21 | account_name=account_name, account_key=account_key, container=container, id_=id_,
22 | name=name, description=description)
23 | return azure_input
24 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/inputs/ftp_input.py:
--------------------------------------------------------------------------------
1 | from . import AbstractInput
2 |
3 |
4 | class FTPInput(AbstractInput):
5 |
6 | def __init__(self, host, username, password, port=None, passive=None, id_=None, custom_data=None,
7 | name=None, description=None):
8 | super().__init__(id_=id_, custom_data=custom_data, name=name, description=description)
9 | self.host = host
10 | self.port = port
11 | self.username = username
12 | self.password = password
13 | self.passive = passive
14 |
15 | @classmethod
16 | def parse_from_json_object(cls, json_object):
17 | id_ = json_object['id']
18 | host = json_object['host']
19 | username = json_object.get('username')
20 | password = json_object.get('password')
21 | port = json_object.get('port')
22 | passive = json_object.get('passive')
23 | name = json_object.get('name')
24 | description = json_object.get('description')
25 | ftp_input = FTPInput(
26 | host=host, port=port, username=username, password=password, passive=passive, id_=id_,
27 | name=name, description=description)
28 | return ftp_input
29 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/inputs/http_input.py:
--------------------------------------------------------------------------------
1 | from . import AbstractInput
2 |
3 |
4 | class HTTPInput(AbstractInput):
5 |
6 | def __init__(self, host, username=None, password=None, id_=None, custom_data=None, name=None, description=None):
7 | super().__init__(id_=id_, custom_data=custom_data, name=name, description=description)
8 | self.host = host
9 | self.username = username
10 | self.password = password
11 |
12 | @classmethod
13 | def parse_from_json_object(cls, json_object):
14 | id_ = json_object['id']
15 | host = json_object['host']
16 | username = json_object.get('username')
17 | password = json_object.get('password')
18 | name = json_object.get('name')
19 | description = json_object.get('description')
20 | http_input = HTTPInput(
21 | host=host, username=username, password=password, id_=id_, name=name, description=description)
22 | return http_input
23 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/inputs/https_input.py:
--------------------------------------------------------------------------------
1 | from . import AbstractInput
2 |
3 |
4 | class HTTPSInput(AbstractInput):
5 |
6 | def __init__(self, host, username=None, password=None, id_=None, custom_data=None, name=None, description=None):
7 | super().__init__(id_=id_, custom_data=custom_data, name=name, description=description)
8 | self.host = host
9 | self.username = username
10 | self.password = password
11 |
12 | @classmethod
13 | def parse_from_json_object(cls, json_object):
14 | id_ = json_object['id']
15 | host = json_object['host']
16 | username = json_object.get('username')
17 | password = json_object.get('password')
18 | name = json_object.get('name')
19 | description = json_object.get('description')
20 | https_input = HTTPSInput(
21 | host=host, username=username, password=password, id_=id_, name=name, description=description)
22 | return https_input
23 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/inputs/local_input.py:
--------------------------------------------------------------------------------
1 | from . import AbstractInput
2 |
3 |
4 | class LocalInput(AbstractInput):
5 |
6 | def __init__(self, path, id_=None, custom_data=None, name=None, description=None):
7 | super().__init__(id_=id_, custom_data=custom_data, name=name, description=description)
8 | self.path = path
9 |
10 | @classmethod
11 | def parse_from_json_object(cls, json_object):
12 | id_ = json_object['id']
13 | path = json_object['path']
14 | name = json_object.get('name')
15 | description = json_object.get('description')
16 | local_input = LocalInput(
17 | path=path, id_=id_, name=name, description=description)
18 |
19 | return local_input
20 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/inputs/rtmp_input.py:
--------------------------------------------------------------------------------
1 | from . import AbstractInput
2 |
3 |
4 | class RTMPInput(AbstractInput):
5 |
6 | def __init__(self, id_=None, custom_data=None, name=None, description=None):
7 | super().__init__(id_=id_, custom_data=custom_data, name=name, description=description)
8 |
9 | @classmethod
10 | def parse_from_json_object(cls, json_object):
11 | id_ = json_object['id']
12 | custom_data = json_object.get('customData')
13 | name = json_object.get('name')
14 | description = json_object.get('description')
15 | rtmp_input = RTMPInput(id_=id_, custom_data=custom_data, name=name, description=description)
16 | return rtmp_input
17 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/inputs/sftp_input.py:
--------------------------------------------------------------------------------
1 | from . import AbstractInput
2 |
3 |
4 | class SFTPInput(AbstractInput):
5 |
6 | def __init__(self, host, username, password, port=None, id_=None, custom_data=None, name=None, description=None):
7 | super().__init__(id_=id_, custom_data=custom_data, name=name, description=description)
8 | self.host = host
9 | self.port = port
10 | self.username = username
11 | self.password = password
12 |
13 | @classmethod
14 | def parse_from_json_object(cls, json_object):
15 | id_ = json_object['id']
16 | host = json_object['host']
17 | username = json_object.get('username')
18 | password = json_object.get('password')
19 | port = json_object.get('port')
20 | name = json_object.get('name')
21 | description = json_object.get('description')
22 | sftp_input = SFTPInput(
23 | host=host, port=port, username=username, password=password, id_=id_, name=name, description=description)
24 | return sftp_input
25 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/manifests/__init__.py:
--------------------------------------------------------------------------------
1 | from .abstract_manifest import AbstractManifest
2 | from .manifest_status import ManifestStatus
3 | from .dash import *
4 | from .hls import *
5 | from .smooth import *
6 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/manifests/dash/__init__.py:
--------------------------------------------------------------------------------
1 | from .dash_manifest import DashManifest
2 | from .abstract_adaptation_set import AbstractAdaptationSet
3 | from .period import Period
4 | from .audio_adaptation_set import AudioAdaptationSet
5 | from .subtitle_adaptation_set import SubtitleAdaptationSet
6 | from .video_adaptation_set import VideoAdaptationSet
7 | from .abstract_fmp4_representation import AbstractFMP4Representation
8 | from .fmp4_representation import FMP4Representation
9 | from .drm_fmp4_representation import DRMFMP4Representation
10 | from .webm_representation import WebMRepresentation
11 | from .content_protection import ContentProtection
12 | from .abstract_dash_mp4_representation import AbstractDashMP4Representation
13 | from .dash_mp4_representation import DashMP4Representation
14 | from .dash_name_space import DASHNamespace
15 | from .custom_xml_element import CustomXMLElement
16 | from .vtt_representation import VttRepresentation
17 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/manifests/dash/abstract_adaptation_set.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import AbstractModel
2 |
3 |
4 | class AbstractAdaptationSet(AbstractModel):
5 |
6 | def __init__(self, id_=None, custom_data=None):
7 | super().__init__(id_=id_, custom_data=custom_data)
8 |
9 | @classmethod
10 | def parse_from_json_object(cls, json_object):
11 | id_ = json_object['id']
12 | custom_data = json_object.get('customData')
13 | abstract_adaptation_set = AbstractAdaptationSet(id_=id_, custom_data=custom_data)
14 | return abstract_adaptation_set
15 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/manifests/dash/abstract_dash_mp4_representation.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import AbstractModel
2 | from bitmovin.utils import Serializable
3 |
4 |
5 | class AbstractDashMP4Representation(AbstractModel, Serializable):
6 |
7 | def __init__(self, encoding_id, muxing_id, file_path, id_=None, custom_data=None):
8 | super().__init__(id_=id_, custom_data=custom_data)
9 | self.encodingId = encoding_id
10 | self.muxingId = muxing_id
11 | self.filePath = file_path
12 |
13 | @classmethod
14 | def parse_from_json_object(cls, json_object):
15 | id_ = json_object.get('id')
16 | custom_data = json_object.get('customData')
17 | encoding_id = json_object.get('encodingId')
18 | muxing_id = json_object.get('muxingId')
19 | file_path = json_object.get('filePath')
20 | abstract_mp4_representation = AbstractDashMP4Representation(
21 | id_=id_, custom_data=custom_data, encoding_id=encoding_id, muxing_id=muxing_id, file_path=file_path)
22 | return abstract_mp4_representation
23 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/manifests/dash/audio_adaptation_set.py:
--------------------------------------------------------------------------------
1 | from .abstract_adaptation_set import AbstractAdaptationSet
2 |
3 |
4 | class AudioAdaptationSet(AbstractAdaptationSet):
5 |
6 | def __init__(self, lang, id_=None, custom_data=None):
7 | super().__init__(id_=id_, custom_data=custom_data)
8 | self.lang = lang
9 |
10 | @classmethod
11 | def parse_from_json_object(cls, json_object):
12 | adaptation_set = AbstractAdaptationSet.parse_from_json_object(json_object=json_object)
13 | id_ = adaptation_set.id
14 | custom_data = adaptation_set.customData
15 | lang = json_object['lang']
16 |
17 | audio_adaptation_set = AudioAdaptationSet(id_=id_, custom_data=custom_data, lang=lang)
18 | return audio_adaptation_set
19 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/manifests/dash/content_protection.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import AbstractModel
2 |
3 |
4 | class ContentProtection(AbstractModel):
5 |
6 | def __init__(self, encoding_id, muxing_id, drm_id, id_=None, custom_data=None):
7 | super().__init__(id_=id_, custom_data=custom_data)
8 | self.encodingId = encoding_id
9 | self.muxingId = muxing_id
10 | self.drmId = drm_id
11 |
12 | @classmethod
13 | def parse_from_json_object(cls, json_object):
14 | id_ = json_object['id']
15 | custom_data = json_object.get('customData')
16 | encoding_id = json_object['encodingId']
17 | muxing_id = json_object['muxingId']
18 | drm_id = json_object['drmId']
19 | content_protection = ContentProtection(id_=id_, custom_data=custom_data,
20 | encoding_id=encoding_id, muxing_id=muxing_id, drm_id=drm_id)
21 | return content_protection
22 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/manifests/dash/custom_xml_element.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import AbstractModel
2 |
3 |
4 | class CustomXMLElement(AbstractModel):
5 |
6 | def __init__(self, data, id_=None, custom_data=None):
7 | super().__init__(id_=id_, custom_data=custom_data)
8 | self.data = data
9 |
10 | @classmethod
11 | def parse_from_json_object(cls, json_object):
12 | id_ = json_object.get('id')
13 | custom_data = json_object.get('customData')
14 | data = json_object.get('data')
15 |
16 | custom_xml_element = CustomXMLElement(id_=id_, custom_data=custom_data, data=data)
17 |
18 | return custom_xml_element
19 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/manifests/dash/dash_mp4_representation.py:
--------------------------------------------------------------------------------
1 | from .abstract_dash_mp4_representation import AbstractDashMP4Representation
2 |
3 |
4 | class DashMP4Representation(AbstractDashMP4Representation):
5 |
6 | def __init__(self, encoding_id, muxing_id, file_path, id_=None, custom_data=None):
7 | super().__init__(id_=id_, custom_data=custom_data, encoding_id=encoding_id, muxing_id=muxing_id,
8 | file_path=file_path)
9 |
10 | @classmethod
11 | def parse_from_json_object(cls, json_object):
12 | representation = AbstractDashMP4Representation.parse_from_json_object(json_object=json_object)
13 |
14 | id_ = representation.id
15 | custom_data = representation.customData
16 | encoding_id = representation.encodingId
17 | muxing_id = representation.muxingId
18 | file_path = representation.filePath
19 |
20 | dash_mp4_representation = DashMP4Representation(id_=id_,
21 | custom_data=custom_data,
22 | encoding_id=encoding_id,
23 | muxing_id=muxing_id,
24 | file_path=file_path)
25 | return dash_mp4_representation
26 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/manifests/dash/dash_name_space.py:
--------------------------------------------------------------------------------
1 | from bitmovin.utils import Serializable
2 |
3 |
4 | class DASHNamespace(Serializable):
5 |
6 | def __init__(self, prefix, uri):
7 | super().__init__()
8 | self.prefix = prefix
9 | self.uri = uri
10 |
11 | @classmethod
12 | def parse_from_json_object(cls, json_object):
13 | prefix = json_object.get('prefix')
14 | uri = json_object.get('uri')
15 | namespace = DASHNamespace(prefix=prefix, uri=uri)
16 | return namespace
17 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/manifests/dash/period.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import AbstractModel
2 |
3 |
4 | class Period(AbstractModel):
5 |
6 | def __init__(self, start=None, duration=None, id_=None, custom_data=None):
7 | super().__init__(id_=id_, custom_data=custom_data)
8 | self.start = start
9 | self.duration = duration
10 |
11 | @classmethod
12 | def parse_from_json_object(cls, json_object):
13 | id_ = json_object['id']
14 | custom_data = json_object.get('customData')
15 | start = json_object.get('start')
16 | duration = json_object.get('duration')
17 | period = Period(
18 | id_=id_, custom_data=custom_data, start=start, duration=duration)
19 | return period
20 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/manifests/dash/subtitle_adaptation_set.py:
--------------------------------------------------------------------------------
1 | from .abstract_adaptation_set import AbstractAdaptationSet
2 |
3 |
4 | class SubtitleAdaptationSet(AbstractAdaptationSet):
5 |
6 | def __init__(self, lang, id_=None, custom_data=None):
7 | super().__init__(id_=id_, custom_data=custom_data)
8 | self.lang = lang
9 |
10 | @classmethod
11 | def parse_from_json_object(cls, json_object):
12 | adaptation_set = AbstractAdaptationSet.parse_from_json_object(json_object=json_object)
13 | id_ = adaptation_set.id
14 | custom_data = adaptation_set.customData
15 | lang = json_object['lang']
16 |
17 | audio_adaptation_set = SubtitleAdaptationSet(id_=id_, custom_data=custom_data, lang=lang)
18 | return audio_adaptation_set
19 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/manifests/dash/video_adaptation_set.py:
--------------------------------------------------------------------------------
1 | from .abstract_adaptation_set import AbstractAdaptationSet
2 |
3 |
4 | class VideoAdaptationSet(AbstractAdaptationSet):
5 |
6 | def __init__(self, id_=None, custom_data=None):
7 | super().__init__(id_=id_, custom_data=custom_data)
8 |
9 | @classmethod
10 | def parse_from_json_object(cls, json_object):
11 | adaptation_set = AbstractAdaptationSet.parse_from_json_object(json_object=json_object)
12 | id_ = adaptation_set.id
13 | custom_data = adaptation_set.customData
14 | audio_adaptation_set = VideoAdaptationSet(id_=id_, custom_data=custom_data)
15 | return audio_adaptation_set
16 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/manifests/dash/vtt_representation.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import AbstractModel
2 | from bitmovin.utils import Serializable
3 |
4 |
5 | class VttRepresentation(AbstractModel, Serializable):
6 |
7 | def __init__(self, vtt_url, id_=None, custom_data=None):
8 | super().__init__(id_=id_, custom_data=custom_data)
9 | self.vttUrl = vtt_url
10 |
11 | @classmethod
12 | def parse_from_json_object(cls, json_object):
13 | id_ = json_object['id']
14 | custom_data = json_object.get('customData')
15 | vtt_url = json_object['vttUrl']
16 |
17 | vtt_representation = VttRepresentation(
18 | id_=id_, custom_data=custom_data, vtt_url=vtt_url)
19 | return vtt_representation
20 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/manifests/hls/__init__.py:
--------------------------------------------------------------------------------
1 | from .hls_manifest import HlsManifest
2 | from .audio_media import AudioMedia
3 | from .video_media import VideoMedia
4 | from .subtitles_media import SubtitlesMedia
5 | from .closed_captions_media import ClosedCaptionsMedia
6 | from .variant_stream import VariantStream
7 | from .vtt_media import VttMedia
8 | from .custom_tag import CustomTag
9 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/manifests/manifest_status.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources import AbstractIdResource
2 |
3 |
4 | class ManifestStatus(AbstractIdResource):
5 |
6 | def __init__(self, status=None, eta=None, progress=None, messages=None, subtasks=None, id_=None):
7 | super().__init__(id_=id_)
8 | self.status = status
9 | self.eta = eta
10 | self.progress = progress
11 | self.messages = messages
12 | self.subtasks = subtasks
13 |
14 | @classmethod
15 | def parse_from_json_object(cls, json_object):
16 | id_ = json_object.get('id')
17 | status = json_object['status']
18 | eta = json_object.get('eta')
19 | progress = json_object.get('progress')
20 | messages = json_object.get('messages')
21 | subtasks = json_object.get('subtasks')
22 |
23 | manifest_status = ManifestStatus(status=status, eta=eta, progress=progress, messages=messages,
24 | subtasks=subtasks, id_=id_)
25 | return manifest_status
26 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/manifests/smooth/__init__.py:
--------------------------------------------------------------------------------
1 | from .smooth_manifest import SmoothManifest
2 | from .abstract_mp4_representation import AbstractMP4Representation
3 | from .mp4_representation import MP4Representation
4 | from .content_protection import SmoothContentProtection
5 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/manifests/smooth/abstract_mp4_representation.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import AbstractModel
2 | from bitmovin.utils import Serializable
3 |
4 |
5 | class AbstractMP4Representation(AbstractModel, Serializable):
6 |
7 | def __init__(self, encoding_id, muxing_id, media_file, language=None,
8 | track_name=None, id_=None, custom_data=None):
9 | super().__init__(id_=id_, custom_data=custom_data)
10 | self.encodingId = encoding_id
11 | self.muxingId = muxing_id
12 | self.mediaFile = media_file
13 | self.language = language
14 | self.trackName = track_name
15 |
16 | @classmethod
17 | def parse_from_json_object(cls, json_object):
18 | id_ = json_object.get('id')
19 | custom_data = json_object.get('customData')
20 | encoding_id = json_object.get('encodingId')
21 | muxing_id = json_object.get('muxingId')
22 | media_file = json_object.get('mediaFile')
23 | language = json_object.get('language')
24 | track_name = json_object.get('trackName')
25 |
26 | abstract_mp4_representation = AbstractMP4Representation(
27 | id_=id_, custom_data=custom_data, encoding_id=encoding_id, muxing_id=muxing_id,
28 | media_file=media_file, language=language, track_name=track_name)
29 |
30 | return abstract_mp4_representation
31 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/manifests/smooth/content_protection.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import AbstractModel
2 |
3 |
4 | class SmoothContentProtection(AbstractModel):
5 |
6 | def __init__(self, encoding_id, muxing_id, drm_id, id_=None, custom_data=None):
7 | super().__init__(id_=id_, custom_data=custom_data)
8 | self.encodingId = encoding_id
9 | self.muxingId = muxing_id
10 | self.drmId = drm_id
11 |
12 | @classmethod
13 | def parse_from_json_object(cls, json_object):
14 | id_ = json_object.get('id')
15 | custom_data = json_object.get('customData')
16 | encoding_id = json_object.get('encodingId')
17 | muxing_id = json_object.get('muxingId')
18 | drm_id = json_object.get('drmId')
19 | content_protection = SmoothContentProtection(id_=id_,
20 | custom_data=custom_data,
21 | encoding_id=encoding_id,
22 | muxing_id=muxing_id,
23 | drm_id=drm_id)
24 | return content_protection
25 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/minimal_model.py:
--------------------------------------------------------------------------------
1 | from . import AbstractModel
2 |
3 |
4 | class MinimalModel(AbstractModel):
5 |
6 | def __init__(self, id_):
7 | super().__init__(id_=id_)
8 |
9 | @classmethod
10 | def parse_from_json_object(cls, json_object):
11 | minimal_model = MinimalModel(id_=json_object.get('id'))
12 | return minimal_model
13 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/outputs/__init__.py:
--------------------------------------------------------------------------------
1 | from .abstract_output import AbstractOutput
2 | from .s3_output import S3Output
3 | from .gcs_output import GCSOutput
4 | from .akamai_netstorage_output import AkamaiNetStorageOutput
5 | from .azure_output import AzureOutput
6 | from .ftp_output import FTPOutput
7 | from .sftp_output import SFTPOutput
8 | from .generic_s3_output import GenericS3Output
9 | from .local_output import LocalOutput
10 | from .s3_role_based_output import S3RoleBasedOutput
11 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/outputs/abstract_output.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import AbstractModel
2 | from bitmovin.resources import AbstractNameDescriptionResource
3 |
4 |
5 | class AbstractOutput(AbstractNameDescriptionResource, AbstractModel):
6 |
7 | def __init__(self, id_, custom_data=None, name=None, description=None):
8 | super().__init__(id_=id_, custom_data=custom_data, name=name, description=description)
9 |
10 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/outputs/akamai_netstorage_output.py:
--------------------------------------------------------------------------------
1 | from . import AbstractOutput
2 |
3 |
4 | class AkamaiNetStorageOutput(AbstractOutput):
5 |
6 | def __init__(self, host, username, password, id_=None, custom_data=None, name=None, description=None):
7 | super().__init__(id_=id_, custom_data=custom_data, name=name, description=description)
8 | self.host = host
9 | self.username = username
10 | self.password = password
11 |
12 | @classmethod
13 | def parse_from_json_object(cls, json_object):
14 | id_ = json_object['id']
15 | host = json_object['host']
16 | username = json_object.get('username')
17 | password = json_object.get('password')
18 | name = json_object.get('name')
19 | description = json_object.get('description')
20 | netstorage_output = AkamaiNetStorageOutput(
21 | host=host, username=username, password=password, id_=id_,
22 | name=name, description=description)
23 | return netstorage_output
24 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/outputs/azure_output.py:
--------------------------------------------------------------------------------
1 | from . import AbstractOutput
2 |
3 |
4 | class AzureOutput(AbstractOutput):
5 |
6 | def __init__(self, account_name, account_key, container, id_=None, custom_data=None, name=None, description=None):
7 | super().__init__(id_=id_, custom_data=custom_data, name=name, description=description)
8 | self.accountName = account_name
9 | self.accountKey = account_key
10 | self.container = container
11 |
12 | @classmethod
13 | def parse_from_json_object(cls, json_object):
14 | id_ = json_object['id']
15 | container = json_object['container']
16 | account_name = json_object.get('accountName')
17 | account_key = json_object.get('accountKey')
18 | name = json_object.get('name')
19 | description = json_object.get('description')
20 | azure_output = AzureOutput(
21 | account_name=account_name, account_key=account_key, container=container, id_=id_,
22 | name=name, description=description)
23 | return azure_output
24 |
--------------------------------------------------------------------------------
/bitmovin/resources/models/outputs/local_output.py:
--------------------------------------------------------------------------------
1 | from . import AbstractOutput
2 |
3 |
4 | class LocalOutput(AbstractOutput):
5 |
6 | def __init__(self, path, id_=None, custom_data=None, name=None, description=None):
7 | super().__init__(id_=id_, custom_data=custom_data, name=name, description=description)
8 | self.path = path
9 |
10 | @classmethod
11 | def parse_from_json_object(cls, json_object):
12 | id_ = json_object['id']
13 | path = json_object['path']
14 | name = json_object.get('name')
15 | description = json_object.get('description')
16 | local_output = LocalOutput(path=path, id_=id_, name=name, description=description)
17 | return local_output
18 |
--------------------------------------------------------------------------------
/bitmovin/resources/resource.py:
--------------------------------------------------------------------------------
1 | import abc
2 |
3 |
4 | class Resource:
5 | __metaclass__ = abc.ABCMeta
6 |
7 | def __init__(self, **kwargs):
8 | super().__init__()
9 |
--------------------------------------------------------------------------------
/bitmovin/resources/resource_response.py:
--------------------------------------------------------------------------------
1 | class ResourceResponse:
2 | def __init__(self, response, resource):
3 | self.response = response
4 | self.resource = resource
5 |
--------------------------------------------------------------------------------
/bitmovin/resources/response_data.py:
--------------------------------------------------------------------------------
1 | from .resource import Resource
2 |
3 |
4 | class ResponseData(Resource):
5 | pass
6 |
--------------------------------------------------------------------------------
/bitmovin/rest/__init__.py:
--------------------------------------------------------------------------------
1 | from .http_client import BitmovinHttpClient
2 |
--------------------------------------------------------------------------------
/bitmovin/rest/utils.py:
--------------------------------------------------------------------------------
1 | def check_response_success(response):
2 | status_code = response.status_code
3 | if 200 <= status_code <= 299:
4 | return True
5 | return False
6 |
7 |
8 | def check_response_header_json(response):
9 | headers = response.headers
10 | content_type = headers.get('content-type')
11 | if content_type.startswith('application/json') or content_type.startswith('application/hal+json'):
12 | return True
13 | return False
14 |
--------------------------------------------------------------------------------
/bitmovin/services/__init__.py:
--------------------------------------------------------------------------------
1 | from .inputs import InputService
2 | from .outputs import OutputService
3 | from .filters import FilterService
4 | from .codecconfigurations import CodecConfigurationService
5 | from .encodings import EncodingService
6 | from .manifests import ManifestService
7 | from .infrastructures import InfrastructureService
8 | from .analytics import AnalyticsService
9 |
--------------------------------------------------------------------------------
/bitmovin/services/analytics/__init__.py:
--------------------------------------------------------------------------------
1 | from .analytics_service import AnalyticsService
2 |
--------------------------------------------------------------------------------
/bitmovin/services/analytics/analytics_license_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import AnalyticsLicense
2 | from bitmovin.errors import FunctionalityNotAvailableError
3 | from .analytics_domain_service import AnalyticsDomainService
4 | from ..rest_service import RestService
5 |
6 |
7 | class AnalyticsLicenseService(RestService):
8 | BASE_ENDPOINT_URL = 'analytics/licenses'
9 |
10 | def __init__(self, http_client):
11 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=AnalyticsLicense)
12 | self.Domains = AnalyticsDomainService(http_client=self.http_client)
13 |
14 | def create(self, object_, license_id):
15 | raise FunctionalityNotAvailableError()
16 |
17 | def delete(self, license_id, domain_id):
18 | raise FunctionalityNotAvailableError()
19 |
20 | def retrieve_custom_data(self, license_id, domain_id):
21 | raise FunctionalityNotAvailableError()
22 |
--------------------------------------------------------------------------------
/bitmovin/services/analytics/analytics_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.bitmovin_object import BitmovinObject
2 | from .analytics_license_service import AnalyticsLicenseService
3 |
4 |
5 | class AnalyticsService(BitmovinObject):
6 | def __init__(self, http_client):
7 | super().__init__()
8 | self.http_client = http_client
9 | self.Licenses = AnalyticsLicenseService(http_client=self.http_client)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/codecconfigurations/__init__.py:
--------------------------------------------------------------------------------
1 | from .codec_configuration_service import CodecConfigurationService
2 |
--------------------------------------------------------------------------------
/bitmovin/services/codecconfigurations/aac_codec_configuration_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import AACCodecConfiguration
2 | from ..rest_service import RestService
3 |
4 |
5 | class AAC(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/configurations/audio/aac'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=AACCodecConfiguration)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/codecconfigurations/ac3_codec_configuration_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import AC3CodecConfiguration
2 | from ..rest_service import RestService
3 |
4 |
5 | class AC3(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/configurations/audio/ac3'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=AC3CodecConfiguration)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/codecconfigurations/av1_codec_configuration_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import AV1CodecConfiguration
2 | from ..rest_service import RestService
3 |
4 |
5 | class AV1(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/configurations/video/av1'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=AV1CodecConfiguration)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/codecconfigurations/eac3_codec_configuration_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import EAC3CodecConfiguration
2 | from ..rest_service import RestService
3 |
4 |
5 | class EAC3(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/configurations/audio/eac3'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=EAC3CodecConfiguration)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/codecconfigurations/h264_codec_configuration_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import H264CodecConfiguration
2 | from ..rest_service import RestService
3 |
4 |
5 | class H264(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/configurations/video/h264'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=H264CodecConfiguration)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/codecconfigurations/h265_codec_configuration_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import H265CodecConfiguration
2 | from ..rest_service import RestService
3 |
4 |
5 | class H265(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/configurations/video/h265'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=H265CodecConfiguration)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/codecconfigurations/he_aac_v1_codec_configuration_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import HeAACv1CodecConfiguration
2 | from ..rest_service import RestService
3 |
4 |
5 | class HeAACv1(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/configurations/audio/he-aac-v1'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=HeAACv1CodecConfiguration)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/codecconfigurations/he_aac_v2_codec_configuration_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import HeAACv2CodecConfiguration
2 | from ..rest_service import RestService
3 |
4 |
5 | class HeAACv2(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/configurations/audio/he-aac-v2'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=HeAACv2CodecConfiguration)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/codecconfigurations/mjpeg_codec_configuration_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import MJPEGCodecConfiguration
2 | from ..rest_service import RestService
3 |
4 |
5 | class MJPEG(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/configurations/video/mjpeg'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=MJPEGCodecConfiguration)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/codecconfigurations/mp2_codec_configuration_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import MP2CodecConfiguration
2 | from ..rest_service import RestService
3 |
4 |
5 | class MP2(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/configurations/audio/mp2'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=MP2CodecConfiguration)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/codecconfigurations/mp3_codec_configuration_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import MP3CodecConfiguration
2 | from ..rest_service import RestService
3 |
4 |
5 | class MP3(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/configurations/audio/mp3'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=MP3CodecConfiguration)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/codecconfigurations/opus_codec_configuration_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import OpusCodecConfiguration
2 | from ..rest_service import RestService
3 |
4 |
5 | class Opus(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/configurations/audio/opus'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=OpusCodecConfiguration)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/codecconfigurations/vorbis_codec_configuration_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import VorbisCodecConfiguration
2 | from ..rest_service import RestService
3 |
4 |
5 | class Vorbis(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/configurations/audio/vorbis'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=VorbisCodecConfiguration)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/codecconfigurations/vp9_codec_configuration_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import VP9CodecConfiguration
2 | from ..rest_service import RestService
3 |
4 |
5 | class VP9(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/configurations/video/vp9'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=VP9CodecConfiguration)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/__init__.py:
--------------------------------------------------------------------------------
1 | from .service import EncodingService
2 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/aes_drm_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.errors import MissingArgumentError
2 | from bitmovin.resources.models import AESDRM as AESDRMResource
3 | from .generic_drm_service import GenericDRMService
4 |
5 |
6 | class AESDRM(GenericDRMService):
7 |
8 | def __init__(self, http_client, muxing_type_url):
9 | if not muxing_type_url:
10 | raise MissingArgumentError('muxing_type_url must be specified!')
11 |
12 | super().__init__(http_client=http_client,
13 | muxing_type_url=muxing_type_url,
14 | drm_type_url='aes',
15 | resource_class=AESDRMResource)
16 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/broadcast_ts_muxing_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import BroadcastTsMuxing as BroadcastTsMuxingResource
2 | from .generic_muxing_service import GenericMuxingService
3 |
4 |
5 | class BroadcastTsMuxing(GenericMuxingService):
6 |
7 | def __init__(self, http_client):
8 | super().__init__(http_client=http_client, type_url='broadcast-ts', resource_class=BroadcastTsMuxingResource)
9 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/cenc_drm_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.errors import MissingArgumentError
2 | from bitmovin.resources.models import CENCDRM as CENCDRMResource
3 | from .generic_drm_service import GenericDRMService
4 |
5 |
6 | class CENCDRM(GenericDRMService):
7 |
8 | def __init__(self, http_client, muxing_type_url):
9 | if not muxing_type_url:
10 | raise MissingArgumentError('muxing_type_url must be specified!')
11 |
12 | super().__init__(http_client=http_client,
13 | muxing_type_url=muxing_type_url,
14 | drm_type_url='cenc',
15 | resource_class=CENCDRMResource)
16 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/clearkey_drm_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.errors import MissingArgumentError
2 | from bitmovin.resources.models import ClearKeyDRM as ClearKeyDRMResource
3 | from .generic_drm_service import GenericDRMService
4 |
5 |
6 | class ClearKeyDRM(GenericDRMService):
7 |
8 | def __init__(self, http_client, muxing_type_url):
9 | if not muxing_type_url:
10 | raise MissingArgumentError('muxing_type_url must be specified!')
11 |
12 | super().__init__(http_client=http_client,
13 | muxing_type_url=muxing_type_url,
14 | drm_type_url='clearkey',
15 | resource_class=ClearKeyDRMResource)
16 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/drm_service.py:
--------------------------------------------------------------------------------
1 |
2 | class DRMService:
3 | def __init__(self, http_client):
4 | super().__init__()
5 | self.http_client = http_client
6 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/fairplay_drm_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.errors import MissingArgumentError
2 | from bitmovin.resources.models import FairPlayDRM as FairPlayDRMResource
3 | from .generic_drm_service import GenericDRMService
4 |
5 |
6 | class FairPlayDRM(GenericDRMService):
7 |
8 | def __init__(self, http_client, muxing_type_url):
9 | if not muxing_type_url:
10 | raise MissingArgumentError('muxing_type_url must be specified!')
11 |
12 | super().__init__(http_client=http_client,
13 | muxing_type_url=muxing_type_url,
14 | drm_type_url='fairplay',
15 | resource_class=FairPlayDRMResource)
16 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/fmp4_drm_service.py:
--------------------------------------------------------------------------------
1 | from .drm_service import DRMService
2 | from .fairplay_drm_service import FairPlayDRM
3 | from .widevine_drm_service import WidevineDRM
4 | from .playready_drm_service import PlayReadyDRM
5 | from .primetime_drm_service import PrimeTimeDRM
6 | from .marlin_drm_service import MarlinDRM
7 | from .clearkey_drm_service import ClearKeyDRM
8 | from .cenc_drm_service import CENCDRM
9 |
10 |
11 | class FMP4DRMService(DRMService):
12 |
13 | MUXING_TYPE_URL = 'fmp4'
14 |
15 | def __init__(self, http_client):
16 | super().__init__(http_client=http_client)
17 | self.FairPlay = FairPlayDRM(http_client=http_client, muxing_type_url=self.MUXING_TYPE_URL)
18 | self.Widevine = WidevineDRM(http_client=http_client, muxing_type_url=self.MUXING_TYPE_URL)
19 | self.PlayReady = PlayReadyDRM(http_client=http_client, muxing_type_url=self.MUXING_TYPE_URL)
20 | self.PrimeTime = PrimeTimeDRM(http_client=http_client, muxing_type_url=self.MUXING_TYPE_URL)
21 | self.Marlin = MarlinDRM(http_client=http_client, muxing_type_url=self.MUXING_TYPE_URL)
22 | self.ClearKey = ClearKeyDRM(http_client=http_client, muxing_type_url=self.MUXING_TYPE_URL)
23 | self.CENC = CENCDRM(http_client=http_client, muxing_type_url=self.MUXING_TYPE_URL)
24 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/fmp4_muxing_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import FMP4Muxing as FMP4MuxingResource
2 | from .generic_muxing_service import GenericMuxingService
3 | from .fmp4_drm_service import FMP4DRMService
4 |
5 |
6 | class FMP4Muxing(GenericMuxingService):
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, type_url='fmp4', resource_class=FMP4MuxingResource)
10 | self.DRM = FMP4DRMService(http_client=http_client)
11 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/frame_id_id3_tag_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.errors import MissingArgumentError
2 | from bitmovin.resources.models import FrameIdID3Tag as FrameIdID3TagResource
3 | from .generic_id3_tag_service import GenericID3TagService
4 |
5 |
6 | class FrameIdID3(GenericID3TagService):
7 |
8 | def __init__(self, http_client, muxing_type_url):
9 | if not muxing_type_url:
10 | raise MissingArgumentError('muxing_type_url must be specified!')
11 |
12 | super().__init__(http_client=http_client,
13 | muxing_type_url=muxing_type_url,
14 | id3_type_url='frame-id',
15 | resource_class=FrameIdID3TagResource)
16 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/id3_tag_service.py:
--------------------------------------------------------------------------------
1 |
2 | class ID3TagService:
3 | def __init__(self, http_client):
4 | super().__init__()
5 | self.http_client = http_client
6 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/input_analysis_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.errors import MissingArgumentError
2 | from bitmovin.resources.models.inputs.analysis.stream_input_analysis import StreamInputAnalysis
3 | from bitmovin.services.rest_service import RestService
4 |
5 |
6 | class InputAnalysisService(RestService):
7 | BASE_ENDPOINT_URL = 'encoding/encodings/{encoding_id}/streams/{stream_id}/inputs'
8 |
9 | def __init__(self, http_client):
10 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=StreamInputAnalysis)
11 |
12 | def _get_endpoint_url(self, encoding_id, stream_id):
13 | if not encoding_id:
14 | raise MissingArgumentError('encoding_id must be given')
15 | if not stream_id:
16 | raise MissingArgumentError('stream_id must be given')
17 |
18 | endpoint_url = self.BASE_ENDPOINT_URL\
19 | .replace('{encoding_id}', encoding_id)\
20 | .replace('{stream_id}', stream_id)
21 |
22 | return endpoint_url
23 |
24 | def list(self, encoding_id, stream_id):
25 | self.relative_url = self._get_endpoint_url(encoding_id=encoding_id, stream_id=stream_id)
26 | return super().list()
27 |
28 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/marlin_drm_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.errors import MissingArgumentError
2 | from bitmovin.resources.models import MarlinDRM as MarlinDRMResource
3 | from .generic_drm_service import GenericDRMService
4 |
5 |
6 | class MarlinDRM(GenericDRMService):
7 |
8 | def __init__(self, http_client, muxing_type_url):
9 | if not muxing_type_url:
10 | raise MissingArgumentError('muxing_type_url must be specified!')
11 |
12 | super().__init__(http_client=http_client,
13 | muxing_type_url=muxing_type_url,
14 | drm_type_url='marlin',
15 | resource_class=MarlinDRMResource)
16 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/mp4_drm_service.py:
--------------------------------------------------------------------------------
1 | from .drm_service import DRMService
2 | from .widevine_drm_service import WidevineDRM
3 | from .playready_drm_service import PlayReadyDRM
4 | from .marlin_drm_service import MarlinDRM
5 | from .clearkey_drm_service import ClearKeyDRM
6 | from .cenc_drm_service import CENCDRM
7 |
8 |
9 | class MP4DRMService(DRMService):
10 |
11 | MUXING_TYPE_URL = 'mp4'
12 |
13 | def __init__(self, http_client):
14 | super().__init__(http_client=http_client)
15 | self.Widevine = WidevineDRM(http_client=http_client, muxing_type_url=self.MUXING_TYPE_URL)
16 | self.PlayReady = PlayReadyDRM(http_client=http_client, muxing_type_url=self.MUXING_TYPE_URL)
17 | self.Marlin = MarlinDRM(http_client=http_client, muxing_type_url=self.MUXING_TYPE_URL)
18 | self.ClearKey = ClearKeyDRM(http_client=http_client, muxing_type_url=self.MUXING_TYPE_URL)
19 | self.CENC = CENCDRM(http_client=http_client, muxing_type_url=self.MUXING_TYPE_URL)
20 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/muxing_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.bitmovin_object import BitmovinObject
2 | from .fmp4_muxing_service import FMP4Muxing
3 | from .ts_muxing_service import TSMuxing
4 | from .mp4_muxing_service import MP4Muxing
5 | from .webm_muxing_service import WebMMuxing
6 | from .progressive_ts_muxing_service import ProgressiveTSMuxing
7 | from .progressive_mov_muxing_service import ProgressiveMOVMuxing
8 | from .broadcast_ts_muxing_service import BroadcastTsMuxing
9 | from .progressive_webm_muxing_service import ProgressiveWebMMuxing
10 |
11 |
12 | class MuxingService(BitmovinObject):
13 | def __init__(self, http_client):
14 | super().__init__()
15 | self.http_client = http_client
16 | self.FMP4 = FMP4Muxing(http_client=self.http_client)
17 | self.MP4 = MP4Muxing(http_client=self.http_client)
18 | self.TS = TSMuxing(http_client=self.http_client)
19 | self.WebM = WebMMuxing(http_client=self.http_client)
20 | self.ProgressiveTS = ProgressiveTSMuxing(http_client=self.http_client)
21 | self.ProgressiveMOV = ProgressiveMOVMuxing(http_client=self.http_client)
22 | self.BroadcastTS = BroadcastTsMuxing(http_client=self.http_client)
23 | self.ProgressiveWebM = ProgressiveWebMMuxing(http_client=self.http_client)
24 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/plain_text_id3_tag_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.errors import MissingArgumentError
2 | from bitmovin.resources.models import PlainTextID3Tag as PlainTextID3TagResource
3 | from .generic_id3_tag_service import GenericID3TagService
4 |
5 |
6 | class PlainTextID3(GenericID3TagService):
7 |
8 | def __init__(self, http_client, muxing_type_url):
9 | if not muxing_type_url:
10 | raise MissingArgumentError('muxing_type_url must be specified!')
11 |
12 | super().__init__(http_client=http_client,
13 | muxing_type_url=muxing_type_url,
14 | id3_type_url='plain-text',
15 | resource_class=PlainTextID3TagResource)
16 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/playready_drm_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.errors import MissingArgumentError
2 | from bitmovin.resources.models import PlayReadyDRM as PlayReadyDRMResource
3 | from .generic_drm_service import GenericDRMService
4 |
5 |
6 | class PlayReadyDRM(GenericDRMService):
7 |
8 | def __init__(self, http_client, muxing_type_url):
9 | if not muxing_type_url:
10 | raise MissingArgumentError('muxing_type_url must be specified!')
11 |
12 | super().__init__(http_client=http_client,
13 | muxing_type_url=muxing_type_url,
14 | drm_type_url='playready',
15 | resource_class=PlayReadyDRMResource)
16 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/primetime_drm_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.errors import MissingArgumentError
2 | from bitmovin.resources.models import PrimeTimeDRM as PrimeTimeDRMResource
3 | from .generic_drm_service import GenericDRMService
4 |
5 |
6 | class PrimeTimeDRM(GenericDRMService):
7 |
8 | def __init__(self, http_client, muxing_type_url):
9 | if not muxing_type_url:
10 | raise MissingArgumentError('muxing_type_url must be specified!')
11 |
12 | super().__init__(http_client=http_client,
13 | muxing_type_url=muxing_type_url,
14 | drm_type_url='primetime',
15 | resource_class=PrimeTimeDRMResource)
16 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/progressive_mov_muxing_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import ProgressiveMOVMuxing as ProgressiveMOVMuxingResource
2 | from .generic_muxing_service import GenericMuxingService
3 |
4 |
5 | class ProgressiveMOVMuxing(GenericMuxingService):
6 |
7 | def __init__(self, http_client):
8 | super().__init__(http_client=http_client, type_url='progressive-mov',
9 | resource_class=ProgressiveMOVMuxingResource)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/progressive_ts_id3_service.py:
--------------------------------------------------------------------------------
1 | from .id3_tag_service import ID3TagService
2 | from .raw_id3_tag_service import RawID3
3 | from .plain_text_id3_tag_service import PlainTextID3
4 | from .frame_id_id3_tag_service import FrameIdID3
5 |
6 |
7 | class ProgressiveTSID3Service(ID3TagService):
8 |
9 | MUXING_TYPE_URL = 'progressive-ts'
10 |
11 | def __init__(self, http_client):
12 | super().__init__(http_client=http_client)
13 | self.Raw = RawID3(http_client=http_client, muxing_type_url=self.MUXING_TYPE_URL)
14 | self.FrameId = FrameIdID3(http_client=http_client, muxing_type_url=self.MUXING_TYPE_URL)
15 | self.PlainText = PlainTextID3(http_client=http_client, muxing_type_url=self.MUXING_TYPE_URL)
16 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/progressive_webm_muxing_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import ProgressiveWebMMuxing as ProgressiveWebMMuxingResource
2 | from .generic_muxing_service import GenericMuxingService
3 |
4 |
5 | class ProgressiveWebMMuxing(GenericMuxingService):
6 |
7 | def __init__(self, http_client):
8 | super().__init__(http_client=http_client, type_url='progressive-webm',
9 | resource_class=ProgressiveWebMMuxingResource)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/raw_id3_tag_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.errors import MissingArgumentError
2 | from bitmovin.resources.models import RawID3Tag as RawID3TagResource
3 | from .generic_id3_tag_service import GenericID3TagService
4 |
5 |
6 | class RawID3(GenericID3TagService):
7 |
8 | def __init__(self, http_client, muxing_type_url):
9 | if not muxing_type_url:
10 | raise MissingArgumentError('muxing_type_url must be specified!')
11 |
12 | super().__init__(http_client=http_client,
13 | muxing_type_url=muxing_type_url,
14 | id3_type_url='raw',
15 | resource_class=RawID3TagResource)
16 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/stream_filter_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.errors import MissingArgumentError
2 | from bitmovin.services.rest_service import RestService
3 |
4 |
5 | class StreamFilterService(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/encodings/{encoding_id}/streams/{stream_id}/filters'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=None)
10 |
11 | def _get_endpoint_url(self, encoding_id, stream_id):
12 | if not encoding_id:
13 | raise MissingArgumentError('encoding_id must be given')
14 | if not stream_id:
15 | raise MissingArgumentError('stream_id must be given')
16 |
17 | endpoint_url = self.BASE_ENDPOINT_URL\
18 | .replace('{encoding_id}', encoding_id)\
19 | .replace('{stream_id}', stream_id)
20 |
21 | return endpoint_url
22 |
23 | def create(self, encoding_id, stream_id, stream_filter):
24 | self.relative_url = self._get_endpoint_url(encoding_id=encoding_id, stream_id=stream_id)
25 | super().create_without_check(stream_filter)
26 |
27 | def delete(self, encoding_id, stream_id, filter_id):
28 | self.relative_url = self._get_endpoint_url(encoding_id=encoding_id, stream_id=stream_id)
29 | super().delete(id_=filter_id)
30 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/ts_drm_service.py:
--------------------------------------------------------------------------------
1 | from .drm_service import DRMService
2 | from .fairplay_drm_service import FairPlayDRM
3 | from .aes_drm_service import AESDRM
4 |
5 |
6 | class TSDRMService(DRMService):
7 |
8 | MUXING_TYPE_URL = 'ts'
9 |
10 | def __init__(self, http_client):
11 | super().__init__(http_client=http_client)
12 | self.FairPlay = FairPlayDRM(http_client=http_client, muxing_type_url=self.MUXING_TYPE_URL)
13 | self.AES = AESDRM(http_client=http_client, muxing_type_url=self.MUXING_TYPE_URL)
14 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/ts_muxing_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import TSMuxing as TSMuxingResource
2 | from .generic_muxing_service import GenericMuxingService
3 | from .ts_drm_service import TSDRMService
4 |
5 |
6 | class TSMuxing(GenericMuxingService):
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, type_url='ts', resource_class=TSMuxingResource)
10 | self.DRM = TSDRMService(http_client=http_client)
11 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/webm_drm_service.py:
--------------------------------------------------------------------------------
1 | from .drm_service import DRMService
2 | from .cenc_drm_service import CENCDRM
3 |
4 |
5 | class WebMDRMService(DRMService):
6 |
7 | MUXING_TYPE_URL = 'webm'
8 |
9 | def __init__(self, http_client):
10 | super().__init__(http_client=http_client)
11 | self.CENC = CENCDRM(http_client=http_client, muxing_type_url=self.MUXING_TYPE_URL)
12 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/webm_muxing_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import WebMMuxing as WebMMuxingResource
2 | from .generic_muxing_service import GenericMuxingService
3 | from .webm_drm_service import WebMDRMService
4 |
5 |
6 | class WebMMuxing(GenericMuxingService):
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, type_url='webm', resource_class=WebMMuxingResource)
10 | self.DRM = WebMDRMService(http_client=http_client)
11 |
--------------------------------------------------------------------------------
/bitmovin/services/encodings/widevine_drm_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.errors import MissingArgumentError
2 | from bitmovin.resources.models import WidevineDRM as WidevineDRMResource
3 | from .generic_drm_service import GenericDRMService
4 |
5 |
6 | class WidevineDRM(GenericDRMService):
7 |
8 | def __init__(self, http_client, muxing_type_url):
9 | if not muxing_type_url:
10 | raise MissingArgumentError('muxing_type_url must be specified!')
11 |
12 | super().__init__(http_client=http_client,
13 | muxing_type_url=muxing_type_url,
14 | drm_type_url='widevine',
15 | resource_class=WidevineDRMResource)
16 |
--------------------------------------------------------------------------------
/bitmovin/services/filters/__init__.py:
--------------------------------------------------------------------------------
1 | from .filter_service import FilterService
2 |
--------------------------------------------------------------------------------
/bitmovin/services/filters/audiomix_filter_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import DeinterlaceFilter, AudioMixFilter
2 | from ..rest_service import RestService
3 |
4 |
5 | class AudioMix(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/filters/audio-mix'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=AudioMixFilter)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/filters/crop_filter_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import CropFilter
2 | from ..rest_service import RestService
3 |
4 |
5 | class Crop(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/filters/crop'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=CropFilter)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/filters/deinterlace_filter_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import DeinterlaceFilter
2 | from ..rest_service import RestService
3 |
4 |
5 | class Deinterlace(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/filters/deinterlace'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=DeinterlaceFilter)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/filters/denoise_hqdn3d_filter_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import DenoiseHqdn3dFilter
2 | from ..rest_service import RestService
3 |
4 |
5 | class DenoiseHqdn3d(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/filters/denoise-hqdn3d'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=DenoiseHqdn3dFilter)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/filters/enhanced_watermark_filter_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import EnhancedWatermarkFilter
2 | from ..rest_service import RestService
3 |
4 |
5 | class EnhancedWatermark(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/filters/enhanced-watermark'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=EnhancedWatermarkFilter)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/filters/interlace_filter_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import InterlaceFilter
2 | from ..rest_service import RestService
3 |
4 |
5 | class Interlace(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/filters/interlace'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=InterlaceFilter)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/filters/rotate_filter_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import RotateFilter
2 | from ..rest_service import RestService
3 |
4 |
5 | class Rotate(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/filters/rotate'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=RotateFilter)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/filters/scale_filter_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import ScaleFilter
2 | from ..rest_service import RestService
3 |
4 |
5 | class Scale(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/filters/scale'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=ScaleFilter)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/filters/text_filter_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import TextFilter
2 | from ..rest_service import RestService
3 |
4 |
5 | class Text(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/filters/text'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=TextFilter)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/filters/unsharp_filter_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import UnsharpFilter
2 | from ..rest_service import RestService
3 |
4 |
5 | class Unsharp(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/filters/unsharp'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=UnsharpFilter)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/filters/watermark_filter_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import WatermarkFilter
2 | from ..rest_service import RestService
3 |
4 |
5 | class Watermark(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/filters/watermark'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=WatermarkFilter)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/infrastructures/__init__.py:
--------------------------------------------------------------------------------
1 | from .infrastructure_service import InfrastructureService
2 |
--------------------------------------------------------------------------------
/bitmovin/services/infrastructures/infrastructure_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.bitmovin_object import BitmovinObject
2 | from .kubernetes_infrastructure_service import Kubernetes
3 |
4 |
5 | class InfrastructureService(BitmovinObject):
6 | def __init__(self, http_client):
7 | super().__init__()
8 | self.http_client = http_client
9 | self.Kubernetes = Kubernetes(http_client=self.http_client)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/infrastructures/kubernetes_infrastructure_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import KubernetesInfrastructure
2 | from ..rest_service import RestService
3 |
4 |
5 | class Kubernetes(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/infrastructure/kubernetes'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=KubernetesInfrastructure)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/inputs/__init__.py:
--------------------------------------------------------------------------------
1 | from .input_service import InputService
2 |
--------------------------------------------------------------------------------
/bitmovin/services/inputs/aspera_input_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import AsperaInput
2 | from ..rest_service import RestService
3 | from .analyse_service import AnalyzeService
4 |
5 |
6 | class Aspera(RestService, AnalyzeService):
7 | BASE_ENDPOINT_URL = 'encoding/inputs/aspera'
8 |
9 | def __init__(self, http_client):
10 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=AsperaInput)
11 |
--------------------------------------------------------------------------------
/bitmovin/services/inputs/azure_input_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import AzureInput
2 | from ..rest_service import RestService
3 | from .analyse_service import AnalyzeService
4 |
5 |
6 | class Azure(RestService, AnalyzeService):
7 | BASE_ENDPOINT_URL = 'encoding/inputs/azure'
8 |
9 | def __init__(self, http_client):
10 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=AzureInput)
11 |
--------------------------------------------------------------------------------
/bitmovin/services/inputs/ftp_input_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import FTPInput
2 | from ..rest_service import RestService
3 | from .analyse_service import AnalyzeService
4 |
5 |
6 | class FTP(RestService, AnalyzeService):
7 | BASE_ENDPOINT_URL = 'encoding/inputs/ftp'
8 |
9 | def __init__(self, http_client):
10 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=FTPInput)
11 |
--------------------------------------------------------------------------------
/bitmovin/services/inputs/gcs_input_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import GCSInput
2 | from ..rest_service import RestService
3 | from .analyse_service import AnalyzeService
4 |
5 |
6 | class GCS(RestService, AnalyzeService):
7 | BASE_ENDPOINT_URL = 'encoding/inputs/gcs'
8 |
9 | def __init__(self, http_client):
10 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=GCSInput)
11 |
--------------------------------------------------------------------------------
/bitmovin/services/inputs/generic_s3_input_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import GenericS3Input
2 | from ..rest_service import RestService
3 | from .analyse_service import AnalyzeService
4 |
5 |
6 | class GenericS3(RestService, AnalyzeService):
7 | BASE_ENDPOINT_URL = 'encoding/inputs/generic-s3'
8 |
9 | def __init__(self, http_client):
10 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=GenericS3Input)
11 |
--------------------------------------------------------------------------------
/bitmovin/services/inputs/http_input_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import HTTPInput
2 | from ..rest_service import RestService
3 | from .analyse_service import AnalyzeService
4 |
5 |
6 | class HTTP(RestService, AnalyzeService):
7 | BASE_ENDPOINT_URL = 'encoding/inputs/http'
8 |
9 | def __init__(self, http_client):
10 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=HTTPInput)
11 |
--------------------------------------------------------------------------------
/bitmovin/services/inputs/https_input_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import HTTPSInput
2 | from ..rest_service import RestService
3 | from .analyse_service import AnalyzeService
4 |
5 |
6 | class HTTPS(RestService, AnalyzeService):
7 | BASE_ENDPOINT_URL = 'encoding/inputs/https'
8 |
9 | def __init__(self, http_client):
10 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=HTTPSInput)
11 |
--------------------------------------------------------------------------------
/bitmovin/services/inputs/local_input_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import LocalInput
2 | from ..rest_service import RestService
3 | from .analyse_service import AnalyzeService
4 |
5 |
6 | class Local(RestService, AnalyzeService):
7 | BASE_ENDPOINT_URL = 'encoding/inputs/local'
8 |
9 | def __init__(self, http_client):
10 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=LocalInput)
11 |
--------------------------------------------------------------------------------
/bitmovin/services/inputs/rtmp_input_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.errors import FunctionalityNotAvailableError
2 | from bitmovin.resources.models import RTMPInput
3 | from ..rest_service import RestService
4 |
5 |
6 | class RTMP(RestService):
7 | BASE_ENDPOINT_URL = 'encoding/inputs/rtmp'
8 |
9 | def __init__(self, http_client):
10 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=RTMPInput)
11 |
12 | def create(self, object_):
13 | raise FunctionalityNotAvailableError('functionality "create" is not available for RTMP inputs')
14 |
15 | def delete(self, id_):
16 | raise FunctionalityNotAvailableError('functionality "delete" is not available for RTMP inputs')
17 |
18 | def retrieve_custom_data(self, id_):
19 | raise FunctionalityNotAvailableError('functionality "retrieve_custom_data" is not available for RTMP inputs')
20 |
21 |
--------------------------------------------------------------------------------
/bitmovin/services/inputs/s3_input_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import S3Input
2 | from ..rest_service import RestService
3 | from .analyse_service import AnalyzeService
4 |
5 |
6 | class S3(RestService, AnalyzeService):
7 | BASE_ENDPOINT_URL = 'encoding/inputs/s3'
8 |
9 | def __init__(self, http_client):
10 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=S3Input)
11 |
--------------------------------------------------------------------------------
/bitmovin/services/inputs/s3_role_based_input_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import S3RoleBasedInput
2 | from ..rest_service import RestService
3 | from .analyse_service import AnalyzeService
4 |
5 |
6 | class S3RoleBased(RestService, AnalyzeService):
7 | BASE_ENDPOINT_URL = 'encoding/inputs/s3-role-based'
8 |
9 | def __init__(self, http_client):
10 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=S3RoleBasedInput)
11 |
--------------------------------------------------------------------------------
/bitmovin/services/inputs/sftp_input_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import SFTPInput
2 | from ..rest_service import RestService
3 | from .analyse_service import AnalyzeService
4 |
5 |
6 | class SFTP(RestService, AnalyzeService):
7 | BASE_ENDPOINT_URL = 'encoding/inputs/sftp'
8 |
9 | def __init__(self, http_client):
10 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=SFTPInput)
11 |
--------------------------------------------------------------------------------
/bitmovin/services/inputs/zixi_input_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import ZixiInput
2 | from ..rest_service import RestService
3 | from .analyse_service import AnalyzeService
4 |
5 |
6 | class Zixi(RestService, AnalyzeService):
7 | BASE_ENDPOINT_URL = 'encoding/inputs/zixi'
8 |
9 | def __init__(self, http_client):
10 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=ZixiInput)
11 |
--------------------------------------------------------------------------------
/bitmovin/services/manifests/__init__.py:
--------------------------------------------------------------------------------
1 | from .manifest_service import ManifestService
2 |
--------------------------------------------------------------------------------
/bitmovin/services/manifests/audio_media_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources import AudioMedia
2 | from .generic_media_service import GenericMediaService
3 |
4 |
5 | class Audio(GenericMediaService):
6 |
7 | def __init__(self, http_client):
8 | super().__init__(http_client=http_client,
9 | media_type_url='audio',
10 | resource_class=AudioMedia)
11 |
--------------------------------------------------------------------------------
/bitmovin/services/manifests/closed_captions_media_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources import ClosedCaptionsMedia
2 | from .generic_media_service import GenericMediaService
3 |
4 |
5 | class ClosedCaptions(GenericMediaService):
6 |
7 | def __init__(self, http_client):
8 | super().__init__(http_client=http_client,
9 | media_type_url='closed-captions',
10 | resource_class=ClosedCaptionsMedia)
11 |
--------------------------------------------------------------------------------
/bitmovin/services/manifests/generic_custom_tag_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.errors import MissingArgumentError
2 | from bitmovin.resources.models.manifests.hls.custom_tag import CustomTag
3 | from bitmovin.services.rest_service import RestService
4 |
5 |
6 | class GenericCustomTagService(RestService):
7 | BASE_ENDPOINT_URL = 'encoding/manifests/hls/{manifest_id}/{type}/{object_id}/custom-tags'
8 |
9 | def __init__(self, http_client, custom_tag_type):
10 | if not custom_tag_type:
11 | raise MissingArgumentError('custom_tag_type must be given')
12 |
13 | self.custom_tag_type = custom_tag_type
14 | self.relative_url = self.BASE_ENDPOINT_URL.replace('{type}', custom_tag_type)
15 |
16 | super().__init__(http_client=http_client, relative_url=self.relative_url, class_=CustomTag)
17 |
18 | def _get_endpoint_url(self, manifest_id, object_id):
19 | if not manifest_id:
20 | raise MissingArgumentError('manifest_id must be given')
21 |
22 | if not object_id:
23 | raise MissingArgumentError('object_id must be given')
24 |
25 | endpoint_url = self.relative_url \
26 | .replace('{manifest_id}', manifest_id) \
27 | .replace('{object_id}', object_id)
28 |
29 | return endpoint_url
30 |
--------------------------------------------------------------------------------
/bitmovin/services/manifests/hls_manifest_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources import HlsManifest
2 | from bitmovin.services.manifests.generic_manifest_service import GenericManifestService
3 |
4 | from .manifest_control_service import ManifestControlService
5 |
6 | from .video_media_service import Video
7 | from .audio_media_service import Audio
8 | from .subtitles_media_service import Subtitles
9 | from .vtt_media_service import Vtt
10 | from .closed_captions_media_service import ClosedCaptions
11 | from .variant_stream_service import VariantStreamService
12 |
13 |
14 | class HLS(GenericManifestService, ManifestControlService):
15 | manifest_type = 'hls'
16 |
17 | def __init__(self, http_client):
18 | super().__init__(http_client=http_client, manifest_type=self.manifest_type, resource_class=HlsManifest)
19 |
20 | self.VideoMedia = Video(http_client=http_client)
21 | self.AudioMedia = Audio(http_client=http_client)
22 | self.SubtitlesMedia = Subtitles(http_client=http_client)
23 | self.VttMedia = Vtt(http_client=http_client)
24 | self.ClosedCaptionsMedia = ClosedCaptions(http_client=http_client)
25 | self.VariantStream = VariantStreamService(http_client=http_client)
26 |
--------------------------------------------------------------------------------
/bitmovin/services/manifests/manifest_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.bitmovin_object import BitmovinObject
2 | from .dash_manifest_service import DASH
3 | from .hls_manifest_service import HLS
4 | from .smooth_manifest_service import Smooth
5 |
6 |
7 | class ManifestService(BitmovinObject):
8 | def __init__(self, http_client):
9 | super().__init__()
10 | self.http_client = http_client
11 | self.DASH = DASH(http_client=self.http_client)
12 | self.HLS = HLS(http_client=self.http_client)
13 | self.Smooth = Smooth(http_client=self.http_client)
14 |
--------------------------------------------------------------------------------
/bitmovin/services/manifests/media_custom_tag_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.services.manifests.generic_custom_tag_service import GenericCustomTagService
2 |
3 |
4 | class MediaCustomTag(GenericCustomTagService):
5 | custom_tag_type = 'media'
6 |
7 | def __init__(self, http_client):
8 | super().__init__(http_client=http_client, custom_tag_type=self.custom_tag_type)
9 |
10 | def create(self, object_, manifest_id, media_id):
11 | self.relative_url = self._get_endpoint_url(manifest_id=manifest_id, object_id=media_id)
12 | return super().create(object_)
13 |
14 | def delete(self, manifest_id, media_id, custom_tag_id):
15 | self.relative_url = self._get_endpoint_url(manifest_id=manifest_id, object_id=media_id)
16 | return super().delete(id_=custom_tag_id)
17 |
18 | def retrieve(self, manifest_id, media_id, custom_tag_id):
19 | self.relative_url = self._get_endpoint_url(manifest_id=manifest_id, object_id=media_id)
20 | return super().retrieve(id_=custom_tag_id)
21 |
22 | def list(self, manifest_id, media_id, offset=None, limit=None):
23 | self.relative_url = self._get_endpoint_url(manifest_id=manifest_id, object_id=media_id)
24 | return super().list(offset, limit)
25 |
--------------------------------------------------------------------------------
/bitmovin/services/manifests/smooth_manifest_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources import SmoothManifest
2 | from bitmovin.services.manifests.generic_manifest_service import GenericManifestService
3 | from .manifest_control_service import ManifestControlService
4 | from .smooth_representation_service import MP4RepresentationService
5 | from .smooth_content_protection_service import SmoothContentProtectionService
6 |
7 |
8 | class Smooth(GenericManifestService, ManifestControlService):
9 | manifest_type = 'smooth'
10 |
11 | def __init__(self, http_client):
12 | super().__init__(http_client=http_client, manifest_type=self.manifest_type, resource_class=SmoothManifest)
13 |
14 | self.MP4Representation = MP4RepresentationService(http_client=http_client)
15 | self.ContentProtection = SmoothContentProtectionService(http_client=http_client)
16 |
--------------------------------------------------------------------------------
/bitmovin/services/manifests/stream_custom_tag_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.services.manifests.generic_custom_tag_service import GenericCustomTagService
2 |
3 |
4 | class StreamCustomTag(GenericCustomTagService):
5 | custom_tag_type = 'streams'
6 |
7 | def __init__(self, http_client):
8 | super().__init__(http_client=http_client, custom_tag_type=self.custom_tag_type)
9 |
10 | def create(self, object_, manifest_id, stream_id):
11 | self.relative_url = self._get_endpoint_url(manifest_id=manifest_id, object_id=stream_id)
12 | return super().create(object_)
13 |
14 | def delete(self, manifest_id, stream_id, custom_tag_id):
15 | self.relative_url = self._get_endpoint_url(manifest_id=manifest_id, object_id=stream_id)
16 | return super().delete(id_=custom_tag_id)
17 |
18 | def retrieve(self, manifest_id, stream_id, custom_tag_id):
19 | self.relative_url = self._get_endpoint_url(manifest_id=manifest_id, object_id=stream_id)
20 | return super().retrieve(id_=custom_tag_id)
21 |
22 | def list(self, manifest_id, stream_id, offset=None, limit=None):
23 | self.relative_url = self._get_endpoint_url(manifest_id=manifest_id, object_id=stream_id)
24 | return super().list(offset, limit)
25 |
--------------------------------------------------------------------------------
/bitmovin/services/manifests/subtitles_media_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources import SubtitlesMedia
2 | from .generic_media_service import GenericMediaService
3 |
4 |
5 | class Subtitles(GenericMediaService):
6 |
7 | def __init__(self, http_client):
8 | super().__init__(http_client=http_client,
9 | media_type_url='subtitles',
10 | resource_class=SubtitlesMedia)
11 |
--------------------------------------------------------------------------------
/bitmovin/services/manifests/video_media_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources import VideoMedia
2 | from .generic_media_service import GenericMediaService
3 |
4 |
5 | class Video(GenericMediaService):
6 |
7 | def __init__(self, http_client):
8 | super().__init__(http_client=http_client,
9 | media_type_url='video',
10 | resource_class=VideoMedia)
11 |
--------------------------------------------------------------------------------
/bitmovin/services/manifests/vtt_media_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources import VttMedia
2 | from .generic_media_service import GenericMediaService
3 |
4 |
5 | class Vtt(GenericMediaService):
6 |
7 | def __init__(self, http_client):
8 | super().__init__(http_client=http_client,
9 | media_type_url='vtt',
10 | resource_class=VttMedia)
11 |
--------------------------------------------------------------------------------
/bitmovin/services/outputs/__init__.py:
--------------------------------------------------------------------------------
1 | from .output_service import OutputService
2 |
--------------------------------------------------------------------------------
/bitmovin/services/outputs/akamai_netstorage_output_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import AkamaiNetStorageOutput
2 | from ..rest_service import RestService
3 |
4 |
5 | class AkamaiNetStorage(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/outputs/akamai-netstorage'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=AkamaiNetStorageOutput)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/outputs/azure_output_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import AzureOutput
2 | from ..rest_service import RestService
3 |
4 |
5 | class Azure(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/outputs/azure'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=AzureOutput)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/outputs/ftp_output_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import FTPOutput
2 | from ..rest_service import RestService
3 |
4 |
5 | class FTP(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/outputs/ftp'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=FTPOutput)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/outputs/gcs_output_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import GCSOutput
2 | from ..rest_service import RestService
3 |
4 |
5 | class GCS(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/outputs/gcs'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=GCSOutput)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/outputs/generic_s3_output_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import GenericS3Output
2 | from ..rest_service import RestService
3 |
4 |
5 | class GenericS3(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/outputs/generic-s3'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=GenericS3Output)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/outputs/local_output_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import LocalOutput
2 | from ..rest_service import RestService
3 |
4 |
5 | class Local(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/outputs/local'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=LocalOutput)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/outputs/output_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.bitmovin_object import BitmovinObject
2 | from .s3_output_service import S3
3 | from .gcs_output_service import GCS
4 | from .akamai_netstorage_output_service import AkamaiNetStorage
5 | from .azure_output_service import Azure
6 | from .ftp_output_service import FTP
7 | from .sftp_output_service import SFTP
8 | from .generic_s3_output_service import GenericS3
9 | from .local_output_service import Local
10 | from .s3_role_based_output_service import S3RoleBased
11 |
12 |
13 | class OutputService(BitmovinObject):
14 | def __init__(self, http_client):
15 | super().__init__()
16 | self.http_client = http_client
17 | self.S3 = S3(http_client=self.http_client)
18 | self.GCS = GCS(http_client=self.http_client)
19 | self.AkamaiNetStorage = AkamaiNetStorage(http_client=self.http_client)
20 | self.Azure = Azure(http_client=self.http_client)
21 | self.FTP = FTP(http_client=self.http_client)
22 | self.SFTP = SFTP(http_client=self.http_client)
23 | self.GenericS3 = GenericS3(http_client=self.http_client)
24 | self.Local = Local(http_client=self.http_client)
25 | self.S3RoleBased = S3RoleBased(http_client=self.http_client)
26 |
--------------------------------------------------------------------------------
/bitmovin/services/outputs/s3_output_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import S3Output
2 | from ..rest_service import RestService
3 |
4 |
5 | class S3(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/outputs/s3'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=S3Output)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/outputs/s3_role_based_output_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import S3RoleBasedOutput
2 | from ..rest_service import RestService
3 |
4 |
5 | class S3RoleBased(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/outputs/s3-role-based'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=S3RoleBasedOutput)
10 |
--------------------------------------------------------------------------------
/bitmovin/services/outputs/sftp_output_service.py:
--------------------------------------------------------------------------------
1 | from bitmovin.resources.models import SFTPOutput
2 | from ..rest_service import RestService
3 |
4 |
5 | class SFTP(RestService):
6 | BASE_ENDPOINT_URL = 'encoding/outputs/sftp'
7 |
8 | def __init__(self, http_client):
9 | super().__init__(http_client=http_client, relative_url=self.BASE_ENDPOINT_URL, class_=SFTPOutput)
10 |
--------------------------------------------------------------------------------
/bitmovin/utils/__init__.py:
--------------------------------------------------------------------------------
1 | from .serialization import BitmovinJSONEncoder, Serializable
2 | from .timeout_utils import TimeoutUtils
3 |
--------------------------------------------------------------------------------
/bitmovin/utils/serialization/__init__.py:
--------------------------------------------------------------------------------
1 | from .bitmovin_json_encoder import BitmovinJSONEncoder
2 | from .serializable import Serializable
3 |
--------------------------------------------------------------------------------
/bitmovin/utils/serialization/bitmovin_json_encoder.py:
--------------------------------------------------------------------------------
1 | import copy
2 | from json import JSONEncoder
3 | from bitmovin.resources import Resource
4 | from .serializable import Serializable
5 |
6 |
7 | class BitmovinJSONEncoder(JSONEncoder):
8 |
9 | def default(self, o):
10 | if isinstance(o, Serializable):
11 | serialized_object = o.serialize()
12 | return self._remove_none_values(serialized_object)
13 | if isinstance(o, Resource):
14 | copied = copy.deepcopy(o.__dict__)
15 | copied = self._remove_none_values(copied)
16 | return copied
17 | else:
18 | copied = copy.deepcopy(o.__dict__)
19 | return copied
20 |
21 | @classmethod
22 | def _remove_none_values(cls, o):
23 | empty_keys = []
24 | for key in o.keys():
25 | if o.get(key) is None:
26 | empty_keys.append(key)
27 | for empty_key in empty_keys:
28 | o.pop(empty_key)
29 | return o
30 |
--------------------------------------------------------------------------------
/bitmovin/utils/serialization/serializable.py:
--------------------------------------------------------------------------------
1 | import abc
2 |
3 |
4 | class Serializable:
5 | __metaclass__ = abc.ABCMeta
6 |
7 | def __init__(self):
8 | super().__init__()
9 |
10 | def serialize(self):
11 | serialized = {}
12 | serialized.update(self.__dict__)
13 | underscored_keys = []
14 |
15 | for key in serialized.keys():
16 | if key.startswith('_'):
17 | underscored_keys.append(key)
18 |
19 | for underscored_key in underscored_keys:
20 | serialized.pop(underscored_key)
21 |
22 | return serialized
23 |
--------------------------------------------------------------------------------
/bitmovin/utils/timeout_utils.py:
--------------------------------------------------------------------------------
1 | import time
2 | from bitmovin.errors import TimeoutError
3 |
4 |
5 | class TimeoutUtils:
6 |
7 | @classmethod
8 | def raise_error_if_timeout_reached(cls, start_time_in_seconds, timeout_in_seconds):
9 | if start_time_in_seconds is None:
10 | raise TimeoutError('Invalid usage: start_time_in_seconds needs to be a number')
11 |
12 | if timeout_in_seconds is None:
13 | raise TimeoutError('Invalid usage: timeout_in_seconds needs to be a number')
14 |
15 | if timeout_in_seconds == -1:
16 | return
17 |
18 | now = time.time()
19 | max_time = start_time_in_seconds + timeout_in_seconds
20 | timeout_reached = now > max_time
21 |
22 | if timeout_reached:
23 | raise TimeoutError('Timeout of {} seconds reached.'.format(timeout_in_seconds))
24 |
--------------------------------------------------------------------------------
/examples/encoding/.gitignore:
--------------------------------------------------------------------------------
1 | /ignored/
2 | *.DS_Store
3 |
--------------------------------------------------------------------------------
/examples/encoding/get_encodings_by_status.py:
--------------------------------------------------------------------------------
1 | from bitmovin import Bitmovin
2 | from bitmovin.resources.enums.encoding_status_values import EncodingStatusValues
3 |
4 | API_KEY = ''
5 |
6 | STATUS = EncodingStatusValues.RUNNING
7 | #STATUS = EncodingStatusValues.QUEUED
8 | #STATUS = EncodingStatusValues.ERROR
9 | #STATUS = EncodingStatusValues.FINISHED
10 |
11 | bitmovin = Bitmovin(api_key=API_KEY)
12 | encodings = bitmovin.encodings.Encoding.filter_by_status(STATUS).resource
13 | print("Found encoding IDs")
14 | for encoding in encodings:
15 | print(encoding.id)
16 |
--------------------------------------------------------------------------------
/examples/encoding/get_status_of_encoding.py:
--------------------------------------------------------------------------------
1 | import json
2 | from bitmovin import Bitmovin
3 |
4 | API_KEY = ''
5 | ENCODING_ID = ''
6 |
7 | bitmovin = Bitmovin(api_key=API_KEY)
8 | status = bitmovin.encodings.Encoding.status(encoding_id=ENCODING_ID).resource
9 | print("Status: {}".format(status.status))
10 | print("Created At: {}".format(status.created_at))
11 | print("Queued At: {}".format(status.queued_at))
12 | print("Finished At: {}".format(status.finished_at))
13 | print("Messages: {}".format(json.dumps(status.messages, indent=4)))
14 | print("Sub Tasks: {}".format(json.dumps(status.subtasks, indent=4)))
15 |
--------------------------------------------------------------------------------
/examples/encoding/live/stop_live_encoding.py:
--------------------------------------------------------------------------------
1 | from bitmovin import Bitmovin
2 |
3 | API_KEY = ''
4 | LIVE_ENCODING_ID = ''
5 |
6 |
7 | def main():
8 | bitmovin = Bitmovin(api_key=API_KEY)
9 | bitmovin.encodings.Encoding.stop_live(encoding_id=LIVE_ENCODING_ID)
10 | print("Successfully sent stop live stream request for encoding with ID '{}'".format(LIVE_ENCODING_ID))
11 | bitmovin.encodings.Encoding.wait_until_finished(encoding_id=LIVE_ENCODING_ID)
12 |
13 |
14 | if __name__ == '__main__':
15 | main()
16 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | requests==2.11.1
2 | typing==3.5.2.2
3 | nose==1.3.7
4 | tabulate==0.7.7
5 |
--------------------------------------------------------------------------------
/setup.py:
--------------------------------------------------------------------------------
1 | import sys
2 | from setuptools import setup, find_packages
3 |
4 | __name__ = 'bitmovin-python'
5 | __version__ = '1.60.1'
6 | __description__ = 'Python wrapper for the bitmovin API'
7 | __author__ = 'Dominic Miglar '
8 | __email__ = 'dominic.miglar@bitmovin.com'
9 | __license__ = 'Unlicense'
10 |
11 |
12 | if sys.version_info.major < 3 or sys.version_info.minor < 4:
13 | sys.exit('Sorry, Python versions older than 3.4 are not supported.')
14 |
15 |
16 | setup(name=__name__,
17 | version=__version__,
18 | description=__description__,
19 | author=__author__,
20 | author_email=__email__,
21 | license=__license__,
22 | packages=find_packages(exclude=['tests.*', 'tests']),
23 | install_requires=['requests', 'typing', 'tabulate'],
24 | include_package_data=True,
25 | url='https://www.github.com/bitmovin/bitmovin-python/',
26 | zip_safe=False)
27 |
--------------------------------------------------------------------------------
/tests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bitmovin/bitmovin-python/d183718d640117dd75141da261901dc2f60433b0/tests/__init__.py
--------------------------------------------------------------------------------
/tests/bitmovin/__init__.py:
--------------------------------------------------------------------------------
1 | from .bitmovin_test_case import BitmovinTestCase
2 |
--------------------------------------------------------------------------------
/tests/bitmovin/bitmovin_object_tests.py:
--------------------------------------------------------------------------------
1 | import unittest
2 |
3 | from bitmovin.bitmovin_object import BitmovinObject
4 |
5 |
6 | class BitmovinObjectTests(unittest.TestCase):
7 |
8 | @classmethod
9 | def setUpClass(cls):
10 | super().setUpClass()
11 |
12 | @classmethod
13 | def tearDownClass(cls):
14 | super().tearDownClass()
15 |
16 | def setUp(self):
17 | super().setUp()
18 |
19 | def tearDown(self):
20 | super().tearDown()
21 |
22 | def test_bitmovin_object(self):
23 | bitmovin_object = BitmovinObject()
24 | self.assertTrue(isinstance(bitmovin_object, BitmovinObject))
25 |
26 | if __name__ == '__main__':
27 | unittest.main()
28 |
--------------------------------------------------------------------------------
/tests/bitmovin/bitmovin_test_case.py:
--------------------------------------------------------------------------------
1 | import unittest
2 | import logging
3 | import sys
4 | from tests import utils
5 |
6 |
7 | class BitmovinTestCase(unittest.TestCase):
8 | def __init__(self, *args, **kwargs):
9 | super().__init__(*args, **kwargs)
10 | self.utils = utils
11 | self.settings = self.utils.get_settings()
12 | if not self.settings or not isinstance(self.settings, dict):
13 | raise Exception('Unable to load settings')
14 | self.api_key = self.settings.get('apiKey')
15 | if not self.api_key or not isinstance(self.api_key, str):
16 | raise Exception('Unable to load apiKey from settings')
17 | self.prepare_logger()
18 |
19 | def prepare_logger(self):
20 | self.logger = logging.getLogger(self.__class__.__name__)
21 | self.logger.setLevel(logging.DEBUG)
22 | console_handler = logging.StreamHandler(sys.stdout)
23 | formatter = logging.Formatter('%(asctime)-15s %(name)-5s %(levelname)-8s %(message)s')
24 | console_handler.setFormatter(formatter)
25 | self.logger.addHandler(console_handler)
26 |
--------------------------------------------------------------------------------
/tests/bitmovin/bitmovin_tests.py:
--------------------------------------------------------------------------------
1 | import unittest
2 | from bitmovin import Bitmovin
3 | from tests.utils import get_settings
4 |
5 |
6 | class BitmovinTests(unittest.TestCase):
7 |
8 | @classmethod
9 | def setUpClass(cls):
10 | super().setUpClass()
11 |
12 | @classmethod
13 | def tearDownClass(cls):
14 | super().tearDownClass()
15 |
16 | def setUp(self):
17 | super().setUp()
18 | self.settings = get_settings()
19 | if not self.settings or not isinstance(self.settings, dict):
20 | raise Exception('Unable to load settings')
21 | self.api_key = self.settings.get('apiKey')
22 | if not self.api_key or not isinstance(self.api_key, str):
23 | raise Exception('Unable to load apiKey from settings')
24 |
25 | def tearDown(self):
26 | super().tearDown()
27 |
28 | def test_init(self):
29 | bitmovin = Bitmovin(self.api_key)
30 | self.assertIsNotNone(bitmovin)
31 | self.assertTrue(isinstance(bitmovin, Bitmovin))
32 |
33 | if __name__ == '__main__':
34 | unittest.main()
35 |
--------------------------------------------------------------------------------
/tests/bitmovin/services/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bitmovin/bitmovin-python/d183718d640117dd75141da261901dc2f60433b0/tests/bitmovin/services/__init__.py
--------------------------------------------------------------------------------
/tests/bitmovin/services/codecconfigurations/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bitmovin/bitmovin-python/d183718d640117dd75141da261901dc2f60433b0/tests/bitmovin/services/codecconfigurations/__init__.py
--------------------------------------------------------------------------------
/tests/bitmovin/services/encodings/__init__.py:
--------------------------------------------------------------------------------
1 | from .broadcast_ts_muxing_tests import BroadcastTsMuxingTests
2 |
--------------------------------------------------------------------------------
/tests/bitmovin/services/encodings/captions/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bitmovin/bitmovin-python/d183718d640117dd75141da261901dc2f60433b0/tests/bitmovin/services/encodings/captions/__init__.py
--------------------------------------------------------------------------------
/tests/bitmovin/services/encodings/drms/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bitmovin/bitmovin-python/d183718d640117dd75141da261901dc2f60433b0/tests/bitmovin/services/encodings/drms/__init__.py
--------------------------------------------------------------------------------
/tests/bitmovin/services/encodings/id3/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bitmovin/bitmovin-python/d183718d640117dd75141da261901dc2f60433b0/tests/bitmovin/services/encodings/id3/__init__.py
--------------------------------------------------------------------------------
/tests/bitmovin/services/filters/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bitmovin/bitmovin-python/d183718d640117dd75141da261901dc2f60433b0/tests/bitmovin/services/filters/__init__.py
--------------------------------------------------------------------------------
/tests/bitmovin/services/infrastructures/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bitmovin/bitmovin-python/d183718d640117dd75141da261901dc2f60433b0/tests/bitmovin/services/infrastructures/__init__.py
--------------------------------------------------------------------------------
/tests/bitmovin/services/inputs/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bitmovin/bitmovin-python/d183718d640117dd75141da261901dc2f60433b0/tests/bitmovin/services/inputs/__init__.py
--------------------------------------------------------------------------------
/tests/bitmovin/services/manifests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bitmovin/bitmovin-python/d183718d640117dd75141da261901dc2f60433b0/tests/bitmovin/services/manifests/__init__.py
--------------------------------------------------------------------------------
/tests/bitmovin/services/manifests/dash/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bitmovin/bitmovin-python/d183718d640117dd75141da261901dc2f60433b0/tests/bitmovin/services/manifests/dash/__init__.py
--------------------------------------------------------------------------------
/tests/bitmovin/services/manifests/hls/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bitmovin/bitmovin-python/d183718d640117dd75141da261901dc2f60433b0/tests/bitmovin/services/manifests/hls/__init__.py
--------------------------------------------------------------------------------
/tests/bitmovin/services/manifests/smooth/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bitmovin/bitmovin-python/d183718d640117dd75141da261901dc2f60433b0/tests/bitmovin/services/manifests/smooth/__init__.py
--------------------------------------------------------------------------------
/tests/bitmovin/services/outputs/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bitmovin/bitmovin-python/d183718d640117dd75141da261901dc2f60433b0/tests/bitmovin/services/outputs/__init__.py
--------------------------------------------------------------------------------