def load_source(
        source: Union[str, bytes],
        verbose: Optional[bool] = False,
        only_ffmpeg: bool = False,
        return_dict: bool = False
) -> Union[bytes, dict]:
    """
    Return content downloaded by YT-DLP if ``source`` is a URL else return ``source``.
    """
    if not only_ffmpeg and isinstance(source, str) and '://' in source:
        if is_ytdlp_available():
            if return_dict:
                stderr = subprocess.PIPE
                verbosity = ' --no-simulate --print title,duration,is_live --no-warnings'
            else:
                verbosity = ' -q' if verbose is None else (' --progress' if verbose else ' --progress -q')
                stderr = None
            p = subprocess.Popen(
                f'yt-dlp "{source}" -f ba/w -I 1{verbosity} -o -',
                shell=True,
                stderr=stderr,
                stdout=subprocess.PIPE,
                bufsize=0
            )
            if return_dict:
                title = p.stderr.readline().decode('utf-8', errors='ignore').strip('\n') or None
                duration = p.stderr.readline().decode('utf-8', errors='ignore').strip('\n')
                is_live = p.stderr.readline().decode('utf-8', errors='ignore').strip('\n')
                try:
                    duration = int(duration)
                except ValueError:
                    duration = None
                is_live = (True if is_live == 'True' else False) if is_live in ('True', 'False') else None
                if verbose is not None:
                    print(f'Media Info (YT-DLP):\n'
                          f'-Title: "{title or "N/A"}"\n'
                          f'-Duration: {duration}s\n'
                          f'-Live: {is_live}')
                return dict(popen=p, title=title, duration=duration, is_live=is_live)
            return p.communicate()[0]
        else:
            warnings.warn('URL detected but yt-dlp not available. '
                          'To handle a greater variety of URLs (i.e. non-direct links), '
                          'install yt-dlp, \'pip install yt-dlp\' (repo: https://github.com/yt-dlp/yt-dlp).')
    return source

    Return content downloaded by YT-DLP if ``source`` is a URL else return ``source``.
    
stable_whisper/audio/utils.py