Metadata aspect ratio

Take it into consideration
This commit is contained in:
angelblue05 2015-08-08 03:57:04 -05:00
parent 6faed80248
commit ef927d6b3b

View file

@ -142,7 +142,10 @@ class API():
videotrack['height'] = mediaStream.get('Height')
videotrack['width'] = mediaStream.get('Width')
videotrack['Video3DFormat'] = item.get('Video3DFormat')
videotrack['aspectratio'] = mediaStream.get('AspectRatio', "0")
try:# Metadata aspect ratio
videotrack['aspectratio'] = item['AspectRatio']
except: # File aspect ratio
videotrack['aspectratio'] = mediaStream.get('AspectRatio', "0")
if len(videotrack['aspectratio']) >= 3:
try:
aspectwidth, aspectheight = videotrack['aspectratio'].split(':')