@classmethod
def _parse_videoname(cls, videoname):
    """ parse videoname and return video info dict
        video info contains:
        - title, the name of video
        - sub_title, the sub_title of video
        - resolution,
        - source,
        -
        - season, defaults to 0
        - episode, defaults to 0
        """
    info = {'title': '', 'season': 0, 'episode': 0, 'resolution': '',
        'source': '', 'audio_encoding': '', 'video_encoding': ''}
    mapping = {'resolution': cls.RE_RESOLUTION, 'source': cls.RE_SOURCE,
        'audio_encoding': cls.RE_AUDIO_ENC, 'video_encoding': cls.RE_VIDEO_ENC}
    index = len(videoname)
    m = cls.RE_SEASON_EPISODE.search(videoname)
    if m:
        info['season'] = int(m.group('season'))
        info['episode'] = int(m.group('episode'))
        index, _ = m.span()
        info['title'] = videoname[0:index].strip('.')
    else:
        m = cls.RE_SEASON.search(videoname)
        if m:
            info['season'] = int(m.group('season'))
            index, _ = m.span()
            info['title'] = videoname[0:index].strip('.')
    for k, r in mapping.items():
        m = r.search(videoname)
        if m:
            info[k] = m.group(k)
            i, e = m.span()
            if info['title'] == '' or i < index:
                index = i
                info['title'] = videoname[0:index].strip('.')
    if info['title'] == '':
        i = videoname.find('.')
        info['title'] = videoname[:i] if i > 0 else videoname
    return info
