avinfo, get info about file

This commit is contained in:
j 2009-08-07 13:35:28 +02:00
parent 99a05fb55c
commit 44cc99fe0e
1 changed files with 8 additions and 0 deletions

View File

@ -6,6 +6,9 @@ import os
import hashlib
import sys
import struct
import subprocess
from simplejson
def sha1sum(filename):
@ -55,3 +58,8 @@ def oshash(filename):
except(IOError):
return "IOError"
def avinfo(filename):
p = subprocess.Popen(['ffmpeg2theora', '--info', filename], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
info, error = p.communicate()
return simplejson.loads(info)