How would I get the height and width of a video from ffmpeg\'s information output. For example, with the following output:
$ ffmpeg -i video.mp4
without re module
out = error_message.split() # make a list from resulting error string
out.reverse()
for index, item in enumerate(out): # extract the item before item= "[PAR"
if item == "[PAR": #
dimension_string = out[i+1] #
video_width, video_height = dimension_string.split("x")
Edit: not a good answer because not all videos have that "PAR" information :(