if size == "WVGA_BASE" or size == "QVGA_BASE":
x264profile=" --level 32 --profile baseline "
else:
- x264profile=" --level 42 --profile high "
+ x264profile=" --level 41 --profile high "
x264crf=str(crf)
txt=""
os.environ['LANG']="ja_JP.UTF-8"
def getMovieBaseSize2(pin):##動画開始後すぐに解像度が変更されたときに対処
ffmpeg=configreader.getpath("ffmpeg")
os.environ['LANG']="ja_JP.UTF-8"
- exe=ffmpeg+u" -ss 5 -fs 1 -i \""+pin+"\" 2>&1"
+ exe=ffmpeg+u" -ss 5 -fs 1 -i \""+pin+"\" \""+pin+".size.ts\" 2>&1"
txts=unicode(commands.getoutput(exe.encode('utf-8')),'utf-8','ignore')
rT=re.compile(u"Stream.*#.*:.*\D+([\d]+x[\d]+)\D+PAR\D+(\d+:\d+)\D+.*\Z")
sizeMaxX=0
if sizeMaxX<tX:
sizeMaxX=tX
sizeMaxY=tY
+ os.remove(pin+".size.ts")
return [sizeMaxX,sizeMaxY]
def getMoviePAR(pin):
ffmpeg=configreader.getpath("ffmpeg")
exe=ffmpeg+u" -i \""+pin+"\" 2>&1"
txts=unicode(commands.getoutput(exe.encode('utf-8')),'utf-8','ignore')
rT=re.compile(u".*Stream.*#.*:.*\D+([\d]+x[\d]+)\D+PAR\D+(\d+:\d+)\D+.*\Z")
- #rT=re.compile(u".*Stream.*#.*:.*\D+([\d]+x[\d]+)\D+.*DAR\D+(\d+:\d+)\D+.*\Z")
sizeMaxX=0
parx=0
pary=0
def getMoviePAR2(pin):
ffmpeg=configreader.getpath("ffmpeg")
os.environ['LANG']="ja_JP.UTF-8"
- exe=ffmpeg+u" -ss 5 -fs 1 -i \""+pin+"\" 2>&1"
+ exe=ffmpeg+u" -ss 5 -fs 1 -i \""+pin+"\" \""+pin+".size.ts\" 2>&1"
txts=unicode(commands.getoutput(exe.encode('utf-8')),'utf-8','ignore')
rT=re.compile(u".*Stream.*#.*:.*\D+([\d]+x[\d]+)\D+PAR\D+(\d+:\d+)\D+.*\Z")
- #rT=re.compile(u".*Stream.*#.*:.*\D+([\d]+x[\d]+)\D+.*DAR\D+(\d+:\d+)\D+.*\Z")
sizeMaxX=0
parx=0
pary=0
else:
parx=tEX
pary=tEY
+ os.remove(pin+".size.ts")
return [parx,pary]
def getMovieDAR(pin):
ffmpeg=configreader.getpath("ffmpeg")
def getMovieDAR2(pin):
ffmpeg=configreader.getpath("ffmpeg")
os.environ['LANG']="ja_JP.UTF-8"
- exe=ffmpeg+u" -ss 5 -fs 1 -i \""+pin+"\" 2>&1"
+ exe=ffmpeg+u" -ss 5 -fs 1 -i \""+pin+"\" \""+pin+".size.ts\" 2>&1"
txts=unicode(commands.getoutput(exe.encode('utf-8')),'utf-8','ignore')
rT=re.compile(u".*Stream.*#.*:.*\D+([\d]+x[\d]+)\D+.*DAR\D+(\d+:\d+)\D+.*\Z")
sizeMaxX=0
else:
darx=tEX
dary=tEY
+ os.remove(pin+".size.ts")
return [darx,dary]
def get_par_size(pin,y):
tSize=getMovieBaseSize(pin)
tX=-1
tY=-1
return [tX,tY]
-
def get_x264core_version():
x264=configreader.getpath("x264")
t1=commands.getoutput(x264+" --help|grep core")