def process_media(self) -> list[Tuple[str, Tensor]]:
        """
        Process the media file by splitting it into chunks and downloading each chunk, and apply the languagebind
        preprocessor to each chunk.

        Returns:
            list[Tuple[str, Tensor]]: A list of tuples, where each tuple contains the chunk content and the

        Raise:
            MediaDownloadError: If there is an error downloading or processing the media file.
        """
        processed_chunks: list[Tuple[str, Tensor]] = []
        chunk_duration = self.split_length
        overlap_duration = self.split_overlap

        with tempfile.TemporaryDirectory() as temp_dir:
            # Calculate total number of chunks
            total_chunks = math.ceil((self.duration - overlap_duration) / (chunk_duration - overlap_duration))

            for i in range(total_chunks):
                # For the last chunk, ensure it captures the end of the media
                if i == total_chunks - 1:
                    chunk_start = max(self.duration - chunk_duration, 0)
                    chunk_end = self.duration
                else:
                    chunk_start = i * (chunk_duration - overlap_duration)
                    chunk_end = min([chunk_start + chunk_duration, self.duration])

                output_file = self._get_output_file_path(temp_dir, chunk_start)

                try:
                    if self.modality == Modality.VIDEO:
                        output_file = self.fetch_video_chunk(
                            start_time=chunk_start,
                            duration=chunk_end - chunk_start,
                            output_file=output_file,
                        )
                    elif self.modality == Modality.AUDIO:  # AUDIO
                        output_file = self.fetch_audio_chunk(
                            start_time=chunk_start,
                            duration=chunk_end - chunk_start,
                            output_file=output_file,
                        )
                    else:
                        raise ValueError(f"Unsupported modality: {self.modality}")
                except (subprocess.CalledProcessError, MediaDownloadError) as e:
                    logger.error(f"Error processing chunk starting at {chunk_start}: {e}")
                    continue  # Skip this chunk and continue with the next one

                # We expect no error in the preprocessing step
                processed_chunk_tensor: Tensor = self.preprocessors.preprocess(
                    [output_file], modality=self.modality)[0]

                processed_chunks.append(
                    (f"[{chunk_start:.1f}, {chunk_end:.1f}]", processed_chunk_tensor)
                )
        if not processed_chunks:
            raise MediaDownloadError(
                f"Error processing media file {self.url}: No chunks were successfully processed"
            )
        return processed_chunks

        Process the media file by splitting it into chunks and downloading each chunk, and apply the languagebind
        preprocessor to each chunk.

        Returns:
            list[Tuple[str, Tensor]]: A list of tuples, where each tuple contains the chunk content and the

        Raise:
            MediaDownloadError: If there is an error downloading or processing the media file.
        
src/marqo/inference/media_download_and_preprocess/streaming_media_processor.py