If тратата
If тратата
If тратата
If тратата
If тратата
If тратата
from subprocess import Popen, PIPE
import re
def getvideodetails(filepath):
cmd = 'ffmpeg -i %s' % filepath
p = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE)
di = p.communicate()
for line in di:
if line.rfind("Video") > 0:
resolution = re.findall('(\d+x\d+)', line)[0]
return (resolution)
getvideodetails("D:\Документы\1.mp4")