<s> """<STR_LIT>""" <EOL> from itertools import chain <EOL> from . parameters import ParameterContainer <EOL> NO_AUDIO = ( '<STR_LIT>' , ) <EOL> NO_VIDEO = ( '<STR_LIT>' , ) <EOL> class Codec ( ParameterContainer ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , name , * args ) : <EOL> self . name = name <EOL> ParameterContainer . __init__ ( self , * args ) <EOL> class VideoCodec ( Codec ) : <EOL> """<STR_LIT>""" <EOL> def bitrate ( self , bitrate ) : <EOL> self . add_formatparam ( '<STR_LIT>' , str ( bitrate ) ) <EOL> return self <EOL> def frames ( self , number ) : <EOL> self . add_formatparam ( '<STR_LIT>' , str ( number ) ) <EOL> return self <EOL> def fps ( self , fps ) : <EOL> self . add_formatparam ( '<STR_LIT>' , str ( fps ) ) <EOL> return self <EOL> def size ( self , x , y ) : <EOL> filter = "<STR_LIT>" . format ( x , y ) <EOL> self . add_formatparam ( '<STR_LIT>' , filter ) <EOL> return self <EOL> def aspect ( self , x , y ) : <EOL> self . add_formatparam ( '<STR_LIT>' , x , y ) <EOL> return self <EOL> def bitrate_tolerance ( self , tolerance ) : <EOL> self . add_formatparam ( '<STR_LIT>' , str ( tolerance ) ) <EOL> return self <EOL> def max_bitrate ( self , rate ) : <EOL> self . add_formatparam ( '<STR_LIT>' , str ( rate ) ) <EOL> return self <EOL> def min_bitrate ( self , rate ) : <EOL> self . add_formatparam ( '<STR_LIT>' , str ( rate ) ) <EOL> return self <EOL> def buffer_size ( self , size ) : <EOL> self . add_formatparam ( '<STR_LIT>' , str ( size ) ) <EOL> return self <EOL> def pass_number ( self , number ) : <EOL> self . add_formatparam ( '<STR_LIT>' , str ( number ) ) <EOL> return self <EOL> def language ( self , lang ) : <EOL> self . add_formatparam ( '<STR_LIT>' , str ( lang ) ) <EOL> return self <EOL> def same_quality ( self ) : <EOL> self . add_formatparam ( '<STR_LIT>' , None ) <EOL> return self <EOL> def preset ( self , preset ) : <EOL> self . add_formatparam ( '<STR_LIT>' , str ( preset ) ) <EOL> return self <EOL> def __iter__ ( self ) : <EOL> return chain ( [ '<STR_LIT>' , self . name ] , Codec . __iter__ ( self ) ) <EOL> class AudioCodec ( Codec ) : <EOL> """<STR_LIT>""" <EOL> def frames ( self , number ) : <EOL> self . add_formatparam ( '<STR_LIT>' , str ( number ) ) <EOL> return self <EOL> def frequence ( self , freq ) : <EOL> self . add_formatparam ( '<STR_LIT>' , str ( freq ) ) <EOL> return self <EOL> def bitrate ( self , rate ) : <EOL> self . add_formatparam ( '<STR_LIT>' , str ( rate ) ) <EOL> return self <EOL> def quality ( self , number ) : <EOL> self . add_formatparam ( '<STR_LIT>' , str ( number ) ) <EOL> return self <EOL> def channels ( self , number ) : <EOL> self . add_formatparam ( '<STR_LIT>' , str ( number ) ) <EOL> return self <EOL> def language ( self , lang ) : <EOL> self . add_formatparam ( '<STR_LIT>' , str ( lang ) ) <EOL> return self <EOL> def preset ( self , preset ) : <EOL> """<STR_LIT>""" <EOL> self . add_formatparam ( '<STR_LIT>' , str ( preset ) ) <EOL> return self <EOL> def __iter__ ( self ) : <EOL> return chain ( [ '<STR_LIT>' , self . name ] , Codec . __iter__ ( self ) ) </s>
