To perform video operations I'm using python with the support of ffmpeg. After I've uploaded videos, I need to resize them, so I'll follow these instructions to calculate the video dimensions:
link_v = "C:/video/video.mp4"
ffmpeg = "ffprobe -v error -show_entries stream=width,height -of default=noprint_wrappers=1 %s"% link_v
info = check_output(ffmpeg, shell=True)
print(info)
The console result is something like this:
width=350
height=350
But I do not care about this, when it is printed as if it were a string, because the real data would be: b'width=350\r\nheight=350\r\n' or ['width=350\r\nheight=350\r\n'].
What I really want to see is an associative data: "{width: 350, height: 350}", once I get then I would call for example width in the info mode ['width'], how can I get this result?