Get the url for the video media that we can send to Clarify

def _src_media_url_for_video(self, video):
        '''Get the url for the video media that we can send to Clarify'''
        src_url = None
        best_height = 0
        best_source = None

        # TODO: This assumes we have ingested videos. For remote videos, check if the remote flag is True
        # and if so, use the src url from the Asset endpoint.
        video_sources = self.bc_client.get_video_sources(video['id'])
        # Look for codec H264 with good resolution
        for source in video_sources:
            height = source.get('height', 0)
            codec = source.get('codec')
            if source.get('src') and codec and codec.upper() == 'H264' and height <= 1080 and height > best_height:
                best_source = source

        if best_source is not None:
            src_url = best_source['src']
        return src_url