def _run_ffmpeg_command(
            self, ffmpeg_command: List[str], timeout: float, base_error_message: str
    ) -> None:
        """Call ffmpeg with the given command and timeout.

        Args:
            ffmpeg_command: The ffmpeg command to run
            timeout: The maximum time to wait for the command to complete
            base_error_message: The base error message to use in case of an error
        Raises:
            MediaDownloadError: If there is an error downloading or the operation times out.
            InternalError: If there is an expected error running the ffmpeg command, such as OSError when there is
                no ffmpeg installed, or ValueError when the command is invalid.
        """
        try:
            _ = subprocess.run(
                ffmpeg_command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True,
                text=True, timeout=timeout
            )
        except subprocess.CalledProcessError as e:
            raise MediaDownloadError(f"{base_error_message} Original error: {e.stderr}") from e
        except subprocess.TimeoutExpired as e:
            raise MediaDownloadError(f"{base_error_message} the download operation timed out after {timeout} seconds") \
                from e
        except (OSError, ValueError) as e:
            raise InternalError(f"Error running ffmpeg command: {e}") from e
Call ffmpeg with the given command and timeout.

        Args:
            ffmpeg_command: The ffmpeg command to run
            timeout: The maximum time to wait for the command to complete
            base_error_message: The base error message to use in case of an error
        Raises:
            MediaDownloadError: If there is an error downloading or the operation times out.
            InternalError: If there is an expected error running the ffmpeg command, such as OSError when there is
                no ffmpeg installed, or ValueError when the command is invalid.
        
src/marqo/inference/media_download_and_preprocess/streaming_media_processor.py