반응형
해결 방법
import subprocess
def get_length(filename):
result = subprocess.run(["ffprobe", "-v", "error", "-show_entries",
"format=duration", "-of",
"default=noprint_wrappers=1:nokey=1", filename],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
return float(result.stdout)
참조 페이지 https://stackoverflow.com/questions/3844430
반응형
'파이썬' 카테고리의 다른 글
파이썬 Python에서 DNS를 확인하는 방법은 무엇입니까? (0) | 2020.11.01 |
---|---|
파이썬 What is a Python equivalent of PHP's var_dump()? (0) | 2020.11.01 |
파이썬 Python 3.x 용 MySQL-db lib? (0) | 2020.11.01 |
파이썬 get index of character in python list (0) | 2020.11.01 |
파이썬 "from __future__ 가져 오기는 파일의 시작 부분에서 발생해야합니다": 파일의 시작을 정의하는 것은 무엇입니까? (0) | 2020.11.01 |
댓글