def __init__(
            self,
            url: str,
            preprocessors: LanguagebindPreprocessor,
            preprocessing_config: Union[AudioPreprocessingConfig, VideoPreprocessingConfig],
            enable_video_gpu_acceleration: bool = False
    ):
        """
        Instantiate the StreamingMediaProcessor class.

        Args:
            url: The URL of the media file to be processed.
            preprocessors: The LanguagebindPreprocessor instance to be used for preprocessing the media.
            preprocessing_config: The configuration for preprocessing the media, which includes the modality (audio or video),
            enable_video_gpu_acceleration: Whether to enable GPU acceleration for video processing.
        Raises:
            MediaExceedsMaxSizeError: If the media file size exceeds the maximum allowed size.
            MediaDownloadError: If there is an error downloading the media file.
        """
        self.url = url
        self.modality = preprocessing_config.modality
        
        self.media_download_header = self._convert_headers_to_cli_format(preprocessing_config.download_header)
        self.total_size, self.duration, self.probed_modality = self._fetch_file_metadata()

        if self.modality != self.probed_modality:
            raise MediaMismatchError(
                f"Error processing media file {self.url}. The provided modality {self.modality} does not match the "
                f"detected modality {self.probed_modality}. Please check your media file and try again. If you are using "
                f"a structured index, check if your media file matches the field type"
            )

        if self.total_size > preprocessing_config.max_media_size_bytes:
            raise MediaExceedsMaxSizeError(
                f"File size ({self.total_size / 1024 / 1024:.2f} MB) "
                f"exceeds the maximum allowed size of {preprocessing_config.max_media_size_bytes / 1024 / 1024:.2f} MB"
            )

        if preprocessing_config.should_chunk:
            self.split_length = preprocessing_config.chunk_config.split_length
            self.split_overlap = preprocessing_config.chunk_config.split_overlap
        else:
            self.split_length = self.duration
            self.split_overlap = 0
        
        self.preprocessors = preprocessors
        
        self.enable_video_gpu_acceleration = enable_video_gpu_acceleration

        Instantiate the StreamingMediaProcessor class.

        Args:
            url: The URL of the media file to be processed.
            preprocessors: The LanguagebindPreprocessor instance to be used for preprocessing the media.
            preprocessing_config: The configuration for preprocessing the media, which includes the modality (audio or video),
            enable_video_gpu_acceleration: Whether to enable GPU acceleration for video processing.
        Raises:
            MediaExceedsMaxSizeError: If the media file size exceeds the maximum allowed size.
            MediaDownloadError: If there is an error downloading the media file.
        
src/marqo/inference/media_download_and_preprocess/streaming_media_processor.py