Однако у меня все еще возникают проблемы с запуском кода, указанного здесь. p>
Я безуспешно пытаюсь использовать следующий код.
Код: Выделить всё
SyntaxError: Non-ASCII character '\xe2' in file GetVideoDurations.py
on line 12, but no encoding declared; see
http://python.org/dev/peps/pep-0263/ for details
Код: Выделить всё
import subprocess
def getLength(filename):
result = subprocess.Popen(["ffprobe", "filename"],
stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
return [x for x in result.stdout.readlines() if "Duration" in x]
fileToWorkWith = 'C:\Users\PC\Desktop\Video.mkv'
getLength(fileToWorkWith)
Спасибо!
Подробнее здесь: https://stackoverflow.com/questions/310 ... -in-python