in source/mediainfo/lambda_function.py [0:0]
def parse_common_attributes(track):
attributes = {}
attributes['codec'] = track.get('Format')
level = track.get('Format_Level')
profile_values = [
track.get('Format_Profile'),
None if level is None else 'L' + level,
track.get('Format_Tier')
]
profile = '@'.join([i for i in profile_values if i is not None])
if profile != '':
attributes['profile'] = profile
attributes['bitrate'] = parse_number(track.get('BitRate'))
attributes['duration'] = parse_number(track.get('Duration'))
attributes['frameCount'] = parse_number(track.get('FrameCount'))
return attributes