# Path: mvc/converter.py
# NON_WORD_CHARS = re.compile(r"[^a-zA-Z0-9]+")
#     DURATION_RE = re.compile(r'\W*Duration: (\d\d):(\d\d):(\d\d)\.(\d\d)'
#                              '(, start:.*)?(, bitrate:.*)?')
#     PROGRESS_RE = re.compile(r'(?:frame=.* fps=.* q=.* )?size=.* time=(.*) '
#                              'bitrate=(.*)')
#     LAST_PROGRESS_RE = re.compile(r'frame=.* fps=.* q=.* Lsize=.* time=(.*) '
#                                   'bitrate=(.*)')
# class ConverterInfo(object):
# class FFmpegConverterInfo(ConverterInfo):
# class FFmpegConverterInfo1080p(FFmpegConverterInfo):
# class FFmpegConverterInfo720p(FFmpegConverterInfo):
# class FFmpegConverterInfo480p(FFmpegConverterInfo):
# class ConverterManager(object):
#     def __init__(self, name, width=None, height=None, dont_upsize=True):
#     def get_executable(self):
#     def get_arguments(self, video, output):
#     def get_output_filename(self, video):
#     def get_output_size_guess(self, video):
#     def finalize(self, temp_output, output):
#     def get_target_size(self, video):
#     def process_status_line(self, line):
#     def get_executable(self):
#     def get_arguments(self, video, output):
#     def convert_output_path(self, output_path):
#     def get_extra_arguments(self, video, output):
#     def get_parameters(self, video):
#     def _check_for_errors(line):
#     def process_status_line(klass, video, line):
#     def __init__(self, name):
#     def __init__(self, name):
#     def __init__(self, name):
#     def __init__(self):
#     def add_converter(self, converter):
#     def startup(self):
#     def brand_to_converters(self, brand):
#     def converter_to_brand(self, converter):
#     def load_simple_converters(self):
#     def load_converters(self, converters):
#     def list_converters(self):
#     def get_by_id(self, id_):


import logging
import re
from mvc import converter


class WebM_HD(converter.FFmpegConverterInfo720p):
    media_type = 'format'
    extension = 'webm'
    parameters = ('-f webm -vcodec libvpx -g 120 -lag-in-frames 16 '
                  '-deadline good -cpu-used 0 -vprofile 0 -qmax 51 -qmin 11 '
                  '-slices 4 -b:v 2M -acodec libvorbis -ab 112k '
                  '-ar 44100')

class WebM_SD(converter.FFmpegConverterInfo480p):
    media_type = 'format'
    extension = 'webm'
    parameters = ('-f webm -vcodec libvpx -g 120 -lag-in-frames 16 '
                  '-deadline good -cpu-used 0 -vprofile 0 -qmax 53 -qmin 0 '
                  '-b:v 768k -acodec libvorbis -ab 112k '
                  '-ar 44100')

class MP4(converter.FFmpegConverterInfo):
    media_type = 'format'
    extension = 'mp4'
    parameters = ('-acodec aac -ab 96k -vcodec libx264 -preset slow '
                  '-f mp4 -crf 22')

class MP3(converter.FFmpegConverterInfo):
    media_type = 'format'
    extension = 'mp3'
    parameters = '-f mp3 -ac 2'
    audio_only = True


# Path: mvc/converter.py
# NON_WORD_CHARS = re.compile(r"[^a-zA-Z0-9]+")
#     DURATION_RE = re.compile(r'\W*Duration: (\d\d):(\d\d):(\d\d)\.(\d\d)'
#                              '(, start:.*)?(, bitrate:.*)?')
#     PROGRESS_RE = re.compile(r'(?:frame=.* fps=.* q=.* )?size=.* time=(.*) '
#                              'bitrate=(.*)')
#     LAST_PROGRESS_RE = re.compile(r'frame=.* fps=.* q=.* Lsize=.* time=(.*) '
#                                   'bitrate=(.*)')
# class ConverterInfo(object):
# class FFmpegConverterInfo(ConverterInfo):
# class FFmpegConverterInfo1080p(FFmpegConverterInfo):
# class FFmpegConverterInfo720p(FFmpegConverterInfo):
# class FFmpegConverterInfo480p(FFmpegConverterInfo):
# class ConverterManager(object):
#     def __init__(self, name, width=None, height=None, dont_upsize=True):
#     def get_executable(self):
#     def get_arguments(self, video, output):
#     def get_output_filename(self, video):
#     def get_output_size_guess(self, video):
#     def finalize(self, temp_output, output):
#     def get_target_size(self, video):
#     def process_status_line(self, line):
#     def get_executable(self):
#     def get_arguments(self, video, output):
#     def convert_output_path(self, output_path):
#     def get_extra_arguments(self, video, output):
#     def get_parameters(self, video):
#     def _check_for_errors(line):
#     def process_status_line(klass, video, line):
#     def __init__(self, name):
#     def __init__(self, name):
#     def __init__(self, name):
#     def __init__(self):
#     def add_converter(self, converter):
#     def startup(self):
#     def brand_to_converters(self, brand):
#     def converter_to_brand(self, converter):
#     def load_simple_converters(self):
#     def load_converters(self, converters):
#     def list_converters(self):
#     def get_by_id(self, id_):


# Path: mvc/basicconverters.py
import logging
import re
from mvc import converter



class WebM_HD(converter.FFmpegConverterInfo720p):
    media_type = 'format'
    extension = 'webm'
    parameters = ('-f webm -vcodec libvpx -g 120 -lag-in-frames 16 '
                  '-deadline good -cpu-used 0 -vprofile 0 -qmax 51 -qmin 11 '
                  '-slices 4 -b:v 2M -acodec libvorbis -ab 112k '
                  '-ar 44100')

class WebM_SD(converter.FFmpegConverterInfo480p):
    media_type = 'format'
    extension = 'webm'
    parameters = ('-f webm -vcodec libvpx -g 120 -lag-in-frames 16 '
                  '-deadline good -cpu-used 0 -vprofile 0 -qmax 53 -qmin 0 '
                  '-b:v 768k -acodec libvorbis -ab 112k '
                  '-ar 44100')

class MP4(converter.FFmpegConverterInfo):
    media_type = 'format'
    extension = 'mp4'
    parameters = ('-acodec aac -ab 96k -vcodec libx264 -preset slow '
                  '-f mp4 -crf 22')

class MP3(converter.FFmpegConverterInfo):
    media_type = 'format'
    extension = 'mp3'
    parameters = '-f mp3 -ac 2'
    audio_only = True


class OggVorbis(converter.FFmpegConverterInfo):