def video_size(source, converter='<STR_LIT>'):
res = subprocess.run([converter, '<STR_LIT>', source], stderr=subprocess.PIPE)<EOL>stderr = res.stderr.decode('<STR_LIT:utf8>')<EOL>pattern = re.compile(r'<STR_LIT>')<EOL>match = pattern.search(stderr)<EOL>rot_pattern = re.compile(r'<STR_LIT>')<EOL>rot_match = rot_pattern.search(stderr)<EOL>if match:<EOL><INDENT>x, y = int(match.groups()[<NUM_LIT:0>]), int(match.groups()[<NUM_LIT:1>])<EOL><DEDENT>else:<EOL><INDENT>x = y = <NUM_LIT:0><EOL><DEDENT>if rot_match:<EOL><INDENT>x, y = y, x<EOL><DEDENT>return x, y<EOL>
Returns the dimensions of the video.